Bug #53650

Upgrade Wizard for FAL references SQL error on missing tables

Added by Ernesto Baschny over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Category:
Install Tool
Target version:
Start date:
2013-11-14
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

If you have some sys_file_references pointing to tables that no longer exist in your installation (some extension that was deleted and the tables also deleted), you end up with SQL errors in the Install Tool when calling the Upgrade Wizards:

caller    TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery
ERROR Table 'typo3.buggy_table' doesn't exist
lastBuiltQuery SELECT uid, pid FROM buggy_table WHERE uid=0 AND pid<>0 LIMIT 1

So the proposal is to use the same upgrade wizard which is already cleaning sys_file_reference to get rid of these buggy entries, while also fixing this SQL error bug.

How to reproduce?

Simply add a row to sys_file_reference with "pid=0" and "tablenames" pointing to some tablename that doesn't exist.

Associated revisions

Revision b2c79153 (diff)
Added by Ernesto Baschny over 5 years ago

[TASK] Upgrade Wizard for FAL references, check for missing tables

In case sys_file_reference contains references to tables that no longer
exist physically (i.e. for extensions that were deinstalled and tables
then deleted through "Database Compare"), the sys_reference_table
upgrade wizard now no longer fails with an exception. Instead the buggy
rows will be deleted from the table.

Resolves: #53650
Releases: 6.2
Change-Id: I6a95b4abef77848de3ed97a1cf9b212434be7c98
Reviewed-on: https://review.typo3.org/25414
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny

History

#1 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/25414

#2 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/25414

#3 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/25414

#4 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/25414

#5 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/25414

#6 Updated by Ernesto Baschny over 5 years ago

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

#7 Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF