Generally, the funktionality of converting links works. But I noticed another problem:
(also the problem with file links to not existing files still exists, see #2, but I "worked around" this for now.)
bin/typo3 xray:external-links --dry-run
DRY RUN. This is what would happen:
+-------+------------+--------+----------+--------------------------------------------+-----------------------+
| PID | Table | UID | Field | Found external Link | Would be converted to |
+-------+------------+--------+----------+--------------------------------------------+-----------------------+
| 13493 | tt_content | 147092 | bodytext | | |
| 61656 | tt_content | 299647 | bodytext | | |
| 59 | tt_content | 111 | bodytext | | |
...
| 44744 | tt_content | 178196 | bodytext | https://dev.mydomain.de/studium | t3://page?uid=15145 |
| 44732 | tt_content | 178197 | bodytext | https://dev.mydomain.de/studium | t3://page?uid=15145 |
etc.
- lots of columns are displayed without the URLs (in last 2 columns): 27137
- columns with URLs: 108
Where the URLs are displayed, the result is correct. (Also, if it is run without --dry-run
the links will be converted correctly, at least I verified that in one CE ๐).
- I looked at the first row (content of 147092) where the URLs are not displayed. It is a content element in English (sys_language_uid=1) with content:
<h4>Maps & Directions</h4>
<p class="mit-icon map"><a href="https://dev.mydomain.de/en/contact/">Directions to the University</a></p>
<p class="mit-icon map"><a href="https://dev.mydomain.de/uni/lageplan.php?wo=A5">Site Map Building A5</a></p>
The first link could be converted to a page link (the URL works and page exists).
- The second row where URls are not displayed is 299647 in default language. I don't think the language is the problem because most CE are in default language and most links will be as well.
The content is:
<ul>
<li><strong><a href="https://dev.mydomain.de/adapt-lockin">Climate adaptation policy lock-ins: a 3x3 approach</a></strong></li>
</ul>
The page https://dev.mydomain.de/adapt-lockin exists.
So to sum it up: I don't know the reason right now, I would have to debug but can't do that on this site.
dev.mydomain.de, domain.de are fictional domains. I am working on a copy of the production site mydomain.de with a different dev domain. I converted the links in tt_content.bodytext
in order to test this:
MariaDB> update tt_content set bodytext=REPLACE(bodytext,'"https://mydomain.de/','"https://dev.mydomain.de/') where bodytext like '%https://mydomain.de%';
Query OK, 21913 rows affected (7.274 sec)
Rows matched: 23571 Changed: 21913 Warnings: 0
Because of #2 (problem with links to not existing files), the file links are converted back to the original domain and will not be considered for now:
MariaDB> update tt_content set bodytext=REPLACE(bodytext,'"https://dev.mydomain.de/fileadmin/','"https://mydomain.de/fileadmin/') where bodytext like '%"https://dev.mydomain.de/fileadmin/%';
Query OK, 884 rows affected (7.094 sec)
Rows matched: 884 Changed: 884 Warnings: 0
MariaDB> update tt_content set bodytext=REPLACE(bodytext,'"https://dev.mydomain.de/f/','"https://mydomain.de/f/') where bodytext like '%"https://dev.mydomain.de/f/%';