#91734RTE: Wrong href value after import
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.
Reviews 2
Related issues 1
History 510
-
Rémy DANIEL changed Duplicated by #94353 <span data-processor="relativetime" data-value="2024-03-29T17:51:43+00:00" > 03/29/24, 17:51 </span>
-
Rémy DANIEL changed Related to #99978 <span data-processor="relativetime" data-value="2024-03-29T17:52:20+00:00" > 03/29/24, 17:52 </span>
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-06-20T20:12:15+00:00" > 06/20/24, 20:12 </span>
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 -
Gerrit Code Review pushed patch set 1 for main to change 95900 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-17T18:08:53+00:00" > 09/17/26, 18:08 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96156 <span data-processor="relativetime" data-value="2026-09-29T07:19:19+00:00" > 09/29/26, 07:19 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 96156 <span data-processor="relativetime" data-value="2026-09-29T18:58:32+00:00" > 09/29/26, 18:58 </span>
-
Gerrit Code Review pushed patch set 3 for 14.3 to change 96156 <span data-processor="relativetime" data-value="2026-09-30T15:52:52+00:00" > 09/30/26, 15:52 </span>
-
Gerrit Code Review pushed patch set 4 for 14.3 to change 96156 <span data-processor="relativetime" data-value="2026-09-30T16:10:28+00:00" > 09/30/26, 16:10 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-30T16:40:10+00:00" > 09/30/26, 16:40 </span>Applied in changeset commit:17ee80eafaae0b74065891b3dd53b7351f01e661.
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.