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

Wrong path_identification_string when editing in frontend siteaccess using PathPrefix and RootNode

    Details

      Description

      Steps to reproduce:

      1. Create the following content structure:

      Home				(node_id: 2)
      	Tests			(Folder, node_id: 120)
      		News		(Frontpage, node_id: 142)
      

      2. Check original path_identification_path of the "News" frontpage in database:

      mysql> select contentobject_id, node_id, path_string, path_identification_string  from ezcontentobject_tree where node_id = 142;
      +------------------+---------+---------------+----------------------------+
      | contentobject_id | node_id | path_string   | path_identification_string |
      +------------------+---------+---------------+----------------------------+
      |              145 |     142 | /1/2/120/142/ | tests/news                 |
      +------------------+---------+---------------+----------------------------+
      1 row in set (0.00 sec)
      

      3. Set "News" frontpage object as root node in ezpublish.yml:

      ezpublish:
          system:
              ezdemo_site_group:
                  content:
                      tree_root:
                          location_id: 142
      

      4. Go to frontpage siteaccess and edit and publish "News" frontpage object;
      5. Check path_identification_path again:

      mysql> select contentobject_id, node_id, path_string, path_identification_string  from ezcontentobject_tree where node_id = 142;
      +------------------+---------+---------------+----------------------------+
      | contentobject_id | node_id | path_string   | path_identification_string |
      +------------------+---------+---------------+----------------------------+
      |              145 |     142 | /1/2/120/142/ | tests/                     |
      +------------------+---------+---------------+----------------------------+
      1 row in set (0.00 sec)
      

      path_identification_string should be "tests/news", but it's just "tests/" instead.

      Notes:

      • This issue has been originally described in EZP-18889;
      • There seems to be a new stack issue here, as location_id property is mapped to RootNode. This should not be done, as it causes issues like these, it should be better to set PathPrefix + RootNodeDepth;
      • Currently, it is only possible to set RootNodeDepth in legacy, there is no way to achieve that in new stack, other than manually changing eZ\Bundle\EzPublishLegacyBundle\LegacyMapper\Configuration->getMultiSiteSettings();
      • Regarding path_identification_string, it seems to be a symptom: it was made obsolete by url alias in version 3.10 and further deprecated with 5.0 by not including it in the Public API. It will be gone from the system in 6.0.

        Issue Links

          Activity

          Hide
          André Rømcke added a comment -

          Investigation done: RootNode can not be injected into legacy as SiteContentRootNode, it is not made for this and used everywhere for things like urlAlias calculations. One option is to inject RootNodeDepth instead*, cause then only webin/ezdemo/ezflow picks it up, and not kernel.

          * This is option A and probably safest. Downside is of-course that everything not content based (login pages and so on), will not get correct root node setting (cause there is no depth to calculate). However this is known issue in legacy anyway, so I think we can live with it as reported (and closed as won't fix) known issue.
          Option B is to introduce a new setting in legacy, SiteContentRootNode or something which is only used by front end, however there are risks of causing regressions here.

          Show
          André Rømcke added a comment - Investigation done: RootNode can not be injected into legacy as SiteContentRootNode, it is not made for this and used everywhere for things like urlAlias calculations. One option is to inject RootNodeDepth instead*, cause then only webin/ezdemo/ezflow picks it up, and not kernel. * This is option A and probably safest. Downside is of-course that everything not content based (login pages and so on), will not get correct root node setting (cause there is no depth to calculate). However this is known issue in legacy anyway, so I think we can live with it as reported (and closed as won't fix) known issue. Option B is to introduce a new setting in legacy, SiteContentRootNode or something which is only used by front end, however there are risks of causing regressions here.
          Hide
          Joao Inacio (Inactive) added a comment -
          Show
          Joao Inacio (Inactive) added a comment - PR for possible solution: https://github.com/ezsystems/ezpublish-legacy/pull/1140
          Show
          Joao Inacio (Inactive) added a comment - Merged in ezpublish-legacy/master: https://github.com/ezsystems/ezpublish-legacy/commit/bec07b7aa25682f045fe2640c83ee8547d9e8416
          Hide
          André Rømcke added a comment -

          This is issue is sent back to development as the patch causes further regressions.

          For details on the regression see EZP-24115, and suggested patch for the regression here: https://github.com/ezsystems/ezpublish-legacy/pull/1148

          Show
          André Rømcke added a comment - This is issue is sent back to development as the patch causes further regressions. For details on the regression see EZP-24115 , and suggested patch for the regression here: https://github.com/ezsystems/ezpublish-legacy/pull/1148
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          New PR (LegacyBridge): https://github.com/ezsystems/LegacyBridge/pull/21

          Note that fix from https://github.com/ezsystems/ezpublish-legacy/pull/1140 needs to be reverted as well.

          Show
          Jérôme Vieilledent (Inactive) added a comment - New PR (LegacyBridge): https://github.com/ezsystems/LegacyBridge/pull/21 Note that fix from https://github.com/ezsystems/ezpublish-legacy/pull/1140 needs to be reverted as well.
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in: LegacyBridge master: https://github.com/ezsystems/LegacyBridge/commit/13e1a5d802b71d308bd61928d63a84c82e7cad00 ezpublish-legacy master: https://github.com/ezsystems/ezpublish-legacy/commit/62d5c966e36d6326e2bd9f134a6afd23b7555495
          Hide
          Paulo Silva (Inactive) added a comment -

          Tested and approved by QA.

          Show
          Paulo Silva (Inactive) added a comment - Tested and approved by QA.
          Hide
          Paulo Silva (Inactive) added a comment -

          To apply the fixes for ezpublish-legacy, it's necessary to apply https://github.com/ezsystems/ezpublish-legacy-ee/commit/f42f70cd627afdba46e9fc97df60d51f19dc0430 first

          Show
          Paulo Silva (Inactive) added a comment - To apply the fixes for ezpublish-legacy, it's necessary to apply https://github.com/ezsystems/ezpublish-legacy-ee/commit/f42f70cd627afdba46e9fc97df60d51f19dc0430 first

            People

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

              Dates

              • Created:
                Updated:
                Resolved: