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

some object translations lost when importing packages - PATCH

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 4.0.7, 4.1.4, 4.2.0, 4.3.0, 4.4.0alpha1
    • Legacy > Packages
    • None

    Description

      The symptom is as described in the title

      To reproduce reliably:

      • create a package with 1 object, 1 version of it, 2 langs. Check what if the main language set for the object within its xml description in the package file
      • create a 2nd eZ site where the object does not exist, where both of the used languages exist, but where the language that is the object's initial one is 2nd in the list of additional languages
      • import package

      The rationale:

      • ezcontentobject::unserialize creates the object and its version 1 in the main lang of the object as found in package, then calls ezcontenobjecversion::unserialize
      • this second method thinks instead that the object has been created in the main language of the site, so when it tries to add the remaining languages, it looses one

      The fix: please see attachments for a patch. NB: patched files are from ezp 406, as the client that has been experiencing this is stuck at that version.

      The good: there are other unexpected behaviours that have been apparently fixed by the patch above, such as some objects being created with no name when they are imported twice and the second time the option 'keep existing and create new' is chosen. So there might be a couple of related open issues that get closed as a bonus in one fell swoop.

      Attachments

        1. ezcontentobject.gg.php
          238 kB
          Gaetano Giunta
        2. ezcontentobject.gg2.php
          238 kB
          Gaetano Giunta
        3. ezcontentobjectversion.gg.php
          75 kB
          Gaetano Giunta
        4. EZP-16847-5.3.diff
          3 kB
          Gunnstein Lye

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: