Bug #60467
closedRTE does not convert links to uploaded files correctly
0%
Description
When attempting to link to an uploaded file via the RTE "Insert Link" wizard, the resultant link is broken, and looks something like this:
This happens on versions TYPO3 versions 6.2.3 and 6.2.4.
Note:
I disabled all custom RTE settings just in case this was the cause, but the problem remains.
Updated by Steffen Müller over 10 years ago
- Project changed from 1865 to TYPO3 Core
- Is Regression set to No
Updated by Jo Hasenau over 10 years ago
Is this the result in the frontend or the backend - or more correctly: Is this the link, that gets saved to the database, or is it the generated frontend output?
If it's the first, this could be correct, if it's the latter, maybe some TypoScript is missing to render the output correctly.
Updated by Ian Devlin over 10 years ago
The generated frontend output.
Sorry, I, stupidly, completely neglected to mention that this content is being rendered through Fluid and the format.html ViewHelper, so perhaps this is the cause and it is not Core.
Updated by Markus Klein over 10 years ago
- Status changed from New to Needs Feedback
Updated by Ian Devlin over 10 years ago
I'm not sure what feedback you're looking for, but I will tell you what I can.
I have an extension and some content is entered via the RTE.
This inserted content can contain links, which the user enters via TYPO3's Link Wizard.
The content is then displayed on the frontend via the Format HTML ViewHelper.
This ViewHelper does not appear to correctly build the right link to the file.
The database field stores the inserted link as follows: <a title="Initiates file download" class="download" href="http://website.de/?file:128">Link to File</a>
The generated link looks as follows: http://website.de/?file:128
Normal content elements work fine, it is just the Format HTML ViewHelper that does not.
Perhaps this isn't a bug, perhaps I'm doing something wrong, but I would have thought that the Format HTML ViewHelper would support TYPO3 generated links? Am I missing something here?
Updated by Ian Devlin over 10 years ago
Ok, after further testing it appears that is is indeed <f:format.html>
that is failing to correctly convert file links to a correct URL.
I have also tested this on 6.1.1, 6.2.2, 6.2.3, and 6.2.4 and they all exhibit the same issue.
I can file a different bug if you want, which is more accurate, and close this one? Either way some feedback would be good, and this is a major problem I think, so a patch would be ideal.
Updated by Ian Devlin over 10 years ago
Ok you can close this, this specific behaviour is not a bug as the TCA for the RTE field was misconfigured, although the default for ANY RTE field should be to use the RTEHtmlParser! It shouldn't have to be manually set, but that's a different issue altogether.
Updated by Alexander Opitz over 10 years ago
- Status changed from Needs Feedback to Closed
Updated by Frank Gerards over 10 years ago
What was the wron configuration ? Can you give details ? We got the same behavior...
Updated by Ian Devlin over 10 years ago
Hi, I should have been clearer on what I need to fix, sorry about that. So for those who have the same issue:
I had to set a value for defaultExtras
in the TCA configuration file for the extension. e.g.
'info' => array(
'exclude' => 1,
'label' => 'TEXT LABEL',
'config' => array(
'type' => 'text',
'cols' => 40,
'rows' => 5,
'eval' => 'trim',
),
'defaultExtras' => 'richtext[*]:rte_transform[mode=ts_links]'
),
It's the value for defaultExtras
that was key.
Updated by Mario Näther about 10 years ago
Ian Devlin wrote:
Hi, I should have been clearer on what I need to fix, sorry about that. So for those who have the same issue:
I had to set a value for
defaultExtras
in the TCA configuration file for the extension. e.g.
'info' => array(
'exclude' => 1,
'label' => 'TEXT LABEL',
'config' => array(
'type' => 'text',
'cols' => 40,
'rows' => 5,
'eval' => 'trim',
),
'defaultExtras' => 'richtext[*]:rte_transform[mode=ts_links]'
),It's the value for
defaultExtras
that was key.
Hi,
the solution with :rte_transform[mode=ts_links]
at defaultExtras
working fine on my TYPO3 6.2.4