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

impossible to delete languages in ezplatform 3.2

    XMLWordPrintable

Details

    Description

      When running the ezmigrationbundle2 test suite, I get errors that languages newly added to the db (via migrations) fail to be removed.

      The procedure is:

      1. create a new language
      2. create a content type; for at least one of its fields, set a different field name in the new lang
      3. delete the content type
      4. delete the lang => fail

      This happens because some data is left over in the `ezcontentclass_attribute_ml` table when removing the content type definition in step 3 (it is easy to check: there are rows in there which reference non-existing ezcontentclass_attribute ids).

      When the canDeleteLanguage method is later called in step 4, it returns false, because it finds data in that table which references the language that we want to delete.

      I checked the equivalent code in eZPlatform 2, and it does not check for leftovers in that table, which makes me think that the problem cause has been there since at least eZPublish 5, just unnoticed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: