1. 25 Nov, 2021 4 commits
  2. 24 Nov, 2021 5 commits
    • Oliver Bartsch's avatar
      [BUGFIX] Make selectCheckBox work with readOnly · 8a455d39
      Oliver Bartsch authored
      Using "readOnly" for a TCA field with renderType
      "selectCheckBox" previously led to the fact, that
      nothing was rendered at all. This can be seen with
      `tx_styleguide_elements_select.select_checkbox_4`.
      
      This is now fixed, while the whole element got a
      light code cleanup. This will increase performance
      a bit, since unneeded JavaScript is no longer loaded.
      
      Additionally, this also fixes the "expandAll" option,
      which was broken due to the bootstrap 5 upgrade.
      
      Resolves: #96058
      Resolves: #96068
      Releases: master, 11.5
      Change-Id: I762d328c9f4c83558dd8fd98683f8ccfe6c4b3f0
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72279
      
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      8a455d39
    • Christian Kuhn's avatar
      [BUGFIX] Better sys_refindex with workspace mm · 3801adce
      Christian Kuhn authored
      This fixes issues regarding sys_refindex handling when dealing
      with workspace mm relations. Various DataHandler tests run with
      disabled refindex check after performing mm related operations.
      All those are enabled now, so all known issues in this area
      are fixed.
      
      The patch touches various areas in DataHandler, ReferenceIndex
      and RelationHandler to achieve this.
      
      The key changes are triggered by a database scenario that is
      unique for mm relations. Usually, when creating a workspace record
      or overlay, child record overlays (for instance inline children)
      are also created in this workspace.
      
      For mm records, this can be different: When the local or foreign
      side of a record is created in a workspace, it does not necessarily
      mean that a connected opposite side is also created as workspace
      overlay.
      
      This would otherwise create the need for a recursive operation that
      would basically end up with "everything" being created as workspace
      overlay. However, mm table entries are created for these relations,
      leading to a situation that a workspace record can point to a
      non-workspace record through the mm table.
      
      Reference index entries for mm table connections are always handled
      from the 'local' side. For instance, with categories, 'sys_category'
      table is the local side, with 'pages', 'tt_content' and others
      being the foreign side. If now one of the records on the foreign
      side gets a workspace overlay record, sys_refindex rows of all
      connected records of the affected local side need to be created.
      This can lead to the funny situation that we end up with refindex
      rows that point from a non-workspace to a non-workspace record,
      but have a non-0 workspace entry. Those additional rows are needed
      to have "the full set" and proper sorting when looking at refindex
      of such a relation from the local side.
      
      The patch basically handles especially these 'foreign side has
      a workspace overlay' scenarios, plus the side effects that
      have to be taken care of when discarding and publishing these
      records.
      
      Additionally, a couple of side effects are tackled: First, the
      ReferenceIndex->updateIndex() - that's the main logic when
      running cli referenceindex:update command - is tuned to drop
      reference index entries related to meanwhile deleted workspaces.
      This is covered with additional tests and is done now since
      the code needs to iterate over existing workspaces for local-side
      mm records that may have workspace overlays on the foreign side.
      So most of the code had to be created now anyways.
      
      RelationHandler->readMM() receives a fix for a long standing bug
      (Issue #83582, introduced by #57169), to no longer show workspace
      relations in live when looking at local-side records, for instance
      when looking at category items in live when one of the connected
      items has a workspace overlay.
      
      Next to lots of comments explaining details in place and
      referencing the test cases that nail specific scenarios, a
      couple of @todo's are added to point out things we may
      want to tackle in the future.
      
      All in all, the patch resolves a series of issues that will
      especially lead to 'categories' being much more reliable in
      workspaces.
      
      Change-Id: I24407f93665852fa761f6fbe6c5ab249473468d2
      Related: #57169
      Resolves: #83582
      Resolves: #96067
      Releases: master, 11.5
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72250
      
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
      Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      3801adce
    • Oliver Bartsch's avatar
      [BUGFIX] Make belayoutwizard TSconfig preview readonly · 7958bf70
      Oliver Bartsch authored
      With #94222, the TSconfig preview of a TCA field with
      renderType= belayoutwizard was adjusted to use the
      CodeMirror plugin - in case EXT:t3editor is installed.
      
      With this change, also the default "preview" was changed
      form a <code> element to a <textarea>. This therefore led
      to the field being editable. However, any manual change
      will always be overwritten on adjusting the grid via the editor
      or on saving the record.
      
      To avoid confusion for the user and to be in line with
      the CodeMirror variant, the previous behaviour is restored
      by adding the readonly attribute to the <textarea> element.
      
      Resolves: #96064
      Related: #94222
      Releases: master, 11.5
      Change-Id: Iaa41df59cbfd0420962c2239a42d329c249adb6c
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72278
      
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      7958bf70
    • Oliver Bartsch's avatar
      [BUGFIX] Do not use hardcoded field name for belayoutwizard · e8a3ea87
      Oliver Bartsch authored
      TCA renderType=belayoutwizard did previously not
      work for custom fields, as can be seen in styleguide
      `tx_styleguide_elements_basic.text_20`.
      
      BackendLayoutWizardElement used the hardcoded
      field name "config", which however is only used for
      the "backend_layout" table. Additionally, using the
      raw database value instead of the processed
      "itemFormElValue" led to further issues, e.g. when
      the field is defined with "l10n_display=defaultAsReadonly".
      
      This is now fixed by using the "itemFormElValue",
      since this is the correct value, which is also added
      to the corresponding input field and would also
      contain the "default" for new records.
      
      Additionally, the given parsed itemFormElValue is
      now checked to start with the correct root level
      key "backend_layout.". This prevents undefined
      array key warnings, triggered when a malformed
      default value is used for the field.
      
      Resolves: #96060
      Releases: master, 11.5
      Change-Id: I2d7c40bf3b33d6d2528c7575febe67d105ab5e12
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72276
      
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      e8a3ea87
    • Oliver Bartsch's avatar
      [BUGFIX] Observe GridEditor visibility to refresh codeMirror · 04b5ffcf
      Oliver Bartsch authored
      In case a TCA field with renderType=belayoutwizard
      is configured to be not in the initially visible tab, the
      CodeMirror editor remains empty, when switching to
      the tab, containing the editor. The reason is, CodeMirror
      needs to be refreshed, after becoming visible.
      
      Therefore, the GridEditor, holding the configuration,
      is now observed, if not initially visible. As soon as it
      becomes visible, the CodeMirror instance - if any -
      is refreshed.
      
      Can be tested with `tx_styleguide_elements_basic.text_20`.
      
      Resolves: #96062
      Releases: master, 11.5
      Change-Id: Ic03c315e8f12bc2f3623fdb11a1782d5c1081a23
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72277
      
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
      Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      04b5ffcf
  3. 23 Nov, 2021 6 commits
  4. 22 Nov, 2021 4 commits
  5. 21 Nov, 2021 1 commit
  6. 20 Nov, 2021 1 commit
  7. 19 Nov, 2021 8 commits
  8. 18 Nov, 2021 8 commits
  9. 17 Nov, 2021 3 commits