Bug #60467

RTE does not convert links to uploaded files correctly

Added by Ian Devlin over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-07-22
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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:

http://website.com/?file:128

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.

History

#1 Updated by Steffen Müller over 5 years ago

  • Project changed from Logging Project to TYPO3 Core
  • Is Regression set to No

#2 Updated by Jo Hasenau over 5 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.

#3 Updated by Ian Devlin over 5 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.

#4 Updated by Markus Klein over 5 years ago

  • Status changed from New to Needs Feedback

#5 Updated by Ian Devlin over 5 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?

#6 Updated by Ian Devlin over 5 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.

#7 Updated by Ian Devlin over 5 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.

#8 Updated by Alexander Opitz over 5 years ago

  • Status changed from Needs Feedback to Closed

#9 Updated by Frank Gerards about 5 years ago

What was the wron configuration ? Can you give details ? We got the same behavior...

#10 Updated by Ian Devlin about 5 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.

#11 Updated by Mario Näther almost 5 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

Also available in: Atom PDF