content_defender icon indicating copy to clipboard operation
content_defender copied to clipboard

TYPO3 13 compatibility

Open simonschaufi opened this issue 1 year ago • 4 comments

Please make this extension compatible with TYPO3 13. Thank you very much!

simonschaufi avatar Feb 20 '24 15:02 simonschaufi

Hi @simonschaufi

I started to try to make content_defender compatible with the current TYPO3 13 releases. You can find the state in https://github.com/IchHabRecht/content_defender/tree/premerge/compatiblity-13 Unfortunately it seems to be much more to migrate and I'm not sure when I find some further time to work on that update again.

IchHabRecht avatar Apr 29 '24 20:04 IchHabRecht

Thank you so much!

It seams like you didn't use TYPO3 Rector as TYPO3 Rector would have dome some migrations in a different way like the GU:_GP.

simonschaufi avatar Apr 29 '24 20:04 simonschaufi

Would be awesome if ^13.4 was allowed in the branch, so we can check and provide feedback / pull requests if issues arise. :)

kevin-appelt avatar Oct 17 '24 06:10 kevin-appelt

@kevin-appelt Feel free to test

IchHabRecht avatar Oct 17 '24 07:10 IchHabRecht

Thanks for the fast adjustment! From what I could see during a quick check: It seems to work fine for backend layouts, but does not work with EXT:container.

Moving a container does only work for empty container elements. As soon as there is content inside, I get "The command "paste" for record "1234" couldn't be executed due to disallowed value(s)." Also inside the container the disallowed values doesn't seem to have any effect. Not sure if this is an issue of EXT:container or EXT:content_defender. Will try to investigate further next week, but wanted to already provide at least some feedback after the quick reaction this morning :)

kevin-appelt avatar Oct 17 '24 14:10 kevin-appelt

Maybe this is related to https://github.com/b13/container/issues/537 ... there is also a related PR (https://github.com/b13/container/pull/541)... maybe that fixes the issue?

599media avatar Oct 25 '24 13:10 599media

Just checked: It doesn't make any difference for my issue.

kevin-appelt avatar Oct 25 '24 13:10 kevin-appelt

Are there any plans for when compatibility will be achieved? Do you need more information or anything else to solve the existing compatibility issues?

kevin-appelt avatar Nov 04 '24 09:11 kevin-appelt

Found the issue: b13/container checks for the version of content defender to register the hooks: https://github.com/b13/container/blob/master/ext_localconf.php#L37 So the version must be >= 3.1.0 or dev-main, but is dev-premerge/compatiblity-13 using the branch and the necessary hooks are not registered. PR: https://github.com/b13/container/pull/556 Patchfile (if someone wants to test): https://patch-diff.githubusercontent.com/raw/b13/container/pull/556.diff

From what I've seen so far, Content Defender seems to work fine with this patch 👍

kevin-appelt avatar Nov 09 '24 13:11 kevin-appelt

I just tried out the content_defender with the example site-package extension and our example project:

  Default {
    title = Standard
    icon = EXT:site_package/Resources/Public/Icons/BackendLayouts/default.svg
    config {
      backend_layout {
        colCount = 1
        rowCount = 3
        rows {
          1 {
            columns {
              1 {
                name = Jumbotron
                colPos = 1
                identifier = jumbotron
                slideMode = slide
                // Only works when ichhabrecht/content-defender is installed
                allowed {
                  CType = text
                }
                maxitems = 1
              }
            }
          }
          ...

Limiting the allowed content elements to CType = text works as expected. However maxitems is not visible in in the page module and the add content element button is still displayed even if there is already a content element:

image

However creating additional content elements is prevented in the next step:

image

linawolf avatar Nov 10 '24 11:11 linawolf

@kevin-appelt Thank you for your verification. As soon as I find the time I will release an updated version.

IchHabRecht avatar Nov 10 '24 20:11 IchHabRecht

@linawolf Is this behaviour different from TYPO3 12.4 - if not this is not related to the TYPO3 13 update. IIRC your mentioned areas do behave the same in lower TYPO3 versions.

IchHabRecht avatar Nov 10 '24 20:11 IchHabRecht

@kevin-appelt Thank you for your verification. As soon as I find the time I will release an updated version.

Any idea, when this will be the case? Is there still anything we can do to help?

kevin-appelt avatar Nov 25 '24 11:11 kevin-appelt

I released a new version 3.5.0

IchHabRecht avatar Dec 01 '24 22:12 IchHabRecht

I just tried out the content_defender with the example site-package extension and our example project:

  Default {
    title = Standard
    icon = EXT:site_package/Resources/Public/Icons/BackendLayouts/default.svg
    config {
      backend_layout {
        colCount = 1
        rowCount = 3
        rows {
          1 {
            columns {
              1 {
                name = Jumbotron
                colPos = 1
                identifier = jumbotron
                slideMode = slide
                // Only works when ichhabrecht/content-defender is installed
                allowed {
                  CType = text
                }
                maxitems = 1
              }
            }
          }
          ...

Limiting the allowed content elements to CType = text works as expected. However maxitems is not visible in in the page module and the add content element button is still displayed even if there is already a content element:

image

However creating additional content elements is prevented in the next step:

image

@linawolf Is this fixed with the new version (3.5.0)?

599media avatar Dec 02 '24 11:12 599media

@599media @linawolf not sure how you think this feature is supported in any way?! There isn't and wasn't any counter so far. So the latest release doesn't change anything here

IchHabRecht avatar Dec 02 '24 12:12 IchHabRecht

Ok, might be I was at error about that feature. I thought it used to be that way.

linawolf avatar Dec 02 '24 12:12 linawolf

@599media @linawolf not sure how you think this feature is supported in any way?! There isn't and wasn't any counter so far. So the latest release doesn't change anything here

Maybe it was a gridelements-only feature?

599media avatar Dec 02 '24 13:12 599media

Might be, everything else works as expected

linawolf avatar Dec 02 '24 13:12 linawolf

I'm closing this issue as I think it is already solved. Feel free to commend or add a new issue.

IchHabRecht avatar Feb 16 '25 22:02 IchHabRecht