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

URL aliases across siteaccesses in multisite configuration

    Details

    • Type: Feature Feature
    • Status: Open
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 5.4.8, 1.5.1
    • Fix Version/s: Customer request
    • Component/s: Multi Site
    • Labels:
      None

      Description

      Use case:

      • Website A (example1.com) has an article (say, "Article 1") with an URL alias called "myarticle";
      • So, the URL example1.com/myarticle will forward you to "Article 1" with URL example1.com/Site-1/Article-1;
      • There is also another website (i.e. another siteaccess) in the same system - example2.com;
      • example2.com, in turn, also has another article ("Article 2"), also with the same URL alias as "Article 1", "myarticle";
      • The content structure should look like this:

      Home
      	Site 1 (folder)
      		Article 1 (article, node_id: 122, URL alias "/myarticle")
      	Site 2 (folder)
      		Article 2 (article, node_id: 123, URL alias "/myarticle")
      

      • Now "Article 1" is moved from the "Site 1" folder to "Site 2", effectively being moved from example1.com to example2.com;
      • As it is now, if you point the browser to example2.com/myarticle, you will be redirected to example2.com/Site-2/Article-2, which is correct;
      • However, the example1.com/myarticle no longer works, and a "Module not found" message will be displayed.

      It would be useful/advantageous to have the example1.com/myarticle URL alias still reachable, and forward users to example2.com/Site-2/Article-2.

        Activity

        Hide
        David Sayre added a comment -

        This is a GLARING problem that has existing for many versions.

        Ultimately I wrote a custom function (ye olde template operator in v4)

        get the full path
        if the object's path prefix is NOT the same prefix as the current site then ..
        loop over the siteaccess settings
        look at the pathprefixes
        detect a matching path prefix and replace the object's path prefix with a full url
        return same path or altered url

        Show
        David Sayre added a comment - This is a GLARING problem that has existing for many versions. Ultimately I wrote a custom function (ye olde template operator in v4) get the full path if the object's path prefix is NOT the same prefix as the current site then .. loop over the siteaccess settings look at the pathprefixes detect a matching path prefix and replace the object's path prefix with a full url return same path or altered url

          People

          • Assignee:
            Unassigned
            Reporter:
            Nuno Oliveira (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: