Linkhandler

If there are trouble with the TYPO3 upgrade wizard (here: Row updater: Scan for old “<link>” syntax in richtext and text fields and update to “<a href>”), than you have to update the “<link”-syntax manually :(

Links to Organiser records must updated like in the sample below:

  • Proper link TYPO3 upto 7.6: <link record:tx_org_news:8671>Landesentwicklungsplan: Landrat reagiert gereizt</link>
  • Proper link from TYPO3 8.7: <a href=”t3://record?identifier=tx_org_news&amp;uid=8671>Landesentwicklungsplan: Landrat reagiert gereizt</a>

Because there could be other link tags like <link file:…> or <link http:…> it is possible only to replace the first part of <link record:…> by a SQL statement but not the second part </link>. You must replace the second part manually!

If you know a preg_replace formula, please send me an e-mail, I will publish it.

tt_news

This isn’t any solution. This is a workaround only!

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tt_news%'
OR `header_link` LIKE '%record:tt_news%'
OR `records` LIKE '%<link record:tt_news%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tt_news:', '<link http://:tt_news.')
WHERE `bodytext` LIKE '%<link record:tt_news:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tt_news:', 'http://:tt_news.')
WHERE `header_link` LIKE '%record:tt_news:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tt_news:', '<link http://:tt_news.')
WHERE `records` LIKE '%<link record:tt_news:%';

tx_org_cal

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tx_org_cal%'
OR `header_link` LIKE '%record:tx_org_cal%'
OR `records` LIKE '%<link record:tx_org_cal%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_cal:', '<a href="t3://record?identifier=tx_org_cal&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_cal:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tx_org_cal:', 'href="t3://record?identifier=tx_org_cal&amp;uid=')
WHERE `header_link` LIKE '%record:tx_org_cal:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tx_org_cal:', '<a href="t3://record?identifier=tx_org_cal&amp;uid=')
WHERE `records` LIKE '%<link record:tx_org_cal:%';
SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_cal&amp;uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_cal&amp;uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_cal&amp;uid=%'

tx_org_location

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tx_org_location%'
OR `header_link` LIKE '%record:tx_org_location%'
OR `records` LIKE '%<link record:tx_org_location%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_location:', '<a href="t3://record?identifier=tx_org_location&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_location:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tx_org_location:', 'href="t3://record?identifier=tx_org_location&amp;uid=')
WHERE `header_link` LIKE '%record:tx_org_location:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tx_org_location:', '<a href="t3://record?identifier=tx_org_location&amp;uid=')
WHERE `records` LIKE '%<link record:tx_org_location:%';
SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_location&amp;uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_location&amp;uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_location&amp;uid=%'
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_cal`
WHERE `bodytext` LIKE '%<link record:tx_org_location%'
UPDATE `tx_org_cal`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_location:', '<a href="t3://record?identifier=tx_org_location&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_location:%';
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_cal`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_location&amp;uid=%'

tx_org_headquarters

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tx_org_headquarters%'
OR `header_link` LIKE '%record:tx_org_headquarters%'
OR `records` LIKE '%<link record:tx_org_headquarters%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_headquarters:', '<a href="t3://record?identifier=tx_org_headquarters&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_headquarters:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tx_org_headquarters:', 'href="t3://record?identifier=tx_org_headquarters&amp;uid=')
WHERE `header_link` LIKE '%record:tx_org_headquarters:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tx_org_headquarters:', '<a href="t3://record?identifier=tx_org_headquarters&amp;uid=')
WHERE `records` LIKE '%<link record:tx_org_headquarters:%';
SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_headquarters&amp;uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_headquarters&amp;uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_headquarters&amp;uid=%'
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_cal`
WHERE `bodytext` LIKE '%<link record:tx_org_headquarters%'
UPDATE `tx_org_cal`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_headquarters:', '<a href="t3://record?identifier=tx_org_headquarters&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_headquarters:%';
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_cal`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_headquarters&amp;uid=%'

tx_org_news

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tx_org_news%'
OR `header_link` LIKE '%record:tx_org_news%'
OR `records` LIKE '%<link record:tx_org_news%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_news:', '<a href="t3://record?identifier=tx_org_news&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_news:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tx_org_news:', 'href="t3://record?identifier=tx_org_news&amp;uid=')
WHERE `header_link` LIKE '%record:tx_org_news:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tx_org_news:', '<a href="t3://record?identifier=tx_org_news&amp;uid=')
WHERE `records` LIKE '%<link record:tx_org_news:%';
SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_news&amp;uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_news&amp;uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_news&amp;uid=%'
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_news`
WHERE `bodytext` LIKE '%<link %'
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_news`
WHERE `bodytext` LIKE '%<link record:tx_org_cal%'
UPDATE `tx_org_news`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_cal:', '<a href="t3://record?identifier=tx_org_cal&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_cal:%';
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_news`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_cal&amp;uid=%'
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_news`
WHERE `bodytext` LIKE '%<link record:tx_org_news%'
UPDATE `tx_org_news`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_news:', '<a href="t3://record?identifier=tx_org_news&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_news:%';
SELECT `uid`, `pid`, `title`, `bodytext`
FROM `tx_org_news`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_news&amp;uid=%'

tx_org_repertoire

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tx_org_repertoire%'
OR `header_link` LIKE '%record:tx_org_repertoire%'
OR `records` LIKE '%<link record:tx_org_repertoire%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_repertoire:', '<a href="t3://record?identifier=tx_org_repertoire&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_repertoire:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tx_org_repertoire:', 't3://record?identifier=tx_org_repertoire&amp;uid=')
WHERE `header_link` LIKE '%record:tx_org_repertoire:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tx_org_repertoire:', '<a href="t3://record?identifier=tx_org_repertoire&amp;uid=')
WHERE `records` LIKE '%<link record:tx_org_repertoire:%';
SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_repertoire&amp;uid=%'
OR `header_link` LIKE '%t3://record?identifier=tx_org_repertoire&amp;uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_repertoire&amp;uid=%'

tx_org_staff

SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<link record:tx_org_staff%'
OR `header_link` LIKE '%record:tx_org_staff%'
OR `records` LIKE '%<link record:tx_org_staff%'
UPDATE `tt_content`
SET `bodytext` = REPLACE(`bodytext`, '<link record:tx_org_staff:', '<a href="t3://record?identifier=tx_org_staff&amp;uid=')
WHERE `bodytext` LIKE '%<link record:tx_org_staff:%';
UPDATE `tt_content`
SET `header_link` = REPLACE(`header_link`, 'record:tx_org_staff:', 'href="t3://record?identifier=tx_org_staff&amp;uid=')
WHERE `header_link` LIKE '%record:tx_org_staff:%';
UPDATE `tt_content`
SET `records` = REPLACE(`records`, '<link record:tx_org_staff:', '<a href="t3://record?identifier=tx_org_staff&amp;uid=')
WHERE `records` LIKE '%<link record:tx_org_staff:%';
SELECT `uid`, `pid`, `header`, `header_link`, `bodytext`, `records`
FROM `tt_content`
WHERE `bodytext` LIKE '%<a href="t3://record?identifier=tx_org_staff&amp;uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_staff&amp;uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_staff&amp;uid=%'