Bug #82865
closedCustom link attributes not working on rte_ckeditor
100%
Description
Adding the corresponding configuration to page TS config can not work as the configuration array expected is parsed on a different way.
Class BrowseLinksController :
line 137
$this->buttonConfig = $this->thisConfig['buttons']['link'] ?? [];
It only works by appending a dot to the array keys like this:
$this->buttonConfig = $this->thisConfig['buttons.']['link.'] ?? [];
Same for lines 192 and 193
The RTE configuration looks like this
RTE {
default {
classesAnchor {
externalLink {
class = external-link
type = url
titleText = Opent een pagina op een andere website
}
}
buttons {
link {
url.properties.class.default = external-link
properties.class.allowedClasses =external-link
}
}
}
This is a very popular and important feature on the RTE and we have got lots of complains because it was working fine on previous versions. I'd really appreciate any feedback.
Updated by Frans Saris about 7 years ago
- Is duplicate of Bug #81381: RTE TSConfig is lost when using own CKEditor preset added
Updated by Frans Saris about 7 years ago
- Status changed from New to Closed
Thanks for looking into this. But this is fixed already see #81381 and is be part of lastest release. Did you try this one with the last released version 8.7.8?
Updated by Tania Morales about 7 years ago
Thanks for the feedback Frans, but I can confirm that the issue is not solved and it can be reproduced on 8.7.8
See may description above please, the only way to make the configuration from page TSconfig work is by adding the dots to the array keys. Which were removed on change set
ca643e75068732a35ca98b180bc7399d53bb1d55 according to bug report https://forge.typo3.org/issues/81381
Updated by Frans Saris about 7 years ago
So we are talking about the same change. Looks like it brought us a regression sadly :(
But that is strange as the tsconfig override didn't work at all before that change.
Your example ts only worked in TYPO3 7 and before or also in the first 8.7 version?
Updated by Tania Morales about 7 years ago
Hi Frans, the example configuration works on 8.7.7, even though is a little buggy.
On 8.7.7 the array keys do have the dot.
When I say buggy is because the link titles values sometimes get scrambled on the link browser forms. I.e the email title value is shown on the internal page title field, and etc . But I think that is related to a JS issue.
Updated by Philipp Müller about 7 years ago
I can confirm this issue in 8.7.8 with rte_ckeditor. With my yaml-configuration the class-selector is lost completely.
classesAnchor.:
externalLink.:
class: 'external-link'
type: 'url'
downloadLink:
class: 'download-link'
type: 'file'
mailLink:
class: 'mail-link'
type: 'mail'
buttons.:
link.:
properties.:
class.:
allowedClasses: 'external-link,download-link,mail-link'
Updated by Frans Saris about 7 years ago
Hi Philipp,
that your yaml doesn't work anymore is correct as it uses a non supported format (the . after every key) that was fixed with #81381. Adding the dots was a workaround to get it working in previous versions.
Frans
Updated by Tania Morales about 7 years ago
Frans Saris wrote:
Are you using CKEditor or the old rte?
Yes, as described on the title of this bug report, the problem occurs on rte_ckeditor from the core.
Updated by Frans Saris about 7 years ago
The whole RTE configuration shifted from pageTS to YAML.
So you need to create your own YAML configuration for some more insides see https://www.slideshare.net/FransSaris/htmlarea-to-ckeditor-creates-presets-and-your-own-plugin
An example of a custom YAML with these settings:
own preset
# Load default processing options imports: - { resource: "EXT:rte_ckeditor/Configuration/RTE/Default.yaml" } classesAnchor: externalLink: class: 'external-link' type: 'url' downloadLink: class: 'download-link' type: 'file' mailLink: class: 'mail-link' type: 'mail' buttons: link: properties: class: allowedClasses: 'external-link,download-link,mail-link'
Editor options can still be overwritten by pageTS see #81880
So currently the options classesAnchor
, blindLinkOptions
, blindLinkFields
, buttons.link
and classes
can not be overwritten from pageTS. Will discus this with the rest of the team to see if this is wanted behavior or a bug.
Updated by Frans Saris about 7 years ago
- Status changed from Closed to In Progress
Updated by Gerrit Code Review about 7 years ago
- Status changed from In Progress to Under Review
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/54511
Updated by Gerrit Code Review about 7 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/54511
Updated by Tania Morales about 7 years ago
- Subject changed from Custom link attributes now working on rte_ckeditor to Custom link attributes not working on rte_ckeditor
Updated by Gerrit Code Review about 7 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/54511
Updated by Gerrit Code Review about 7 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/54511
Updated by Gerrit Code Review about 7 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/54511
Updated by Gerrit Code Review about 7 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/54511
Updated by Gerrit Code Review about 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54511
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54665
Updated by Frans Saris about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset be47f2d869429eacada868acebf703d92bac4e96.
Updated by Gerrit Code Review about 7 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54665
Updated by Gerrit Code Review about 7 years ago
Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54665
Updated by Frans Saris about 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset fe0de963e3db59645b41f8e68a9c07f99c593180.
Updated by Anonymous about 7 years ago
TSConfig like this is working up to TYPO3 8.7.7 - on 8.7.8 its not working anymore!
RTE.default{
preset = al_custom
classesAnchor {
url {
class = link external
type = url
titleText = Opens external link in new window
target = _blank
image =
}
page {
class = link
type = page
titleText = Opens internal link in this window
target = _top
image =
}
file {
class = link download
type = file
titleText = external file
target = _blank
image =
}
folder >
mail {
class = link mail
type = mail
titleText = Email Address
image =
}
}
buttons.link{
page.properties.class.default = link
url.properties.class.default = link external
folder >
file.properties.class.default = link download
mail.properties.class.default = lunk email
properties.class.allowedClasses = link,link external,link email,link download
}
}
Is this by design?? I hope its not! So if its a breaking change it should be at least documented, but hten it had to be shifted latest with 8.7.0!!!
Cant find it here: https://docs.typo3.org/typo3cms/extensions/core/8.7/Changelog/8.7/Index.html#breaking-changes
Greetings!
Updated by Anonymous about 7 years ago
Hi Frans, I did not wrote your commend "Will discus this with the rest of the team to see if this is wanted behavior or a bug." - so I prefer its a bug ;-)
Ok if its fixed in next release its perfect. (and I will not create a new bugreport for this :-) )
Thnx!
Are such breaking bugs documented somerwhere - or is the only way to search the bugtracker?
And the TSConfig stuff for this should be marked as deprecadet for it will be removed in 9?
Updated by Emile Blume almost 7 years ago
The titleText value in the backend does not seem to work either correctly. Once set it is passed over to the next tabs. So, 'Opens a link in the website' is also showed in the tab for External URL and so forth. For now I'm not using predefined titles but it should work by default.
Updated by Mordamir over 6 years ago
Philipp Müller wrote:
I can confirm this issue in 8.7.8 with rte_ckeditor. With my yaml-configuration the class-selector is lost completely.
[...]
Any news on this? I tries with 8.7.13 and this is still not working, so i need to switch back to 8.7.7
Updated by Loon Buster over 6 years ago
..nothing is "done"; what a mess.
who makes this up?!! in a system with its own configuration language (tsc) add another module which is based on a new one (yaml)? the old rte was a already a mess - but at least for that there were workarrounds! there is no explanation how it goes beyond this standard setup - for example:
editor
- disable the annoying wrapping at html tags where it makes no sense (images f.e.) > allowTagsOutside still not working
link browser
- how to remove single riders?
- how can I assign the individual link states: all the same class and additionally assign different classes?
- change the "Allowed media providers" / "Upload Path" (i know there's an hook..)
why do you remove what somehow worked and replace it with something that is rather limited. are you relying on everyone likes beta versions?
.loon
Updated by Emile Blume over 4 years ago
- TYPO3 Version changed from 8 to 10
- PHP Version changed from 7.1 to 7.2
I'm currently looking into some issues for a v10.4 upgrade and noticed that the titleText still isn't working. Has this option been removed or was it never supposed to be used?
classesAnchor:
internalLink:
class: 'internal-link'
type: 'page'
titleText: 'Opent een pagina binnen deze website'
Updated by Stephan Großberndt over 1 year ago
- Assignee deleted (
Gerrit Code Review)
Updated by Stephan Großberndt over 1 year ago
- TYPO3 Version changed from 10 to 8
- PHP Version changed from 7.2 to 7.1
@Emile Blume Please create a new issue if this is still valid.