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

Error syncing browsable custom ezflow attributes

    XMLWordPrintable

Details

    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nuno.oliveira-obsolete@ez.no 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