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

URL aliases for translations are not removed after node swap

    Details

      Description

      Currently, after swapping contents there are aliases for non-existent translations which prevent proper redirection from happening after moving content to another location.

      Steps to reproduce:
      1. Add a new language to eZ Publish e.g. French.
      2. Create content A which has two translations e.g. English and French.
      3. Create content B which has only an English translation.
      4. Swap content A with content B.
      5. Move content B to another location.
      6. Try to access content B using its old URL alias.

      Result:
      There is no redirect to the new URL. Also, there are two URL aliases, for content B even though there was only one translation for it.

        Activity

        Hide
        David Sayre added a comment -

        We are noticing a bug that may be related to this.
        /Article-A/Article-B/Article-C/Article-D (English)
        /Articulo-A/Articulo-B/Articulo-C/Articulo-D (Spanish)

        Move Article-C (English) Parent : /Article-A/Article-C/Article-D (English)
        Look at the URL for Article-D (Spanish) - shows /Articulo-A/Articulo-B/Articulo-C/Articulo-D (Spanish)

        BUG: Spanish location is not also changing / being recomputed when the English parent is moved.

        This is becoming a big problem.

        The solution we have is to use the English Admin and edit and re-publish the Spanish to recalculate the url pathing.

        I tried the objectname script with and it didn't fix it.

        php ezpublish/console ezpublish:legacy:script update/common/scripts/updatecontentobjectname.php

        Show
        David Sayre added a comment - We are noticing a bug that may be related to this. /Article-A/Article-B/Article-C/Article-D (English) /Articulo-A/Articulo-B/Articulo-C/Articulo-D (Spanish) Move Article-C (English) Parent : /Article-A/Article-C/Article-D (English) Look at the URL for Article-D (Spanish) - shows /Articulo-A/Articulo-B/Articulo-C/Articulo-D (Spanish) BUG: Spanish location is not also changing / being recomputed when the English parent is moved. This is becoming a big problem. The solution we have is to use the English Admin and edit and re-publish the Spanish to recalculate the url pathing. I tried the objectname script with and it didn't fix it. php ezpublish/console ezpublish:legacy:script update/common/scripts/updatecontentobjectname.php
        Hide
        David Sayre added a comment -

        Update: ye ol'd tyme' updateniceurls.php appears to fix my particular issue..

        @ezsupport - is there a Symfony command that will update the urls in the DB?

        If not... please create a symfony equivalent command (along with ezupdateobjectnames)

        Thanks to @peterkeung for the help!

        Show
        David Sayre added a comment - Update: ye ol'd tyme' updateniceurls.php appears to fix my particular issue.. @ezsupport - is there a Symfony command that will update the urls in the DB? If not... please create a symfony equivalent command (along with ezupdateobjectnames) Thanks to @peterkeung for the help!
        Hide
        Konrad Oboza added a comment -

        David Sayre we do not recommend using updateniceurls.php script, it might be risky to rely on this in your production environment. In eZ Platform v1 and v2 we use ezplatform:regenerate:legacy_storage_url_aliases command which was improved in the last few weeks. We also plan to backport it to eZ Publish 5.4, you can follow a public ticket which touches this subject to be notified of the current progress: https://jira.ez.no/browse/EZP-29138.

        Show
        Konrad Oboza added a comment - David Sayre we do not recommend using updateniceurls.php script, it might be risky to rely on this in your production environment. In eZ Platform v1 and v2 we use ezplatform:regenerate:legacy_storage_url_aliases command which was improved in the last few weeks. We also plan to backport it to eZ Publish 5.4, you can follow a public ticket which touches this subject to be notified of the current progress: https://jira.ez.no/browse/EZP-29138 .
        Hide
        André Rømcke added a comment -

        Closing as won't fix as eZ Publish 5.x is out of matintance, and so is legacy on eZ Platform installations. Legacy is still within service life so still supported and receives security fixes, and contributions are as before still welcome.

        https://support.ez.no/Public/Service-Life

        As for symfony command to fix url aliases, this has been backported and will be part of upcoming 5.4.14 coming in ~April.

        Show
        André Rømcke added a comment - Closing as won't fix as eZ Publish 5.x is out of matintance, and so is legacy on eZ Platform installations. Legacy is still within service life so still supported and receives security fixes, and contributions are as before still welcome. https://support.ez.no/Public/Service-Life As for symfony command to fix url aliases, this has been backported and will be part of upcoming 5.4.14 coming in ~April.

          People

          • Assignee:
            Unassigned
            Reporter:
            Konrad Oboza
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: