Review 9.5 Merged

66575[BUGFIX] Show flag for language "All" in the Page module

Benni Mack CR +2 V +2 Easy +2 −2 updated 11/16/20, 13:26

Commit message

When switching to the "Language" module in the Backend, the module
will show language flags and titles for content elements. However
if the content element has language "All", neither flag, nor title
will be displayed. This change adds the flag and the title.

The fix is contributed by the University of Basel.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Dmitry Dulepov +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Dmitry Dulepov +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1013

  1. Benni Mack commented on patch set 1 11/07/20, 12:21

    Cherry Picked from branch master.
  2. Benni Mack updated the commit message in patch set 2 11/07/20, 12:35

  3. TYPO3com voted on patch set 1 V +1 11/07/20, 12:45 Completed build in 13m 39s on Sat, 7 Nov, 12:45 PM Test Summary: 75192 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-874

  4. TYPO3com voted on patch set 2 V +1 11/07/20, 12:55 Completed build in 19m 04s on Sat, 7 Nov, 12:55 PM Test Summary: 75192 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-875

  5. Oli Bartsch commented on patch set 2 CR -1 11/07/20, 14:11

    Let's just backport the actual changes from https://review.typo3.org/c/Packages/TYPO3.CMS/+/64125 since they add the -1 to $this->siteLanguages, making the manual adaptions and duplicated markup generation superfluous.
  6. Oli Bartsch uploaded patch set 3 11/07/20, 14:18

  7. Oli Bartsch voted on patch set 3 V +1 CR +1 11/07/20, 14:19

  8. Dmitry Dulepov commented on patch set 3 CR -1 11/07/20, 14:28

    > Patch Set 2: Code-Review-1 > > Let's just backport the actual changes from https://review.typo3.org/c/Packages/TYPO3.CMS/+/64125 since they add the -1 to $this->siteLanguages, making the manual adaptions and duplicated markup generation superfluous. No, I seriously disagree with the backport for several reasons: - This is the change of internal behavior in the maintanance version, which should not happen - 9.5 behaves in a certain way and 3rd party code may rely on. With your change you may break their assumptions in the maintanance version => introduce regression. - Have you actually tested this and can you guarantee there will be no side effects? My change did not simply add -1 there because I was afraid of side effects and breaking any 3rd party code, which may not expect to find -1 there.
  9. TYPO3com voted on patch set 3 V +1 11/07/20, 14:32 Completed build in 14m 16s on Sat, 7 Nov, 02:32 PM Test Summary: 75190 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-878

  10. Oli Bartsch commented on patch set 3 11/07/20, 16:25

    > Patch Set 3: Code-Review-1 > > > Patch Set 2: Code-Review-1 > > > > Let's just backport the actual changes from https://review.typo3.org/c/Packages/TYPO3.CMS/+/64125 since they add the -1 to $this->siteLanguages, making the manual adaptions and duplicated markup generation superfluous. > > No, I seriously disagree with the backport for several reasons: > - This is the change of internal behavior in the maintanance version, which should not happen > - 9.5 behaves in a certain way and 3rd party code may rely on. With your change you may break their assumptions in the maintanance version => introduce regression. > - Have you actually tested this and can you guarantee there will be no side effects? My change did not simply add -1 there because I was afraid of side effects and breaking any 3rd party code, which may not expect to find -1 there. Hi thanks for your feedback. What I see, the patch was initially meant for master where the bug doesn't exist, since it was already fixed with the patch I mentioned above. So we only need a fix for v9. So what comes first in mind is to backport the patch which already fixed exactly this bug for master an 10. This patch was already reviewed and is in active use since more than two months. AFAIK there are no reports about regressions (speaking only for PageLayoutView). I totally got your point about not changing internal behaviour in such versions. However PageLayoutView is an internal class and not part of public API. Sure, there are Hooks which expose the class, but `$this->siteLanguages` is a protected property, not meant to be accessed in 3rd party code. It will throw a "Cannot access protected property" error on access. I furthermore checked all usages of this property. It's actually only used for generating the icons/labels, for the language selector, where we skip L<= 0, and for a deprecated property which was previously used to hold the language icons. Since this property is public we should also prevent adding the -1 information here, even if it's deprecated, just to be save. As mentioned in my previous comment, looking at the actual patch seems to me like introducing duplicated code since the information is already added in `getAvailableLanguages`, which is just missing the correct boolean flag. But I won't block this for now, so please feel free to update the patch with your initial fix if you like.
  11. Dmitry Dulepov commented on patch set 3 V +1 CR +1 11/16/20, 11:28

    Thoroughly tested, could not find any side effects. So +1s to the latest patch.
  12. Benni Mack voted on patch set 3 V +2 CR +2 11/16/20, 13:18

  13. Benni Mack merged patch set 4 11/16/20, 13:26