Ergebnis 1 bis 7 von 7

Thema: Nach Composer Update Webseite offline (ERROR 500)

  1. #1
    Contao-Nutzer
    Registriert seit
    19.04.2018.
    Beiträge
    36

    Fehler Nach Composer Update Webseite offline (ERROR 500)

    Hallo zusammen,
    kann jemand mit dieser Fehlermeldung etwas anfangen?

    Code:
    PHP Fatal error:  Uncaught Error: Undefined class constant 'VERSIONS' in /var/www/vhosts/xxx.de/httpdocs/vendor/contao/core-bundle/src/DependencyInjection/Compiler/AddPackagesPass.php:32
    Stack trace:
    #0 /var/www/vhosts/xxx.de/httpdocs/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php(140): Contao\CoreBundle\DependencyInjection\Compiler\AddPackagesPass->process()
    #1 /var/www/vhosts/xxx.de/httpdocs/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php(789): Symfony\Component\DependencyInjection\Compiler\Compiler->compile()
    #2 /var/www/vhosts/xxx.de/httpdocs/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(643): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
    #3 /var/www/vhosts/xxx.de/httpdocs/vendor/contao/manager-bundle/src/HttpKernel/ContaoKernel.php(250): Symfony\Component\HttpKernel\Kernel->initializeContainer()
    #4 /var/www/vhosts/xxx.de/httpdocs/vendor/symfony/symfony/src/S in /var/www/vhosts/campus-bike.de/httpdocs/vendor/contao/core-bundle/src/DependencyInjection/Compiler/AddPackagesPass.php on line 32

    Der Fehler liegt wohl an einem Composer Update, dass nicht abgeschlossen werden kann:

    Code:
    $ /opt/plesk/php/7.4/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=UTC /var/www/vhosts/xxx.de/httpdocs/web/contao-manager.phar.php composer install --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
    Using config.component-dir has been deprecated. Please use extra.contao-component-dir instead.
    Installing dependencies from lock file
    Verifying lock file contents can be installed on current platform.
    Nothing to install, update or remove
    Package contao-components/compass is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/highlight is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/html5shiv is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/mediaelement is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/respimage is abandoned, you should avoid using it. No replacement was suggested.
    Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
    Package leafo/scssphp is abandoned, you should avoid using it. Use scssphp/scssphp instead.
    Package league/uri-hostname-parser is abandoned, you should avoid using it. No replacement was suggested.
    Package league/uri-manipulations is abandoned, you should avoid using it. No replacement was suggested.
    Package league/uri-schemes is abandoned, you should avoid using it. No replacement was suggested.
    Package oyejorge/less.php is abandoned, you should avoid using it. No replacement was suggested.
    Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Package sensio/distribution-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package sensiolabs/security-checker is abandoned, you should avoid using it. Use https://github.com/fabpot/local-php-security-checker instead.
    Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package terminal42/header-replay-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
    Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
    Generating optimized autoload files
    Class Sensio\Bundle\FrameworkExtraBundle\Tests\Request\ParamConverter\ArgumentNameConverterTest located in ./vendor/sensio/framework-extra-bundle/Tests/Request/ArgumentNameConverterTest.php does not comply with psr-4 autoloading standard. Skipping.
    ocramius/package-versions: Generating version class...
    ocramius/package-versions: ...done generating version class
    contao/manager-plugin: Dumping generated plugins file...
    contao/manager-plugin: ...done dumping generated plugins file
    Could not open input file: vendor/bin/contao-setup
    Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddExpressionLanguageProvidersPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php does not comply with psr-4 autoloading standard. Skipping.
    Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddParamConverterPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddParamConverterPassTest.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class Contao\ManagerPlugin\PluginLoader located in ./vendor/contao/manager-plugin/src/Resources/PluginLoader.php does not comply with psr-4 autoloading standard. Skipping.
    45 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    > @php vendor/bin/contao-setup
    Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1
    # Process terminated with exit code 1
    # Result: General error
    (Der Contao Manager lässt sich nur noch im abgesicherten Modus aufrufen.)

    Die Webseite meines Kunden ist seit dem offline, deswegen wäre ich über jede Idee sehr dankbar!

    Viele Grüße
    Daniel
    Geändert von dan-com (07.11.2022 um 08:19 Uhr)

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.116
    Partner-ID
    10107

    Standard

    Bist du wirklich noch auf Contao 4.5? Wenn ja solltest du auf 4.9 aktualisieren.
    » sponsor me via GitHub or PayPal or Revolut

  3. #3
    Contao-Nutzer
    Registriert seit
    19.04.2018.
    Beiträge
    36

    Standard

    Hab jetzt versucht auf 4.9 zu updaten. Folgender Fehler wird dann geworfen:


    Code:
    composer require contao/manager-bundle=4.9.* contao/news-bundle=4.9.* contao/calendar-bundle=4.9.* contao/faq-bundle=4.9.* contao/comments-bundle=4.9.* contao/newsletter-bundle=4.9.* contao/listing-bundle=4.9.*
    
    $ /opt/plesk/php/7.4/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=UTC /var/www/vhosts/campus-bike.de/httpdocs/web/contao-manager.phar.php composer require contao/manager-bundle=4.9.* contao/news-bundle=4.9.* contao/calendar-bundle=4.9.* contao/faq-bundle=4.9.* contao/comments-bundle=4.9.* contao/newsletter-bundle=4.9.* contao/listing-bundle=4.9.* contao/conflicts=*@dev --no-update --no-scripts --prefer-stable --sort-packages --no-ansi --no-interaction
    Using config.component-dir has been deprecated. Please use extra.contao-component-dir instead.
    /var/www/vhosts/campus-bike.de/httpdocs/composer.json has been updated
    # Process terminated with exit code 0
    # Result: OK
    
    composer update contao/conflicts contao/manager-bundle contao/news-bundle contao/calendar-bundle contao/faq-bundle contao/comments-bundle contao/newsletter-bundle contao/listing-bundle --no-install --no-scripts
    
    > Resolving dependencies using Composer Cloud v3.5.1
    [5.0MiB/0.16s] Loading composer repositories with package information
    [68.4MiB/6.99s] Updating dependencies
    [128.9MiB/7.49s] Your requirements could not be resolved to an installable set of packages.
    [128.9MiB/7.49s] 
      Problem 1
        - contao-community-alliance/composer-plugin 3.0.9 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
        - numero2/contao-storelocator v4.1.1 requires contao-community-alliance/composer-plugin 3.* -> satisfiable by contao-community-alliance/composer-plugin[3.0.9].
        - numero2/contao-storelocator is locked to version v4.1.1 and an update of this package was not requested.
    [128.9MiB/7.50s] <warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>
    [37.6MiB/7.55s] Memory usage: 37.6MB (peak: 180.65MB), time: 7.55s.
    [37.6MiB/7.55s] Finished Composer Cloud resolving.
    # Cloud Job ID kDCJdED11camJdfNiPSHg0TknLxfg2PRfBKqvOiElVhz0EpaRpKHVZzIobH37SBmga5GpkDmuawmBqmhZkYTlKQLtoNr failed
    composer install

  4. #4
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.116
    Partner-ID
    10107

    Standard

    Du musst deine composer.json manuell editieren, die Contao Version entsprechend ändern, speichern, dann in der Systemwartung des Contao Managers "Composer Update ausführen".
    » sponsor me via GitHub or PayPal or Revolut

  5. #5
    Contao-Nutzer
    Registriert seit
    19.04.2018.
    Beiträge
    36

    Standard

    Hab die Composer.json folgendermaßen editiert:
    Code:
    {
        "name": "contao/managed-edition",
        "type": "project",
        "description": "Contao Open Source CMS",
        "license": "LGPL-3.0-or-later",
        "authors": [
            {
                "name": "Leo Feyer",
                "homepage": "https://github.com/leofeyer"
            }
        ],
        "require": {
            "php": "^7.1",
            "christianbarkowsky/tabcontrol": "^3.0",
            "contao/calendar-bundle": "^4.5",
            "contao/comments-bundle": "^4.5",
            "contao/faq-bundle": "^4.5",
            "contao/listing-bundle": "^4.5",
            "contao/manager-bundle": "4.5.*",
            "contao/news-bundle": "^4.5",
            "contao/newsletter-bundle": "^4.5",
            "hschottm/tags": "^4.0",
            "madeyourday/contao-rocksolid-slider": "^2.0",
            "numero2/contao-storelocator": "^4.1"
        },
        "config": {
            "component-dir": "assets"
        },
        "extra": {
            "branch-alias": {
                "dev-4.9": "4.9.x-dev"
            },
            "public-dir": "web"
        },
        "scripts": {
            "post-install-cmd": [
                "@php vendor/bin/contao-setup"
            ],
            "post-update-cmd": [
                "@php vendor/bin/contao-setup"
            ]
        }
    }
    (Also nur unter "branch-alias" die Version erhöht)
    Ist das so richtig?


    Erhalte dann wieder den gleichen Fehler (siehe erster Beitrag)
    Code:
    composer install
    
    $ /opt/plesk/php/7.4/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=UTC /var/www/vhosts/campus-bike.de/httpdocs/web/contao-manager.phar.php composer install --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
    Using config.component-dir has been deprecated. Please use extra.contao-component-dir instead.
    Installing dependencies from lock file
    Verifying lock file contents can be installed on current platform.
    Nothing to install, update or remove
    Package contao-components/compass is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/highlight is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/html5shiv is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/mediaelement is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/respimage is abandoned, you should avoid using it. No replacement was suggested.
    Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
    Package leafo/scssphp is abandoned, you should avoid using it. Use scssphp/scssphp instead.
    Package league/uri-hostname-parser is abandoned, you should avoid using it. No replacement was suggested.
    Package league/uri-manipulations is abandoned, you should avoid using it. No replacement was suggested.
    Package league/uri-schemes is abandoned, you should avoid using it. No replacement was suggested.
    Package oyejorge/less.php is abandoned, you should avoid using it. No replacement was suggested.
    Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Package sensio/distribution-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package sensiolabs/security-checker is abandoned, you should avoid using it. Use https://github.com/fabpot/local-php-security-checker instead.
    Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package terminal42/header-replay-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
    Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
    Generating optimized autoload files
    Class Sensio\Bundle\FrameworkExtraBundle\Tests\Request\ParamConverter\ArgumentNameConverterTest located in ./vendor/sensio/framework-extra-bundle/Tests/Request/ArgumentNameConverterTest.php does not comply with psr-4 autoloading standard. Skipping.
    Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddExpressionLanguageProvidersPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php does not comply with psr-4 autoloading standard. Skipping.
    Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddParamConverterPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddParamConverterPassTest.php does not comply with psr-4 autoloading standard. Skipping.
    ocramius/package-versions: Generating version class...
    ocramius/package-versions: ...done generating version class
    contao/manager-plugin: Dumping generated plugins file...
    contao/manager-plugin: ...done dumping generated plugins file
    Could not open input file: vendor/bin/contao-setup
    Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
    Class Contao\ManagerPlugin\PluginLoader located in ./vendor/contao/manager-plugin/src/Resources/PluginLoader.php does not comply with psr-4 autoloading standard. Skipping.
    45 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    > @php vendor/bin/contao-setup
    Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1
    # Process terminated with exit code 1
    # Result: General error
    Geändert von dan-com (07.11.2022 um 16:22 Uhr)

  6. #6
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.116
    Partner-ID
    10107

    Standard

    Zitat Zitat von daniel-stahl.com Beitrag anzeigen
    (Also nur unter "branch-alias" die Version erhöht)
    Ist das so richtig?
    Nein, du musst die contao/* Pakete erhöhen. Bzw. es reicht auch
    Code:
    "contao/manager-bundle": "4.5.*",
    auf
    Code:
    "contao/manager-bundle": "4.9.*",
    zu ändern.

    Und
    Code:
        "scripts": {
            "post-install-cmd": [
                "@php vendor/bin/contao-setup"
            ],
            "post-update-cmd": [
                "@php vendor/bin/contao-setup"
            ]
        }
    musst du zurück ändern auf https://github.com/contao/managed-ed...r.json#L30-L37
    » sponsor me via GitHub or PayPal or Revolut

  7. #7
    Contao-Nutzer
    Registriert seit
    19.04.2018.
    Beiträge
    36

    Standard

    Das Update hat funktioniert!

    Webseite wieder online!

    Juhuu

    Vielen Dank Spooky !!!

    (Spende ging raus )
    Geändert von dan-com (07.11.2022 um 18:43 Uhr)

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •