Skip to content
Snippets Groups Projects
Commit 28c1f8cc authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[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: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 0742875f
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment