Giter Site home page Giter Site logo

core_upgrader's Issues

[BUG] from TYPO3 8.7 to 11.5 the MigratePagesLanguageOverlayUpdate::updateInlineRelations() is not done

TYPO3 11.5 does not have the $GLOBALS['TCA']['pages_language_overlay'].
Moreover TYPO3 11.5 has a method, which unsets $GLOBALS['TCA']['pages_language_overlay'] if it is defined See: .

https://github.com/TYPO3/typo3/blob/dd291132d7414a6914ed5ab31c2bb32df88addef/typo3/sysext/core/Classes/Migrations/TcaMigration.php#L176-L185

    /**
     * Removes $TCA['pages_language_overlay'] if defined.
     *
     * @param array $tca
     * @return array the modified TCA structure
     */
    protected function migratePagesLanguageOverlayRemoval(array $tca)
    {
        if (isset($tca['pages_language_overlay'])) {
            $this->messages[] = 'The TCA table \'pages_language_overlay\' is'
                . ' not used anymore and has been removed automatically in'
                . ' order to avoid negative side-effects.';
            unset($tca['pages_language_overlay']);
        }
        return $tca;
    }

Proposed solution

I would propose do add this behavior to the README.md and to add the possibility to provide the $GLOBALS['TCA']['pages_language_overlay'] from old project.

Currently we resolved that issue by patch:

diff --git a/Classes/Updates/v95/MigratePagesLanguageOverlayUpdate.php b/Classes/Updates/v95/MigratePagesLanguageOverlayUpdate.php
--- a/Classes/Updates/v95/MigratePagesLanguageOverlayUpdate.php	(revision 5f01904e3407f457943f1d9e9fef2182c48899c1)
+++ b/Classes/Updates/v95/MigratePagesLanguageOverlayUpdate.php	(date 1679660582484)
@@ -104,6 +104,7 @@
      */
     public function executeUpdate(): bool
     {
+        require GeneralUtility::getFileAbsFileName('EXT:our-sitepackage/Configuration/TCA/Overrides/pages_language_overlay.php');
         // Warn for TCA relation configurations which are not migrated.
         if (isset($GLOBALS['TCA']['pages_language_overlay']['columns'])
             && is_array($GLOBALS['TCA']['pages_language_overlay']['columns'])
@@ -123,6 +124,7 @@
         $this->mergePagesLanguageOverlayIntoPages();
         $this->updateInlineRelations();
         $this->updateSysHistoryRelations();
+        unset($GLOBALS['TCA']['pages_language_overlay']);
         return true;
     }

with contents on EXT:our-sitepackage/Configuration/TCA/Overrides/pages_language_overlay.php from our TYPO3 8.7 instance, which must be upgraded.
The extraction of $GLOBALS['TCA']['pages_language_overlay'] can be done on TYPO3 8.7 instance with following snipped in some of available commands:

        $tcaForPages_language_overlay = var_export(
            $GLOBALS['TCA']['pages_language_overlay'],
            true
        );
        file_put_contents('./TCA-for-pages_language_overlay.php', $tcaForPages_language_overlay);
        return 0;

After the TYPO3 11.5+ is live, the files can be removed.

Depends on: #6

Upgrade command breaks scheduler "add task" form

TYPO3 version: 10.4.9 (composer)

I'm getting the following error when trying to create a new scheduler task:

TypeError
strpos() expects parameter 1 to be string, null given

in /var/www/html/vendor/helhum/typo3-console/Classes/Console/Mvc/Cli/CommandDispatcher.php line 95

It seems that your UpgradeCommand needs a cli environment to be loaded correctly as it calls CommandDispatcher::createFromCommandRun() in its constructor, leading to the error above in non-cli.

To clarify, I did not try to add your command as a scheduler task. The error happens once you open the form to add new tasks. Maybe just exclude it from scheduler?

[BUG] coreupgrader:upgrade command ignores the sys_registry entries

By running the coreupgrader:upgrade multiple times, TYPO3 executes the upgrade wizards despite of sys_registry entries for that script, even without --force flag in command.

Following happens on second run:

An exception occurred while executing 'SELECT COUNT(`hash`) FROM `sys_refindex` WHERE (`ref_table` = ?) AND (`softref_key` = ?) AND (`deleted` = ?)' with params ["_FILE", "typolink_tag", 0]:  
                                                                                                                                                                                                  
  Unknown column 'deleted' in 'where clause'  

Expected behavior:
Take care of sys_registry entries and do not execute the wizard if it is marked as executed and the --force flag is not set.

Versions:

  • TYPO3 v 11.5
  • core_upgrader versions -> state of PR #5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.