Project

General

Profile

Actions

Bug #51800

closed

6.1.4 Update wizard fails at step "Migrate all file links of RTE-enabled fields to FAL" for pdf documents

Added by Johannes Engel over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2013-09-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Update wizard 6.1.3 -> 6.1.4 fails for all pdf documents with an error message like this:
fileadmin/user_files/XYZ.pdf not found in referenced element (uid: 42 of table tt_content in field bodytext). Reference index was probably out of date.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #57143: The "Migrate all file links of RTE-enabled fields to FAL" upgrade wizard doesn't handle links with whitespace correctClosed2014-03-21

Actions
Related to TYPO3 Core - Bug #59133: Error while converting RTE enabled fields to FALClosed2014-05-27

Actions
Actions #1

Updated by Ernesto Baschny over 10 years ago

  • Status changed from New to Needs Feedback
  • Assignee deleted (Helmut Hummel)
  • Target version deleted (next-patchlevel)
  • Is Regression set to No

The Upgrade Wizard requires an up-to-date refindex, so before upgrading you need to go to DB Tools and "Check Reference Index".

Note that you don't need to run the Upgrade Wizard when you are updating a patchlevel version (6.1.3 -> 6.1.4), only if you are migrating from a minor version (6.0 -> 6.1 or 4.7 -> 6.2).

Can you please re-check if this is really a problem and give us more information of your scenario in case you think it is?

Actions #2

Updated by Johannes Engel over 10 years ago

The reference index was checked before, result was:

*******************************************
Reference Index being TESTED (nothing written, use "-e" to update)
*******************************************
Record sys_file:404 had 1 added indexes and 0 deleted indexes
Record sys_file:405 had 1 added indexes and 0 deleted indexes
Record tt_content:267 had 1 added indexes and 1 deleted indexes
Record tt_content:270 had 1 added indexes and 1 deleted indexes
Record tt_content:271 had 1 added indexes and 1 deleted indexes
Record tt_content:276 had 1 added indexes and 1 deleted indexes
Record tt_content:277 had 1 added indexes and 1 deleted indexes
Record tt_content:279 had 1 added indexes and 1 deleted indexes
Record tt_content:281 had 1 added indexes and 1 deleted indexes
45993 records from 33 tables were checked/updated.
Updates: 9

I did not think so far that this was the intended behaviour, thus reported it in order to get it fixed.

Actions #3

Updated by Markus Klein over 10 years ago

  • Status changed from Needs Feedback to New
Actions #4

Updated by Satish Maurya about 10 years ago

  • Assignee set to Markus Klein

Hi,

I am getting same issue after upgrading from 4.7 to 6.1.7. Is there any solution to fix it?

Thanks

Johannes Engel wrote:

The reference index was checked before, result was:
[...]
I did not think so far that this was the intended behaviour, thus reported it in order to get it fixed.

Actions #5

Updated by Markus Klein about 10 years ago

  • Assignee deleted (Markus Klein)
Actions #6

Updated by Markus Klein about 10 years ago

Can this be reproduced on 6.2 master?

Actions #7

Updated by Markus Klein about 10 years ago

  • Status changed from New to Needs Feedback
Actions #8

Updated by Anonymous about 10 years ago

I had the same issue upgrading from 6.0 to 6.1
I found, that the script is doing a preg_match with $</link ... in line 211 of typo3/sysext/install/Classes/Updates/RteFileLinksUpdateWizard.php

$regularExpression = '$<(link ' . $reference['ref_string'] . ').*>$';

In the database, where it fails to update, the entry had an uppercase LINK, so the regular expression failed.

Changing line 211 to an case insensitive search

$regularExpression = '$<(link ' . $reference['ref_string'] . ').*>$i';

resolved the problem for over 94 entries which were all like this.

I hope this helps.

Oli

Actions #9

Updated by Tizian Schmidlin almost 10 years ago

The final solution to this issue should look like this:

$regularExpression = '$<(link ' . str_replace('%2F','/',urlencode($reference['ref_string'])) . ').*>$';
Actions #10

Updated by Markus Klein almost 10 years ago

Tizian, but your solution is not case insensitive anymore.

Actions #11

Updated by Marcel Gaetje almost 10 years ago

I had the same Issue with upgrading from 4.5.32 to 6.2.3.

Setting the search in line 207 in RteFileLinksUpdateWizard.php to case insensitive worked for me.

old code:
$regularExpression = '$<(link ' . str_replace(' ', '%20', $reference['ref_string']) . ').*>$';

new code:
$regularExpression = '$<(link ' . str_replace(' ', '%20', $reference['ref_string']) . ').*>$i';

Actions #12

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from Needs Feedback 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/30820

Actions #13

Updated by Gerrit Code Review almost 10 years ago

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

Actions #14

Updated by Markus Klein almost 10 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF