Bug #49036
closedAllow custom active tabs in RTE element browser
100%
Description
At the moment the RTE offers hooks to render custom tabs in the element browser (\TYPO3\CMS\Rtehtmlarear
).
But even if the a hook in \*TYPO3\CMS\Recordlist\Browser\ElementBrowser::parseCurUrl()* sets a value for "act" it will be overwritten to "url" if the "data-htmlarea-external" flag is TRUE
.
A simple solution would be to introduce an additional flag that prevents overwriting the "act" value.
I'll provide a patch to make the problem more clear.
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21346
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21347
Updated by Alexander Stehlik over 11 years ago
Please look at https://review.typo3.org/21346 for reviewing.
The second patch belongs to I different issue. I mixed up the numbers in the commit message :(
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21346
Updated by Gerrit Code Review almost 11 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21346
Updated by Stanislas Rolland almost 11 years ago
Alexander Stehlik wrote:
At the moment the RTE offers hooks to render custom tabs in the element browser (
\TYPO3\CMS\Rtehtmlarear
).But even if the a hook in \*TYPO3\CMS\Recordlist\Browser\ElementBrowser::parseCurUrl()* sets a value for "act" it will be overwritten to "url" if the "data-htmlarea-external" flag is
TRUE
.
parseCurUrl() is NOT always able to detect that the url is considered external, in particular in multi-domain setups. Therefore the attribute data-htmlarea-external is set whenever the link is set using the "External url" tab. If such link is to be edited, the active tab must necessarily be "External url", don't you think?
Updated by Gerrit Code Review almost 11 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21346
Updated by Gerrit Code Review almost 11 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21346
Updated by Gerrit Code Review almost 11 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21346
Updated by Alexander Stehlik almost 11 years ago
This issue can be closed. The problem was caused by an invalid use of the "data-htmlarea-external" attribute.
When custom links are used this attribute must not be set, otherwise the system thinks the link is external.
There are two places where you need to take care that the attribute is not set:
- The JavaScript code that inserts the link. You can use
link_spec()
because it will remove the "data-htmlarea-external" attribute - Additionally you need to hook into the RteHtmlParser (
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksRte_PostProc']
) to make sure that the attribute is not re-inserted when the data is loaded into the RTE
For an example implementation of the hook you can have a look at https://github.com/Intera/typo3-extension-linkhandler/commit/41d29fdf30e46fa6d101af232fd1c51a9b8cda30
EDIT: You actually can use link_spec().
Updated by Gerrit Code Review almost 11 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27680
Updated by Alexander Stehlik almost 11 years ago
Finally tracked down a bug that caused the problems in the first place.
Please change the tracker to "bug".
parse_url()
will return "record" as scheme for linkhandler links and RteHtmlParser::TS_links_rte()
will than treat the link as external even if it is an internal link.
Please see the new changeset for a possible fix: https://review.typo3.org/27680
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27680
Updated by Francois Suter over 10 years ago
- Tracker changed from Feature to Bug
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27680
Updated by Gerrit Code Review over 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27680
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30975
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30976
Updated by Alexander Stehlik over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b81d415848a4a7e396614c396b7a3ca2a6e7bbe2.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed