Details

      Description

      I think there are many problems with alwaysavailable management :

      • when creating a content, the language_id column in ezcontentobject_name table is not set properly when alwaysavailable is true (cf EzcDatabase::setName()) : no alwaysavailable management for the content names
      • when updating a content, the language_id in ezcontentobject_name and ezcontentobject_attribute tables is not set correctly (cf EzcDatabase::updateAlwaysAvailableFlag()) : all the corresponding rows, in any language is set alwaysavailable for the current version, not only the initial_language_id

      As a result, the language management mays fail in many circumstances.

      Please find a patch proposal attached (based on eZPublish 5.0, I quickly took a look in 5.1 sources and it seems affected too)

      1. EzcDatabase.patch
        4 kB
        Benjamin Plaquevent

        Issue Links

          Activity

          Hide
          Filip Božanović added a comment -

          I believe this is the same issue I'm having - in 5.4, the alwaysAvailable flag is respected only when creating objects via the administration (legacy). Any manual, custom creates/publishes, such as registration forms, simply have their alwaysAvailable set to false (Core/Repository/ContentService/ContentService->createContent).

          Of course, this can be set manually, but I would expect that class defaults are respected for the metadata.

          Show
          Filip Božanović added a comment - I believe this is the same issue I'm having - in 5.4, the alwaysAvailable flag is respected only when creating objects via the administration (legacy). Any manual, custom creates/publishes, such as registration forms, simply have their alwaysAvailable set to false (Core/Repository/ContentService/ContentService->createContent). Of course, this can be set manually, but I would expect that class defaults are respected for the metadata.
          Hide
          André Rømcke added a comment - - edited

          Merged fix for setName: https://github.com/ezsystems/ezpublish-kernel/commit/6e86c9480ccb06f046b0d478420c788fc30183cc

          Open question if updateAlwaysAvailableFlag( is still affected. /cc Sebastian Blank

          Show
          André Rømcke added a comment - - edited Merged fix for setName: https://github.com/ezsystems/ezpublish-kernel/commit/6e86c9480ccb06f046b0d478420c788fc30183cc Open question if updateAlwaysAvailableFlag( is still affected. /cc Sebastian Blank

            People

            • Assignee:
              Andrzej Longosz
              Reporter:
              Benjamin Plaquevent
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: