Bug #91734
openRTE: Wrong href value after import
0%
Description
When a text content element contains a mailto or tel link the mailto: and tel: prefix get dropped from the href tag when importing data. Example:
A text content element has the following source code in the bodytext:
<p>Telefon: <a href="tel:###ppCustomerContactPhone###">###ppCustomerContactPhone###</a><br />
Email: <a href="mailto:###ppCustomerContactEmail###">###ppCustomerContactEmail###</a></p>
The exported data.xml file contains:
<tablerow index="tt_content:314" type="array">
<fieldlist index="data" type="array">
<field index="uid" type="integer">314</field>
<field index="rowDescription" type="NULL"></field>
<field index="pid" type="integer">1</field>
...
<field index="CType">text</field>
<field index="header">Kundeninfo</field>
<field index="header_position"></field>
<field index="bodytext"><p><strong>###ppCustomerCompany###</strong><br /> ###ppCustomerContactAddress###<br /> ###ppCustomerContactZip### ###ppCustomerContactCity###</p>
<p>Telefon: <a href="tel:###ppCustomerContactPhone###">###ppCustomerContactPhone###</a><br /> Email: <a href="mailto:###ppCustomerContactEmail###">###ppCustomerContactEmail###</a></p></field>
<field index="bullets_type" type="integer">0</field>
...
<rec index="314" type="array">
<uid>314</uid>
<pid>1</pid>
<title>Kundeninfo</title>
<relations index="rels" type="array"></relations>
<softrefs type="array">
<softref_element index="bodytext:typolink_tag:1" type="array">
<field>bodytext</field>
<spKey>typolink_tag</spKey>
<matchString><a href="tel:###ppCustomerContactPhone###"></matchString>
<subst type="array">
<type>string</type>
<tokenID>e5acf469af1b3ce38253cfa2ee6a0dfb</tokenID>
<tokenValue>###ppCustomerContactPhone###</tokenValue>
</subst>
</softref_element>
<softref_element index="bodytext:typolink_tag:3" type="array">
<field>bodytext</field>
<spKey>typolink_tag</spKey>
<matchString><a href="mailto:###ppCustomerContactEmail###"></matchString>
<subst type="array">
<type>string</type>
<tokenID>3e83d0c92e2d088b9c22c29cc9ac8cd9</tokenID>
<tokenValue>###ppCustomerContactEmail###</tokenValue>
</subst>
</softref_element>
</softrefs>
</rec>
After importing the data the text field contains the following source data:
<p>Telefon: <a href="###ppCustomerContactPhone###">###ppCustomerContactPhone###</a><br />
Email: <a href="###ppCustomerContactEmail###">###ppCustomerContactEmail###</a></p>
The imported data doesn't contain any more the tel: or mailto: prefix.
Updated by Rémy DANIEL 8 months ago
I confirm the issue on TYPO3 12
It's an issue within the \TYPO3\CMS\Core\DataHandling\SoftReference\TypolinkTagSoftReferenceParser::parse()
method, which discard anything found into the href except the email address.
Updated by Rémy DANIEL 8 months ago
- Has duplicate Bug #94353: Importing mailto and tel links added
Updated by Rémy DANIEL 8 months ago
- Related to Bug #99978: Element browser: subject/body params for mailto links are not possible / fail validation added
Updated by Riccardo De Contardi 5 months ago
I write here Georg Ringer's comment https://forge.typo3.org/issues/94353#note-1 to keep track of it
wouldn't it make more sense as ###ppCustomerContactPhone### is added on demand (i guess) to just add the tel: there as prefix as well?
as the linkservice does check the syntax, I guess it fails and for me this sounds quite correct