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

Creating URLALias via API with custom content.tree_root.location_id not possible

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Customer request
    • 2.5.6
    • None
    • None

    Description

      In backend, i can create a URLAlias with the checkbox "create in page root" unchecked. This is the only way to create a working url alias (see EZP-31110).

      When using the API, there is no such option. The 4th parameter of neither createUrlAlias() nor createGlobalUrlAlias() does not have any effect.

      Steps to reproduce:

      1. Create a page named "start" and set content.tree_root.location_id to it's location id

      2. Create another page "test" under "start"

      3a. Add URL aliases to test

      $repo->getURLAliasService()->createUrlAlias($location, '/test-redirect', 'ger-DE', true, false);

      3b.

      $repo->getURLAliasService()->createUrlAlias($location, '/test-redirect', 'ger-DE', true, true); 

      4. See that the URL is global in both cases (/test-redirect instead of /start/test-redirect)

      5. Open http://localhost/test-redirect and get a 404

      Attachments

        Activity

          People

            Unassigned Unassigned
            9dcdb0dd-5caa-459b-93b0-1ce97332c3fa@accounts.ibexa.co Hannes Giesenow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: