Skip to content
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

Nested Grid Elements Cannot Be Copied and Pasted Correctly in Version 10.1.0 #2201

Open
rtfirst opened this issue Dec 18, 2024 · 5 comments · May be fixed by #2203
Open

Nested Grid Elements Cannot Be Copied and Pasted Correctly in Version 10.1.0 #2201

rtfirst opened this issue Dec 18, 2024 · 5 comments · May be fixed by #2203

Comments

@rtfirst
Copy link

rtfirst commented Dec 18, 2024

I have checked that the bug exists in the dev-development branch
Yes, I get the same error.

I have checked that there are no already open issues or recently closed issues about this bug
Yes

Describe the bug
In version 10.1.0 of the FluidTYPO3 flux extension, it is not possible to correctly copy and paste nested grid elements in the TYPO3 backend. The copied nested grid elements are inserted incorrectly. This issue does not occur in version 10.0.10, where copied entries are correctly inserted during page editing. The content itself is gone.

To Reproduce
Steps to reproduce the behavior:

Go to the TYPO3 backend.
Create a grid element and nest another grid element inside it.
Copy the parent grid element and paste it elsewhere.
Observe that the nested grid elements are incorrectly inserted or not inserted at all.
Expected behavior
The copied parent grid element and its nested child grid elements should be correctly inserted in the page editing view, as is the case in version 10.0.10.

Screenshots
Screenshot 1: Shows the correct behavior in version 10.0.10.
Screenshot 2: Shows the incorrect behavior in version 10.1.0.

Additional context
This issue significantly affects page editing workflows where nested grid elements are used.

Screenshot 1
image

Screenshot 2
image

@rtfirst rtfirst changed the title BUG: foobar fails when baz Nested Grid Elements Cannot Be Copied and Pasted Correctly in Version 10.1.0 Dec 18, 2024
@rtfirst
Copy link
Author

rtfirst commented Dec 20, 2024

@NamelessCoder I'm not sure but maybe this has something to do with the Bugfix #2191

@rupasix
Copy link
Contributor

rupasix commented Jan 7, 2025

I have encountered that issue too. It looks like it's connected with "DoctrineProxy". Error occures on content paste ajax call.
Tested request: /typo3/ajax/record/process?token=705efa6934efc13ddb4645f6954fadec06cf35c6&CB[paste]=tt_content|843&CB[pad]=normal&CB[update][colPos]=1&CB[update][sys_language_uid]=0

SS from stacktrace with dump for query parts ($this->getQueryPart('from')) in vendor/typo3/cms-core/Classes/Database/Query/QueryBuilder.php:1314:

image
image
image

As you see, QueryBuilder needs array of arrays and error occures when only one child is provided. I hope that info helps somehow ;)

@NamelessCoder
Copy link
Member

In previous cases this has been caused by using executeQuery instead of executeStatement (which stupidly handles inputs differently, even though the behavior difference is only related to the return type - but I digress). IIRC there is a corresponding method on the proxy class. Can you try this substitution?

@rupasix
Copy link
Contributor

rupasix commented Jan 7, 2025

@NamelessCoder I've changed https://github.com/FluidTYPO3/flux/blob/development/Classes/Integration/HookSubscribers/DataHandlerSubscriber.php#L166 to DoctrineQueryProxy::executeStatementOnQueryBuilder($queryBuilder) and my test case works as intended now - copying content with nested content elements WORKS.

@NamelessCoder
Copy link
Member

@rupasix Thanks for the confirmation! If you have time, I'd appreciate a pull request - otherwise I'll take care of it next time I have a round of bug fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants