[BUGFIX] Remove superfluous code from Paste component
The paste buttons in the page layout module are added via a JavaScript component. Since its introduction in #13749, a lot has changed. For example, the Paste component always tried to remove a duplicate declaration of `t3js-page-ce`. However this duplicate class does no longer exist since #85911. Therefore, this code is now removed. Initially the Paste component also checked for an element with class `.icon-actions-document-new`. This was then later changed to check for the class `.t3js-toggle-new-content-element-wizard`. This then resulted in the paste buttons were no longer added as soon as the "New content element wizard" had been turned off. It has to be assumed that this check was initially introduced as a kind of permission check. "No content button > user does not have permissions". On one hand this doesn't look sufficient, on the other hand, this is superfluous since the wrapper class `.t3-page-ce-wrapper-new-ce`, on which the component iterates, is only present if the user has the required edit permissions (at least in fluid based page module). For the PageLayoutView, this would also fail, since `top.pasteAfterLinkTemplate` and `top.this.pasteIntoLinkTemplate` are not available in case of insufficient permissions. In the end, this check is removed, making pasting possible again, in case "New content element wizard" is disabled. Resolves: #95117 Releases: master Change-Id: I48fa4b990a6367d8700b3b7d3c292eb49ad89ab4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71012 Tested-by:core-ci <typo3@b13.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/LayoutModule/Paste.ts 0 additions, 4 deletions...backend/Resources/Public/TypeScript/LayoutModule/Paste.ts
- typo3/sysext/backend/Resources/Public/JavaScript/LayoutModule/Paste.js 1 addition, 1 deletion...backend/Resources/Public/JavaScript/LayoutModule/Paste.js
Please register or sign in to comment