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

Editing class definition in a master/slave environment gives incorrect result

    Details

      Description

      When editing a class definition on a site running in a master / slave environment eZ only returns a certain amount (or types) of attributes. There seems to be mostly images and relation attributes which do not show up. I have verified that this happens in the actual fetch, and not the template that displays them.

      If I do a normal browser refresh while on the edit page of the class page I get the expected result, i.e. all the attributes show up.

      If I try setting

      UseSlaveServer=disabled

      I get all the attributes as expected, and everything works.

      It's also worth mentioning that if I disable

      [OverrideSettings] Cache=disabled

      it works with

      UseSlaveServer=enabled

      Steps to reproduce

      1. Have a site using a master/slave setup with Cache settings enabled (i.e. as close to a live environment as possible.)
      2. Edit a class definition that has image and relation attributes
      3. See that there are missing attributes in the form
      4. Refresh the page
      5. See that all attribute show up as expected

        Activity

        Hide
        Georg Franz added a comment -

        Hi Torjus,

        you must disable Master/Slave for the backend, otherwise you will run into more troubles than this.

        I one of my configuration we have disabled the master/slave at the backend, but enabled it in the frontend.

        You will also have big troubles with the object creation:

        • ez creates the object (e.g. object 123)
        • after the creation you will be redirected to the edit page /content/edit/123

        But you will get an error page, because the object id on the second page will be fetched from the slave db. If the slave db is not fast enough, you will not find the newly created object.

        So, if your users are able to create content objects on your frontend, I would also advice turning off master / slave.

        One last tip:
        If you are using dfs cluster - exclude the dfs tables from syncing with the slave. Cluster dfs is only using the master table.

        Best wishes,
        Georg.

        Show
        Georg Franz added a comment - Hi Torjus, you must disable Master/Slave for the backend, otherwise you will run into more troubles than this. I one of my configuration we have disabled the master/slave at the backend, but enabled it in the frontend. You will also have big troubles with the object creation: ez creates the object (e.g. object 123) after the creation you will be redirected to the edit page /content/edit/123 But you will get an error page, because the object id on the second page will be fetched from the slave db. If the slave db is not fast enough, you will not find the newly created object. So, if your users are able to create content objects on your frontend, I would also advice turning off master / slave. One last tip: If you are using dfs cluster - exclude the dfs tables from syncing with the slave. Cluster dfs is only using the master table. Best wishes, Georg.

          People

          • Assignee:
            unknown
            Reporter:
            Torjus Bjåen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: