Task #64122
closedOptions for RteFileLinksUpdateWizard in Upgrade Wizard
100%
Description
The 4.5->6.2 Upgrade Wizard often stalls at the "Migrate all file links of RTE-enabled fields to FAL" step, because of found broken file links.
Some are really broken and need to be fixed, but some are just old, e.g. lying in visible CEs on hidden pages.
Of course, it would be good to clean up such unused content upon upgrading, but it can be difficult to figure out what can be deleted, which can disrupt the workflow/schedule.
Is there a way to skip these broken links and proceed to the next step of the upgrade wizard?
Or a better solution?
Files
Updated by Urs Braem over 9 years ago
For easier debugging, I've added a few lines In RteFileLinksUpdateWizard.php, so that the error message can be copied as a csv and also shows the page the CE is on
/** * Tries to fetch the file object corresponding to the given path. * * @param string $path Path to a file (starting with "fileadmin/") * @param array $reference Corresponding sys_refindex entry * @return null|\TYPO3\CMS\Core\Resource\FileInterface */ protected function fetchReferencedFile($path, array $reference) { $fileObject = NULL; if (@file_exists(PATH_site . '/' . $path)) { try { $fileObject = $this->storage->getFile( '/' . str_replace( $this->fileAdminDir, '', $path ) ); } catch (\TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException $notFoundException) { // This should really not happen, since we are testing existence of the file just before $this->errors[] = $path . ' not found (referenced in element ' . $reference['recuid'] . ' of table ' . $reference['tablename'] . ' in field ' . $reference['field'] . ')'; } } else { // Nothing to be done if file not found // edit: show pid of the content element for easier manual fixing $page = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'pid', $reference['tablename'], 'uid = \''.$reference['recuid'].'\'' ); $this->errors[] = 'File not found (page / uid / path / table / field): ' . $page[0]['pid'] . ',' . $reference['recuid'] . ',' . $path . ',' . $reference['tablename'] . ',' . $reference['field']; // end edit } return $fileObject; }
Like this, you can create a spreadsheet, sort via pid and go through all the things manually, even send it to editors to go through:
File not found (page, uid, path, table, field): 174,317,fileadmin/public/Path/to/file/name.pdf,tt_content,bodytext File not found (page, uid, path, table, field): 174,314,fileadmin/public/Path/to/file/name.pdf,tt_content,bodytext
Updated by Markus Klein over 9 years ago
- Tracker changed from Feature to Task
- TYPO3 Version set to 6.2
Can you please push your suggestion to Gerrit?
Updated by Urs Braem over 9 years ago
Ok, I'm onto it, following http://wiki.typo3.org/Contribution_Walkthrough_with_CommandLine. But now I just get the master branch if I do it following the walkthrough.
Can you give me a hand on how to clone and work on theTYPO3_6-2 branch?
http://stackoverflow.com/questions/67699/clone-all-remote-branches-with-git has had me a little confused on that
Updated by Markus Klein over 9 years ago
This patch is a special case, where we don't need a patch for master first. The code does not exist there anymore.
So just you basically need to: * Clone the Core (use http://www.wwwision.de/githelper/) * git checkout TYPO3_6-2 * do your modifications * git commit (http://wiki.typo3.org/CommitMessage_Format_%28Git%29) * git push origin HEAD:refs/for/TYPO3_6-2
Updated by Gerrit Code Review over 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35804
Updated by Urs Braem over 9 years ago
Awesome, thanks a lot, Markus! I think I've got it.
For the first step (Clone the core), I simply used
git clone git://git.typo3.org/Packages/TYPO3.CMS.git typo3_src-git
anything else worked fine with your instructions and the walkthrough.
Updated by Urs Braem over 9 years ago
Ah Markus sorry, I think I was so excited I did this that I replaced the wrong part of the code! :-)
How do I discard that commit from gerrit so I can push the right one?
Or simply do it right and commit again? But with the same commit message?
PS: using sublime, will install a plugin to remove trailing whitespace
Updated by Gerrit Code Review over 9 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 http://review.typo3.org/35805
Updated by Markus Klein over 9 years ago
On gerrit you can abandon a change completely if you don't like it anymore.
If you want to improve one, just push a new patch set but keep the change-id.
The easiest way to do it is to have a clean local branch, then use the download link provided by gerrit (right-top, cherry-pick), pasting the link on the commandline which will then put that very commit on top of the current branch, then edit your files, commit the stuff with "git commit --amend" (which overwrites the last commit) and then push the result back go gerrit as usual. You will finally have a second patch set visible on gerrit. Finally clean your local branch again by reseting it. (e.g. by running 'git reset --hard HEAD~1')
Regarding the IDE. Give PHPStorm a shot (evaluation license). You'll never ever touch sublime (or any other editor) again for PHP programming, I promise. It is worth every cent. Alternatively you may use Netbeans, which is free.
Updated by Gerrit Code Review over 9 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 http://review.typo3.org/35837
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35837
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35837
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35837
Updated by Anonymous over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cceb4449b6fa636cc3d6dddb861a0fb4fc5a4fe3.
Updated by Urs Braem almost 9 years ago
- File Bildschirmfoto 2015-07-09 um 13.42.21.png Bildschirmfoto 2015-07-09 um 13.42.21.png added
- File Bildschirmfoto 2015-07-09 um 13.42.21.png Bildschirmfoto 2015-07-09 um 13.42.21.png added
Hey, that feature seems to be gone again in 6.2.14
Any chance to get it back?
Updated by Urs Braem almost 9 years ago
- File Bildschirmfoto 2015-07-09 um 13.45.47.png Bildschirmfoto 2015-07-09 um 13.45.47.png added
- File Bildschirmfoto 2015-07-09 um 13.45.47.png Bildschirmfoto 2015-07-09 um 13.45.47.png added
Ah no sorry, if you go through the wizard a second time, it's back. Ah!