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

Relationlist contains wrong content after content removal

    Details

      Description

      Steps to reproduce

      Prepare the environment:

      1. Prepare eZ Publish 4.7 installation, fully patched;
      2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
      3. Create the following content structure:

      Home
      	Tests (folder)
      	Tests 2 (folder)
      

      Reproduce the issue:

      1. Create 2 new "article" objects under /Tests:

      Article 1 (node_id: 125, object_id: 120)
      Article 2 (node_id: 126, object_id: 121)

      2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

      13151 Test article (node_id: 127, object_id: 122)

      3. Check content of 'ezcontentobject_attribute' table:

      SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
      +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
      | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | data_type_string     | id  | language_code | language_id | sort_key_int | sort_key_string | version |
      +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
      |                     0 |                      307 |              122 |          0 |     NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects>   | ezobjectrelationlist | 755 | eng-GB        |           2 |            0 |                 |       1 |
      +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
      1 row in set (0.00 sec)
      

      Note: "contentclassattribute_id = 307" refers to the Id of the "Related articles" attribute for the new class "article 2".

      4. Add a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

      Home
      	Tests
      		Article 1 (node_id: 125, object_id: 120)
      		Article 2 (node_id: 126, object_id: 121)
      		13151 Test article (node_id: 127, object_id: 122)
      	Tests 2
      		Article 1 (node_id: 128, object_id: 120, main location)
      		Article 2 (node_id: 129, object_id: 121, main location)
      

      5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
      6. Remove the firt location - "Tests" folder - from "Article 1";
      7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

      Additional test:

      8. Remove "Article 2" from both locations;
      9. Check content of 'ezcontentobject_attribute' table:

      SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
      +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
      | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text                                                                                                                                                                                                                                                                                                                                     | data_type_string     | id  | language_code | language_id | sort_key_int | sort_key_string | version |
      +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
      |                     0 |                      307 |              122 |          0 |     NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects>   | ezobjectrelationlist | 755 | eng-GB        |           2 |            0 |                 |       1 |
      +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
      1 row in set (0.00 sec)
      

      The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.

        Activity

        Nuno Oliveira (Inactive) created issue -
        Nuno Oliveira (Inactive) made changes -
        Field Original Value New Value
        Environment h4. Steps to reproduce

        Prepare the environment:

        1. Prepare eZ Publish 4.7 installation, fully patched;
        2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
        3. Create the following content structure:

        {noformat}
        Home
        Tests (folder)
        Tests 2 (folder)
        {noformat}

        Reproduce the issue:

        1. Create 2 new "article" objects under /Tests:

        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)

        2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

        13151 Test article (node_id: 127, object_id: 122)

        3. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        4. A new a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

        {noformat}
        Home
        Tests
        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)
        13151 Test article (node_id: 127, object_id: 122)
        Tests 2
        Article 1 (node_id: 128, object_id: 120, main location)
        Article 2 (node_id: 129, object_id: 121, main location)
        {noformat}

        5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
        6. Remove the firt location - "Tests" folder - from "Article 1";
        7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

        Additional test:

        8. Remove "Article 2" from both locations;
        9. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.
        Nuno Oliveira (Inactive) made changes -
        Description h4. Steps to reproduce

        Prepare the environment:

        1. Prepare eZ Publish 4.7 installation, fully patched;
        2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
        3. Create the following content structure:

        {noformat}
        Home
        Tests (folder)
        Tests 2 (folder)
        {noformat}

        Reproduce the issue:

        1. Create 2 new "article" objects under /Tests:

        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)

        2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

        13151 Test article (node_id: 127, object_id: 122)

        3. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        4. A new a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

        {noformat}
        Home
        Tests
        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)
        13151 Test article (node_id: 127, object_id: 122)
        Tests 2
        Article 1 (node_id: 128, object_id: 120, main location)
        Article 2 (node_id: 129, object_id: 121, main location)
        {noformat}

        5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
        6. Remove the firt location - "Tests" folder - from "Article 1";
        7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

        Additional test:

        8. Remove "Article 2" from both locations;
        9. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.
        Nuno Oliveira (Inactive) made changes -
        Description h4. Steps to reproduce

        Prepare the environment:

        1. Prepare eZ Publish 4.7 installation, fully patched;
        2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
        3. Create the following content structure:

        {noformat}
        Home
        Tests (folder)
        Tests 2 (folder)
        {noformat}

        Reproduce the issue:

        1. Create 2 new "article" objects under /Tests:

        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)

        2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

        13151 Test article (node_id: 127, object_id: 122)

        3. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        4. A new a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

        {noformat}
        Home
        Tests
        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)
        13151 Test article (node_id: 127, object_id: 122)
        Tests 2
        Article 1 (node_id: 128, object_id: 120, main location)
        Article 2 (node_id: 129, object_id: 121, main location)
        {noformat}

        5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
        6. Remove the firt location - "Tests" folder - from "Article 1";
        7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

        Additional test:

        8. Remove "Article 2" from both locations;
        9. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.
        h4. Steps to reproduce

        Prepare the environment:

        1. Prepare eZ Publish 4.7 installation, fully patched;
        2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
        3. Create the following content structure:

        {noformat}
        Home
        Tests (folder)
        Tests 2 (folder)
        {noformat}

        Reproduce the issue:

        1. Create 2 new "article" objects under /Tests:

        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)

        2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

        13151 Test article (node_id: 127, object_id: 122)

        3. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        4. Add a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

        {noformat}
        Home
        Tests
        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)
        13151 Test article (node_id: 127, object_id: 122)
        Tests 2
        Article 1 (node_id: 128, object_id: 120, main location)
        Article 2 (node_id: 129, object_id: 121, main location)
        {noformat}

        5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
        6. Remove the firt location - "Tests" folder - from "Article 1";
        7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

        Additional test:

        8. Remove "Article 2" from both locations;
        9. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.
        Nuno Oliveira (Inactive) made changes -
        Description h4. Steps to reproduce

        Prepare the environment:

        1. Prepare eZ Publish 4.7 installation, fully patched;
        2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
        3. Create the following content structure:

        {noformat}
        Home
        Tests (folder)
        Tests 2 (folder)
        {noformat}

        Reproduce the issue:

        1. Create 2 new "article" objects under /Tests:

        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)

        2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

        13151 Test article (node_id: 127, object_id: 122)

        3. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        4. Add a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

        {noformat}
        Home
        Tests
        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)
        13151 Test article (node_id: 127, object_id: 122)
        Tests 2
        Article 1 (node_id: 128, object_id: 120, main location)
        Article 2 (node_id: 129, object_id: 121, main location)
        {noformat}

        5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
        6. Remove the firt location - "Tests" folder - from "Article 1";
        7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

        Additional test:

        8. Remove "Article 2" from both locations;
        9. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.
        h4. Steps to reproduce

        Prepare the environment:

        1. Prepare eZ Publish 4.7 installation, fully patched;
        2. Duplicate "article" class, and add a new "object relations" attribute to the new class. Class is called "article 2", attribute is called "related articles";
        3. Create the following content structure:

        {noformat}
        Home
        Tests (folder)
        Tests 2 (folder)
        {noformat}

        Reproduce the issue:

        1. Create 2 new "article" objects under /Tests:

        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)

        2. Create new "article 2" object also under /Tests, and add both "Article 1" and "Article 2" to object relations field:

        13151 Test article (node_id: 127, object_id: 122)

        3. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/><relation-item priority="2" contentobject-id="121" contentobject-version="1" node-id="126" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="f3fa332a108f22a9ada2e0bbd3c27977"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        Note: "contentclassattribute_id = 307" refers to the Id of the "Related articles" attribute for the new class "article 2".

        4. Add a new location - "Tests 2" folder - to "Article 1" and "Article 2", and make that the main location. Content structure is now:

        {noformat}
        Home
        Tests
        Article 1 (node_id: 125, object_id: 120)
        Article 2 (node_id: 126, object_id: 121)
        13151 Test article (node_id: 127, object_id: 122)
        Tests 2
        Article 1 (node_id: 128, object_id: 120, main location)
        Article 2 (node_id: 129, object_id: 121, main location)
        {noformat}

        5. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3;
        6. Remove the firt location - "Tests" folder - from "Article 1";
        7. Check content of 'ezcontentobject_attribute' table. Results are the same as the ones in step 3. That's not correct, as XML structure in "data_text" now contains a dead node - /Tests/Article 1.

        Additional test:

        8. Remove "Article 2" from both locations;
        9. Check content of 'ezcontentobject_attribute' table:

        {noformat}
        SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 122 AND contentclassattribute_id = 307;
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | attribute_original_id | contentclassattribute_id | contentobject_id | data_float | data_int | data_text | data_type_string | id | language_code | language_id | sort_key_int | sort_key_string | version |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        | 0 | 307 | 122 | 0 | NULL | <?xml version="1.0" encoding="utf-8"?><related-objects><relation-list><relation-item priority="1" contentobject-id="120" contentobject-version="1" node-id="125" parent-node-id="103" contentclass-id="16" contentclass-identifier="article" contentobject-remote-id="fe79d4dcc39a5111fc604ba9e169e6f3"/></relation-list></related-objects> | ezobjectrelationlist | 755 | eng-GB | 2 | 0 | | 1 |
        +-----------------------+--------------------------+------------------+------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+-----+---------------+-------------+--------------+-----------------+---------+
        1 row in set (0.00 sec)
        {noformat}

        The removed node is completely removed from the relation list as it should, but there was no update for the "/Tests/Article 1" dead node. As a sidenote, this can not be solved by republishing the "13151 Test article" object.
        Nuno Oliveira (Inactive) made changes -
        Status Open [ 1 ] Confirmed [ 10037 ]
        Paulo Lopes (Inactive) made changes -
        Status Confirmed [ 10037 ] InputQ [ 10001 ]
        Gunnstein Lye made changes -
        Assignee Gunnstein Lye [ gunnstein.lye@ez.no ]
        Gunnstein Lye made changes -
        Status InputQ [ 10001 ] Development [ 3 ]
        Gunnstein Lye made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 2 hours [ 7200 ]
        Worklog Id 53176 [ 53176 ]
        Gunnstein Lye made changes -
        Time Spent 2 hours [ 7200 ] 3 hours, 5 minutes [ 11100 ]
        Worklog Id 53181 [ 53181 ]
        Gunnstein Lye made changes -
        Time Spent 3 hours, 5 minutes [ 11100 ] 4 hours, 5 minutes [ 14700 ]
        Worklog Id 53182 [ 53182 ]
        Gunnstein Lye made changes -
        Time Spent 4 hours, 5 minutes [ 14700 ] 1 day, 25 minutes [ 30300 ]
        Worklog Id 53186 [ 53186 ]
        Gunnstein Lye made changes -
        Status Development [ 3 ] Development Review [ 10006 ]
        Fix Version/s 4.7 Maintenance [ 12583 ]
        Gunnstein Lye made changes -
        Time Spent 1 day, 25 minutes [ 30300 ] 1 day, 45 minutes [ 31500 ]
        Worklog Id 53188 [ 53188 ]
        Gunnstein Lye made changes -
        Status Development Review [ 10006 ] Development Review done [ 10028 ]
        Gunnstein Lye made changes -
        Attachment EZP-24030-custom.diff [ 19333 ]
        Gunnstein Lye made changes -
        issue.field.resolutiondate 2015-02-20 09:14:20.0 2015-02-20 09:14:20.783
        Time Spent 1 day, 45 minutes [ 31500 ] 1 day, 1 hour, 35 minutes [ 34500 ]
        Worklog Id 53193 [ 53193 ]
        Gunnstein Lye made changes -
        Assignee Gunnstein Lye [ gunnstein.lye@ez.no ]
        Status Development Review done [ 10028 ] Closed [ 6 ]
        Resolution Invalid [ 6 ]
        Gunnstein Lye made changes -
        Resolution Invalid [ 6 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Gunnstein Lye made changes -
        Time Spent 1 day, 1 hour, 35 minutes [ 34500 ] 1 day, 2 hours, 5 minutes [ 36300 ]
        Worklog Id 53193 [ 53193 ]
        Gunnstein Lye made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Invalid [ 6 ]
        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 66228 ] EZ* Development Workflow [ 85721 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 85721 ] EZEE Development Workflow [ 124606 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day, 2 hours, 5 minutes
              1d 2h 5m