-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maxitems Error by copy #471
Comments
I ran into the same problem today on TYPO3 v11.5 with ext:container v2.3.6. So I played around with it a bit: When I try to copy a CE from a container column which has
Copying the CE to any other place like right before a container always works fine (if this is not also directly behind another non-empty container). Copying a CE from a column with On top of this, for each try to copy a CE and getting the error, the assets or image field content of the original CE gets duplicated. This also prevents me from copying a whole container with all columns set to I tested this with CE in the default language and without translation. And last but not least, if I drag & drop a CE out of a I thought it might be connected to #383. So I dug into it a bit. (well ok, it was a whole night 😀) At some point in Let's look at some values in this array:
If we copy directly after a container
If we copy into a container
From this array we work with the values
Since So either the data given to the function in the Also I did not find out how this connects to the assets / image field duplication, but if we do not get the error this is not an issue anyways. Unfortunately I do not know the extension well enough to provide a patch, but maybe someone more experienced can take over from here with the information I found. |
Hi @ghedeon-work , @pitscribble , sorry for late answer.
and the container uid 1 is an an backend-layout column with maxitems=1
i have tested with TYPO3 12 and container 2.3.6 PHP 8.2, on a vanilla TYPO3 with EXT:container, EXT:container_example and EXT:content_defender second example in this issue, i have
with b13-2cols-with-header-container colPos 202 has maxitems=1
a db dump with minimal content elements on a vanilla installation (with the 3 extensions mentioned above) and a description copy to would help me to reproduce your described bugs |
As for my problem (other than for @ghedeon-work) the be-layout-section maxitems setting it not relevant, only the container columns ones. Unfortunately I currently cannot provide a DB dump, but it's really easy to recreate: Preparation
Now, to get some errors, try:
I hope that helps. |
ok, thanks, i can at least confirm first example, i will look at it, but maxitems is a "little complecated" (as you can see here https://github.com/b13/container/blob/master/Tests/Functional/Datahandler/ContentDefender/MaxItemsTest.php). i think this will me cost "some time" |
Thanks. As I wrote in my first comment is seems to check for reached maxitems in the wrong space. If I can help with anything, feel free to reach out. |
when operating on container elements no datamaphook for content_defender should be executed Fixes: #471
Hi @pitscribble , test bugfix/471 branch |
I tested the bugfix-branch in different setups in TYPO3 v11 and v12 and everything (besides 4, as you wrote) seems to work fine. Thank you so much for this bugfix! |
I get a "reached maxitems configuration of 1" error by copying one content element into a container without any maxitems configuration, which is found inside a backend layout section which has a maxitems limitation.
BackendLayout:
Container:
Content Elements Structure:
Page
|- BackendLayout Cell 1
|-- Teaser Slider (Container)
|--- CE#1
|--- CE#2
|--- CE#2
|- BackendLayout Cell 2
...
Creating a new element after CE#2 works fine, but copy a new element after CE#2 or any of the CE`s throws an error of "reached maxitems configuration of 1", even though there is no maxitems defined for the container.
P.S.
If i remove the maxitems config from the backend_layout, everything works normal.
Somehow Container takes the maxitems config from the parent instead.
The text was updated successfully, but these errors were encountered: