Project

General

Profile

Actions

Bug #42882

closed

FileDoesNotExistException thrown in update

Added by Franz Holzinger over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2012-11-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

The install tool update step 2 or 3 from TYPO3 4.7 to 6.0 ends up in an uncaught exception if an image file is not found. There is no folder "_migrated".

Uncaught TYPO3 Exception

TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException thrown in file
/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php in line 400.

7 TYPO3\CMS\Core\Resource\Driver\AbstractDriver::getFile("_migrated/pics/nattier043_w.jpg")

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/core/Classes/Resource/ResourceStorage.php:

00793: */
00794: public function getFile($identifier) {

00795: return $this->driver->getFile($identifier);

00796: }
00797:

6 TYPO3\CMS\Core\Resource\ResourceStorage::getFile("_migrated/pics/nattier043_w.jpg")

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/install/Classes/Updates/TceformsUpdateWizard.php:

00199: rename($sourcePath, $targetPath);
00200: // get the File object

00201: $file = $this->storage->getFile($fieldConfiguration['targetPath'] . $item);

00202: if ($file instanceof \TYPO3\CMS\Core\Resource\File) {
00203: $fields = array(

5 TYPO3\CMS\Install\Updates\TceformsUpdateWizard::migrateField("tt_content", array, "image", array)

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/install/Classes/Updates/TceformsUpdateWizard.php:

00147: foreach ($records as $record) {
00148: foreach ($fieldsToMigrate as $field) {

00149: $dbQueries = array_merge($this->migrateField($table, $record, $field, $tableConfiguration[$field]));

00150: }
00151: }

4 TYPO3\CMS\Install\Updates\TceformsUpdateWizard::performUpdate(array, "")

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/install/Classes/Installer.php:

05761: $dbQueries = array();
05762: $databaseQueries = array();

05763: if ($tmpObj->performUpdate($dbQueries, $customOutput)) {

05764: $performUpdateMarkers['updateStatus'] = 'Update successful!';
05765: } else {

3 TYPO3\CMS\Install\Installer::updateWizard_parts("performUpdate")

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/install/Classes/Installer.php:

05599: // call wizard
05600: $action = $this->INSTALL['database_type'] ? $this->INSTALL['database_type'] : 'checkForUpdate';

05601: $this->updateWizard_parts($action);

05602: $this->output($this->outputWrapper($this->printAll()));
05603: }

2 TYPO3\CMS\Install\Installer::updateWizard()

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/sysext/install/Classes/Installer.php:

00539: $this->checkDatabase();
00540: $this->silent = 0;

00541: $this->updateWizard();

00542: break;
00543: case 'config':

1 TYPO3\CMS\Install\Installer::init()

/var/www/mydomain/web/typo3_src-6.0.0rc1/typo3/install/index.php:

00080: require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install') . 'mod/class.tx_install.php';
00081: $install_check = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\Installer', TRUE);

00082: $install_check->init();

00083: ?>


Files

not-migrated.png (52 KB) not-migrated.png Dmitry Dulepov, 2012-12-05 10:54

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #42859: missing extension icons for lots of core extensionsClosed2012-11-12

Actions
Related to TYPO3 Core - Bug #43509: "Migrate all file relations from tt_content.image and pages.media" fails on missing fileClosed2012-12-02

Actions
Actions #1

Updated by Andreas Wolf over 11 years ago

Does the whole folder "_migrated" not exist or just the file? And does the file uploads/pics/nattier043_w.jpg exist/did it exist before the update?

What I'm trying to find out: Did the migration fail completely or was it just a missing file that did not exist before the update.

Actions #2

Updated by Andreas Wolf over 11 years ago

  • Category set to File Abstraction Layer (FAL)
  • Status changed from New to Needs Feedback
  • Assignee set to Andreas Wolf
  • Target version set to 6.0.0
Actions #3

Updated by Franz Holzinger over 11 years ago

There is a folder ~/web/fileadmin/_migrated/pics. Maybe this one is correct.
However it contains only 2 image files. Much too few for this homepage.
The install tool's update process is broken. There is no option to continue from here.
The file "uploads/pics/nattier043_w.jpg" does not exist. Apperently this file has been removed before the update. But the install tool should not stop in such a case or offer to remove the image automatically.

Actions #4

Updated by Klaus Hinum over 11 years ago

Same here, step
Migrate all file relations from tt_content.image and pages.media
stops after a missing image and wont continue.

Actions #5

Updated by Franz Holzinger over 11 years ago

This happens in the install tool.

Step 2 - Configuration of updates

Migrate all file relations from tt_content.image and pages.media

Actions #6

Updated by Andreas Wolf over 11 years ago

  • Status changed from Needs Feedback to Accepted
  • Target version changed from 6.0.0 to 6.0.0-RC2

Ok, I think we should automatically remove files which are not present and note this in the syslog.

Actions #7

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16533

Actions #8

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16533

Actions #9

Updated by Klaus Hinum over 11 years ago

still not fixed in 6.0.0RC2

Actions #10

Updated by Christian Eßl over 11 years ago

still not fixed in 6.0
impossible to proceed the update process from there.

Actions #11

Updated by Klaus Hinum over 11 years ago

same here, cant update to 6.0

Actions #12

Updated by Andreas Wolf over 11 years ago

Right, this is not fixed - but there is a patch. I'd be glad if you tested it in your environment to see if it works with the patch. If yes, please vote for it, so we get it in for 6.0.1.

Actions #13

Updated by Franz Holzinger over 11 years ago

I have applied this patch:

https://review.typo3.org/#/c/16533/2/typo3/sysext/install/Classes/Updates/TceformsUpdateWizard.php,unified

Then it ends up in this error message:

Fatal error: Class '\\TYPO3\CMS\Core\Log\LogManager' not found in /var/www/mydomain/web/typo3_src-6.0.0/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4155

This is wrong:

public function construct() {
/** @var $logManager \TYPO3\CMS\Core\Log\LogManager */
$logManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('\TYPO3\CMS\Core\Log\LogManager');
$this->logger = $logManager->getLogger(__CLASS
);
}

Fix:
==> $logManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Log\\LogManager');

And after this, the
Step 2 - Configuration of updates

I get:

Migrate all file relations from tt_content.image and pages.media
Update successful!

So make this bugfix and I can vote. But where do I vote?

Actions #14

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16533

Actions #15

Updated by Andreas Wolf over 11 years ago

  • Target version changed from 6.0.0-RC2 to 6.0.1
  • Complexity set to easy

Franz Holzinger wrote:

So make this bugfix and I can vote. But where do I vote?

I'll upload a revised version of the patch in a minute. You could just give you +1 on "code review" and "verified" in Gerrit. The login is your usual typo3.org login as used for Forge and all other services.

Actions #16

Updated by Stefan Neufeind over 11 years ago

On gerrit it was mentioned that the fix under review here seems to also fix #43509. Please consider in tests or when finally closing this bug here.

Actions #17

Updated by Dmitry Dulepov over 11 years ago

Added a way to show what was NOT migrated. See the screenshot.

Actions #18

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16533

Actions #19

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17489

Actions #20

Updated by Anonymous over 11 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF