Project

General

Profile

Actions

Bug #81804

closed

old linkhandler link-syntax prevents irre records from opening

Added by Anonymous over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-07-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

After upgrading a TYPO3 6.2 with Linkhandler and links to records we upgraded to 7.6 and 8.7.
The updated went smooth except the migration of the old link-formats to new t3://...

We had a few rte links with the old linkhandler syntax which caused the already posted bug "The RecordLinkHandler expects identifier and uid as $parameter configuration." Since we couldn't fix the upgrade wizard we manually converted those rte links.

What we noticed after that, a few textpic content elements had those links inside irre-elements for images (link field).
After we ran the upgrade wizard those old links were still present.

If you now open those irre elements it ends with an 500 error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 2 passed to TYPO3\CMS\Core\Imaging\IconFactory::getIconForRecord() must be of the type array, null given, called in /var/www/vendor/typo3/cms/typo3/sysext/backend/Classes/Form/Element/InputLinkElement.php on line 399 | TypeError thrown in file /var/www/www/vendor/typo3/cms/typo3/sysext/core/Classes/Imaging/IconFactory.php in line 137. Requested URL: http://XXX/typo3/index.php?ajaxID=%2Fajax%2Frecord%2Finline%2Fdetails&ajaxToken=b40a76c63b537258c1209fb24f979c30ca1de664

Sorry since i now have 3 proposals for fixes in the core

1. Link field in sys_file_reference was not migrated to new syntax, which should be possible since its a simple replace of old to new format.
2. If someone got that old syntax or any other unknown link-format that InputLinkElement there shouldn't trigger an exception since you can only fix this by manually change it in the database.
3. Additionally, if the format couldn't be detected, add an icon for this "unknown" link format as indicator to fix it.

As a minimum i would hope for catching this exception since you can only find the source by manually checking the database for this.

Actions #1

Updated by Anonymous over 7 years ago

Additionally if you have this syntax not inside a irre field but directly in a linkfield you even cannot edit the element since it throws the same exception when you open the element for editing (since the same InputLinkElement is used)

Actions #2

Updated by Christian Kuhn about 7 years ago

  • Status changed from New to Needs Feedback

Hmm, as far as i remember, ext:linkhandler adds stuff to the link syntax the core does not handle on its own (correct me if i'm wrong). If that is the case, it would be a task of ext:linkhandler to bring an update wizard moving these specifics over to the new syntax.

Actions #3

Updated by Anonymous about 7 years ago

Thats right, it adds custom linkhandling, the migration is indeed in this case more a task for linkhandler itself. The handling of this exceptions is imho a matter of core. Moreover the problem is only the handling of the icon since the link cannot get parsed by the core and it fires an exception because no available icon can be found.

Actions #4

Updated by Alexander Opitz almost 7 years ago

  • Status changed from Needs Feedback to In Progress

To validate:
In List Module in the Styleguide Tree use "element basic" > "input_29" and use for example "record:ident:tt_content:50000" as value.

Actions #5

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55751

Actions #6

Updated by Alexander Opitz almost 7 years ago

  • Assignee set to Alexander Opitz
Actions #7

Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55751

Actions #8

Updated by Gerrit Code Review almost 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55751

Actions #9

Updated by Alexander Opitz almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55789

Actions #11

Updated by Alexander Opitz almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF