Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20954

API: creating content will throw an InvalidArgumentException

    XMLWordPrintable

Details

    Description

      using the api to create an object as described here: https://confluence.ez.no/display/EZP/3.+Managing+Content
      will cause the sequence:
      <code>
      $locationCreateStruct = $locationService->newLocationCreateStruct( $parentLocationId );
      $draft = $contentService->createContent( $contentSkeleton, array( $locationCreateStruct ) );
      $content = $contentService->publishVersion( $draft->versionInfo );
      </code>

      to return an error with the exception:

      [eZ\Publish\Core\Base\Exceptions\InvalidArgumentException]
      Argument '$locationCreateStructs' is invalid: Another Location with remoteId 'a6d8a811e83ed8b5eaba24e3fd087b98' exists

      create a test bundle to use the ezpublish/console script attached.
      put the attached file in the bundle/Command dir

      run with ezpublish/console test:singleItem

      each run shows a different hash, so object is not the same.

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.bras-obsolete@ez.no Paulo Bras (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: