Details
-
Bug
-
Resolution: Invalid
-
Medium
-
4.7.0
-
None
-
2 eZ Publish 4.7 installations, fully patched (editing server and prod server)
Description
Steps to reproduce:
Prepare 2 identical eZ Publish 4.7 installations, fully patched. I'll call them "server 1" and "server 2", for the sake of simplicity. With that done:
1. Server 1: create new class with one attribute:
Type: Text line Name: "Title" Identifier: "title" Required: yes
2. Server 1: create a new object for that class;
3. Server 1: export package with class definition;
4. Server 1: export package with object;
5. Server 2: import class defnition package;
6. Server 2: import object package;
7. Server 2: edit ./kernel/classes/ezcontentclassattribute.php file, and on the initializeObjectAttributes() function, comment the following line (#988):
// $db->query( $sql );
This will simulate/cause the DB corruption that is at the heart of this issue i.e. a class that has more attributes that the objects from that class.
8. Server 2: edit class and add a new attribute. Type is irrelevant for issue reproduction. For reference, created:
Type: Text block Name: Description Identifier: description Required: no
After this, server 2 will have a class with 2 attributes, and an object for that class with only one attribute.
9. Server 1: edit class and add a new attribute, with the exact same details of the object from the previous step;
At this stage, the content structure should be this:
Server 1: Class: 2 attributes; Object: 2 attributes; Server 2: Class: 2 attributes; Object: 1 attribute;
10. Server 1: export a new package with the new version of the object. See attched screenshots (ExportStepByStep.zip) for reference;
11. Server 2: import the newly created package, and update the existing object. See attached screenshots (ImportStepByStep.zip) for reference. The object only has 1 attribute, and after the update it should have 2.