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

Error syncing browsable custom ezflow attributes

    Details

    • Sprint:
      Pollux Core S5, Pollux Platform S6, Pollux Platform S7, Pollux Platform S9

      Description

      Explanation

      eZ Flow blocks can contain custom attributes. Those custom attributes can be set as Using Browse Mode (UseBrowseMode array), in which case their value will be set by browsing for a node. Node ids need to be converted to remote ids to be synced, as it is done in most cases.

      The encoding code for ezpage takes care of converting the value to a remote id, but only in the custom data sent along the JSON request (the XML still contains the node id, like <custom_attributes><subtree_node_id>95</subtree_node_id></custom_attributes>). However, there is no custom struct to take care of manual blocks (the block_items key is used for automatic blocks).

      During decoding, the XML is used as the basis, and the custom sync data is used to... fixup data. But those manual blocks don't receive any special handling, and the source's remote id is used as is, with unwanted results.

      Steps to reproduce:

      Prepare the environment:

      Reproduce the issue:
      The issue can be reproduced with any eZ Flow block that uses UseBrowseMode set to true. Tag Cloud will be used in the following steps.

      1. On target installation, create a new folder. In my tests, called it "Bump it up", as it makes sure that node ids are not in sync between target and source
      2. On source installation, create a new folder called "Tag cloud source";
      3. On source installation, create a new content of type "Global layout"

      Title: <anything>
      Layout: In the "left zone" zone add a new block of type "Tag Cloud. Click "Choose source" button and select "Tag cloud source" folder. Publish.

      4. On source installation, go to "setup" tab -> Content staging, and sync both contents - "Tag cloud source" and the global layout object.

      5. Go to target installation and edit "Content sync object" content. Notice that Global layout object layout attribute links to "Bump it ump" folder instead of "Tag cloud source", as expected.

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment -

          Figured out what's wrong. Updated the description of the bug accordingly.

          Show
          Bertrand Dunogier added a comment - Figured out what's wrong. Updated the description of the bug accordingly.
          Show
          Bertrand Dunogier added a comment - PR https://github.com/ezsystems/ezcontentstaging/pull/40 .
          Hide
          Bertrand Dunogier added a comment -

          https://github.com/ezsystems/ezcontentstaging/pull/40 merged to master (see github links on the right).

          [~nuno.oliveira@ez.no], would you mind testing it before it gets backported all the way down ?

          Show
          Bertrand Dunogier added a comment - https://github.com/ezsystems/ezcontentstaging/pull/40 merged to master (see github links on the right). [~nuno.oliveira@ez.no] , would you mind testing it before it gets backported all the way down ?
          Hide
          Bertrand Dunogier added a comment -

          I'm a bit annoyed... if the "normal" test did not work, I wouldn't have sent it for testing. Looks like it does not, and I don't know why

          Show
          Bertrand Dunogier added a comment - I'm a bit annoyed... if the "normal" test did not work, I wouldn't have sent it for testing. Looks like it does not, and I don't know why
          Hide
          Bertrand Dunogier added a comment -

          Note that the issue can easily be reproduced with the default ezflow block configuration. Those block types use the affected setting: Top Rated, GMapItems, Poll and Tag Cloud. I'll test on those if you don't mind (you can do the same on your side).

          Show
          Bertrand Dunogier added a comment - Note that the issue can easily be reproduced with the default ezflow block configuration. Those block types use the affected setting: Top Rated, GMapItems, Poll and Tag Cloud. I'll test on those if you don't mind (you can do the same on your side).
          Hide
          Bertrand Dunogier added a comment -

          I have tested again, on a fully patched 4.7.1:

          • ezpublish-legacy@stable-4.7-SP
          • ezflow@stable-4.7-SP
          • ezcontentstaging@custom-4.7.1 with the fix commit cherry-picked

          It failed without the cherry pick, and worked with it, without doing anything in addition. Did you apply the fix on both the source and the target contentstaging extensions ?

          Show
          Bertrand Dunogier added a comment - I have tested again, on a fully patched 4.7.1: ezpublish-legacy@stable-4.7-SP ezflow@stable-4.7-SP ezcontentstaging@custom-4.7.1 with the fix commit cherry-picked It failed without the cherry pick, and worked with it, without doing anything in addition. Did you apply the fix on both the source and the target contentstaging extensions ?
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for 4.7, 4.7.1, 5.1, 5.2, 5.3 and master.
          Could not be reproduced on a 5.0 due to EZP-24222.
          Due to the lesser relevancy of this currently working on a 5.0, it was kept out of the scope of this test.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for 4.7, 4.7.1, 5.1, 5.2, 5.3 and master. Could not be reproduced on a 5.0 due to EZP-24222 . Due to the lesser relevancy of this currently working on a 5.0, it was kept out of the scope of this test.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 1 day, 2 hours Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - 1 day, 2 hours Remaining Estimate - 1 day
                1d 2h

                  Agile