Bug #80806
closedUpgrade Wizard / Execute database migrations on single rows / Error: The RecordLinkHandler expects identifier and uid as $parameter configuration
100%
Description
When I run "Upgrade Wizard / Execute database migrations on single rows" I get this error
"The RecordLinkHandler expects identifier and uid as $parameter configuration"
I debugged and found that the upgrade wizard calls $linkService->resolve($link) that returns
$linkParts = [ type = "record", url = [ identifier = "tx_ianshop", table = "tx_ianshop_domain_model_product", uid = "2", ] ]
with $link="record:tx_ianshop:tx_ianshop_domain_model_product:2"
then calls $linkService->asString($linkParts)
that calls \TYPO3\CMS\Core\LinkHandling\RecordLinkHandler::asString
that expect an array like
$parameters = [ identifier = "tx_ianshop", uid = "2", ]
instead it receives the array $parameters = $linkParts.
Updated by Morton Jonuschat over 7 years ago
- Has duplicate Bug #80807: Upgrade Wizard / Execute database migrations on single rows / Error: The RecordLinkHandler expects identifier and uid as $parameter configuration added
Updated by Benni Mack over 7 years ago
- Target version changed from 8 LTS to next-patchlevel
Updated by Bernhard Eckl about 7 years ago
Same here when upgrading from 7.6.16 to 8.7.2.
I have the linkhandler extension installed.
Updated by Christoph Lehmann about 7 years ago
A little bit lazy, but works with
if (empty($parameters['identifier']) || empty($parameters['uid'])) {
$new = explode(":", $parameters['value']);
if (count($new) == 2) {
$parameters['identifier'] = $new[0];
$parameters['uid'] = $new[1];
}
}
in typo3_src-8.7.4/typo3/sysext/core/Classes/LinkHandling/RecordLinkHandler.php:39
Updated by Christoph Lehmann about 7 years ago
In the end i think it's not really a core issue and more an extension issue.
Updated by Joerg Kummer over 6 years ago
If you use AOE link handler and have links in your DB entries like
<link record:tx_anyextension_model:123 ...
you need to change these links befor running Upgrade Wizard 'Execute database migrations on single rows' - else this upgrade wizard will never finish its purpose.
Updated by Tobias Schmidt over 6 years ago
If you're right in the middle of an update and need a quick fix for this problem I recommend to apply the following patch to method transformLinkTagsIfFound
in file /typo3/sysext/install/Classes/Updates/RowUpdater/RteLinkSyntaxUpdater.php:180 and run the upgrade wizard again:
$linkParts = $linkService->resolve($link);
if (
array_key_exists('type', $linkParts) &&
$linkParts['type'] === LinkService::TYPE_RECORD &&
array_key_exists('url', $linkParts) &&
is_array($linkParts['url'])) {
$linkParts['identifier'] = $linkParts['url']['identifier'];
$linkParts['uid'] = $linkParts['url']['uid'];
}
$anchorTagAttributes['href'] = $linkService->asString($linkParts);
This just adds an condition to check for links like record:tx_news:tx_news_domain_model_news:1234.
Updated by Marc Bastian Heinrichs over 6 years ago
- Related to Bug #79647: Add hooks to enable extension using the old typoLinkHandler syntax to migrate data added
Updated by Marc Bastian Heinrichs over 6 years ago
Trapped into this, too. Added my patch to #79647
Updated by J. Peter M. Schuler about 6 years ago
Made #note-7 available as https://github.com/jpmschuler/install/commit/e9d12ba38d30635f02f326b0aeae9458589eaebe.patch for easier composer patching in the meanwhile.
As this Install Tool step is mandatory and it throws an exception just because stupid RTE content exists, it is a core issue IMHO. It is okay to not parse the extensions links at all, but chocking to death is a core issue.
Updated by Tizian Schmidlin about 6 years ago
I can confirm that this issue still exists.
I'd propose that, if this cannot be considered a core issue, an update helper extension is built and distributed with the core update (could be registered as require-dev in composer mode), this would probably help some people.
In the meantime JPM's patch seems to work as expected :-)
Updated by Markus Gehrig almost 6 years ago
If the bugfix of Tobias Schmidt and J. Peter M. Schuler isn't working try following Patch:
if ( array_key_exists('type', $linkParts) && $linkParts['type'] === LinkService::TYPE_RECORD && array_key_exists('url', $linkParts) && is_array($linkParts['url']) ) { $linkPartsClean['identifier'] = $linkParts['url']['identifier']; $linkPartsClean['uid'] = $linkParts['url']['uid']; $linkParts = $linkPartsClean; } $anchorTagAttributes['href'] = $linkService->asString($linkParts);
Updated by Markus Klein over 5 years ago
- Status changed from New to Accepted
- Assignee set to Markus Klein
This is a core bug. Issue confirmed.
Updated by Markus Klein over 5 years ago
- Related to Task #66373: Extend typolink to handle record links added
Updated by Markus Klein over 5 years ago
- Related to Task #66374: Ensure the softref parser properly handles record links added
Updated by Gerrit Code Review over 5 years ago
- Status changed from Accepted 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/58964
Updated by Gerrit Code Review over 5 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/58964
Updated by Gerrit Code Review over 5 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/58964
Updated by Gerrit Code Review over 5 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58964
Updated by Gerrit Code Review over 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58964
Updated by Johannes Kasberger over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4766a6f969b1ca4e65fbb620bab59b521ba99b02.
Updated by Gerrit Code Review over 5 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/59046
Updated by Johannes Kasberger over 5 years ago
- Status changed from Under Review to Resolved
Applied in changeset f2be991ba61a891b33c844f626f702160e14247a.