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&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.
Link to files¶
Find links to files.
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 ../%'
OR `header_link` LIKE '%../%'
OR `records` LIKE '%<link ../%'
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&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&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&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&uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_cal&uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_cal&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&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&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&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&uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_location&uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_location&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&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&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&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&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&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&uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_headquarters&uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_headquarters&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&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&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&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&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&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&uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_news&uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_news&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&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&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&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&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&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&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&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&uid=%'
OR `header_link` LIKE '%t3://record?identifier=tx_org_repertoire&uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_repertoire&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&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&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&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&uid=%'
OR `header_link` LIKE '%href="t3://record?identifier=tx_org_staff&uid=%'
OR `records` LIKE '%<a href="t3://record?identifier=tx_org_staff&uid=%'