I inherited a broken Drupal 9 site. Drush could not be made to work, so I deleted the vendor directory, renamed composer.lock and reinstalled. This has worked for me before on broken sites. Now I whitescreen when I log onto the site (which works well for anonymous users)
Because I still don't have drush, and I can't log in to the site, I can't flush the cache.
Running mysite.com/update.php shows an error saying I need PHP 8.0. I'm on a shared host and upgrading php aby a major verison seems dangerous.
When I try to revert with composer require drupal/core-recommended:9.3.6 I get
Problem 1
- Can only install one of: twig/twig[v2.15.3, v2.14.11].
- Can only install one of: twig/twig[v2.14.11, v2.15.3].
- Can only install one of: twig/twig[v2.14.11, v2.15.3].
- drupal/core-recommended 9.3.6 requires twig/twig v2.14.11 -> satisfiable by twig/twig[v2.14.11].
- Installation request for drupal/core-recommended 9.3.6 -> satisfiable by drupal/core-recommended[9.3.6].
- Installation request for twig/twig (locked at v2.15.3) -> satisfiable by twig/twig[v2.15.3].
I've deleted composer.lock and explicitly removed twig/twig with composer remove twig/twig
.
There has to be a way to salvage this, but nothing seems to work.
The composer.json looks like this:
{
"name": "vardot/varbase-project",
"version": "dev-master",
"version_normalized": "9999999-dev",
"require": {
"ajaxorg/ace-builds": "master",
"components/highlightjs": "^9.16",
"composer/installers": "~1.0 || ~2.0",
"cweagans/composer-patches": "^1.7",
"drupal/address": "^1.9",
"drupal/adminimal_theme": "^1.6",
"drupal/asset_injector": "^2.7",
"drupal/bootstrap": "^3.23",
"drupal/captcha": "^1.2",
"drupal/ckeditor_media_embed": "^1.10",
"drupal/config_direct_save": "^2.1",
"drupal/content_moderation_notifications": "^3.3",
"drupal/core-composer-scaffold": "^9",
"drupal/core-project-message": "^9",
"drupal/devel_entity_updates": "^3.0",
"drupal/dropzonejs": "^2.5",
"drupal/drupal-library-installer-plugin": "^0.3.0",
"drupal/easy_breadcrumb": "^2.0",
"drupal/easy_install": "^10.5",
"drupal/entity_browser": "^2.6",
"drupal/entity_clone": "^1.0@beta",
"drupal/entity_print": "^2.4",
"drupal/features": "^3.12",
"drupal/fontawesome": "^2.19",
"drupal/fontyourface": "^3.6",
"drupal/google_analytics": "^3.1",
"drupal/google_analytics_reports": "^3.0@RC",
"drupal/google_tag": "^1.4",
"drupal/honeypot": "^2.0",
"drupal/image_resize_filter": "^1.1",
"drupal/jquery_ui_checkboxradio": "^1.2",
"drupal/l10n_client": "^1.0@alpha",
"drupal/libraries": "^3.0@beta",
"drupal/login_destination": "^2.0@beta",
"drupal/mail_edit": "2.0.x-dev",
"drupal/mailchimp": "^2.0",
"drupal/memcache": "^2.3",
"drupal/menu_block": "^1.7",
"drupal/menu_position": "^1.0@beta",
"drupal/migrate_file_to_media": "^2.0",
"drupal/migrate_tools": "^5.0",
"drupal/node_edit_protection": "^1.0",
"drupal/panelizer": "^4.4",
"drupal/password_policy": "^3.0",
"drupal/pathologic": "^1.0@alpha",
"drupal/permissions_by_term": "^3.1",
"drupal/recaptcha": "^3.0",
"drupal/recreate_block_content": "^2.1",
"drupal/redirect_after_login": "^2.7",
"drupal/redis": "^1.5",
"drupal/rename_admin_paths": "^2.0",
"drupal/responsive_menu": "^4.4",
"drupal/rules": "3.x-dev",
"drupal/scheduler": "^1.4",
"drupal/search_api_page": "^1.0@beta",
"drupal/seckit": "^2.0",
"drupal/security_review": "1.x-dev",
"drupal/sendgrid_integration": "^1.7",
"drupal/slick": "^2.3",
"drupal/smtp": "^1.0",
"drupal/tour_ui": "^1.0@beta",
"drupal/tvi": "^1.0@RC",
"drupal/twig_tweak": "^3.1",
"drupal/type_style": "^1.0",
"drupal/typed_data": "^1.0@alpha",
"drupal/varbase_total_control": "^9.0",
"drupal/video_embed_field": "^2.4",
"drupal/video_embed_media": "^2.4",
"drupal/video_embed_wysiwyg": "^2.4",
"drupal/views_bootstrap": "^4.3",
"drupal/views_field_formatter": "^1.13",
"drupal/views_field_view": "^1.0@beta",
"drupal/we_megamenu": "^1.13",
"drupal/webform": "^6.0",
"drupal/webform_mailchimp": "^5.9",
"drupal/weight": "^3.3",
"enyo/dropzone": "^5.9",
"kenwheeler/slick": "^1.6",
"mbostock/d3": "^3.5",
"mikehaertl/phpwkhtmltopdf": "^2.5",
"oomphinc/composer-installers-extender": "^2.0",
"tecnickcom/tcpdf": "^6.4",
"vardot/varbase": "^9.0",
"vardot/varbase-updater": "^2.0",
"webflo/drupal-finder": "^1.2",
"webmozart/path-util": "^2.3",
"drupal/views_fieldsets": "3.x-dev",
"drupal/jquery_ui_datepicker": "^1.1",
"drupal/jquery_ui_accordion": "^1.1",
"drupal/jquery_ui_draggable": "^1.2",
"drupal/jquery_ui_droppable": "^1.2",
"drupal/purge": "^3.2",
"drupal/varnish_purge": "^2.1",
"drupal/quick_node_clone": "^1.14",
"drupal/antibot": "^2.0",
"drupal/flood_control": "^2.2",
"drupal/config_filter": "^2.4"
},
"conflict": {
"drupal/drupal": "*"
},
"require-dev": {
"mglaman/drupal-check": "^1.1"
},
"type": "project",
"extra": {
"drupal-scaffold": {
"allowed-packages": [
"drupal/core"
],
"locations": {
"web-root": "web/"
}
},
"patches": {
"drupal/l10n_client": {
"#3178812 - Drupal 9 Compatibility for l10n_client module": "https://www.drupal.org/files/issues/2020-10-25/3178812_l10n_client_d9_compatibility_fixes.patch"
}
},
"patches-ignore": [],
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Varbase codebase </>",
"<bg=blue;fg=white> from the vardot/varbase-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/installing-drupal",
" * Read the user guide: https://docs.varbase.vardot.com",
" * Get support: https://www.vardot.com/en/form/get-support-varbase",
" * Join Our Slack Team for Feedback and Support:",
" http://slack.varbase.vardot.com",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
},
"_readme": [
"NOTICE: We're now using composer patches from Vardot repository to suggest",
"several fixes and better handling of patches in your Drupal project.",
"You'll notice that we have included (https://github.com/vardot/composer-patches)",
"in this composer.json repositories. This will replace the original",
"library (cweagans/composer-patches) with our own from (vardot/composer-patches).",
"See https://github.com/cweagans/composer-patches/pull/243 and more details",
"on our changes on the composer-patches package. Once our changes get merged,",
"we will revert to using (cweagans/composer-patches) without this override."
],
"branch-alias": {
"dev-9.0.x": "9.0.x-dev",
"dev-10.0.x": "10.0.x-dev"
},
"installer-types": [
"bower-asset",
"npm-asset"
],
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/profiles/{$name}": [
"type:drupal-profile"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
],
"web/themes/contrib/{$name}": [
"type:drupal-theme"
],
"web/libraries/slick": [
"npm-asset/slick-carousel"
],
"web/libraries/ace": [
"npm-asset/ace-builds"
],
"web/libraries/jquery-ui-touch-punch": [
"bower-asset/jqueryui-touch-punch"
],
"web/libraries/swagger-ui/dist": [
"npm-asset/swagger-ui-dist"
],
"web/libraries/{$name}": [
"type:drupal-library",
"type:bower-asset",
"type:npm-asset"
],
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
],
"drush/contrib/{$name}": [
"type:drupal-drush"
]
},
"drupal-libraries": {
"library-directory": "web/libraries",
"libraries": [
{
"name": "objectfitpolyfill",
"package": "bower-asset/objectfitpolyfill"
},
{
"name": "chartjs",
"package": "bower-asset/chartjs"
},
{
"name": "c3",
"package": "bower-asset/c3"
},
{
"name": "d3",
"package": "bower-asset/d3"
},
{
"name": "dropzone",
"package": "npm-asset/dropzone"
},
{
"name": "blazy",
"package": "npm-asset/blazy"
},
{
"name": "slick",
"package": "npm-asset/slick-carousel"
},
{
"name": "ace",
"package": "npm-asset/ace-builds"
},
{
"name": "jquery-ui-touch-punch",
"package": "bower-asset/jqueryui-touch-punch"
},
{
"name": "imagesloaded",
"package": "npm-asset/imagesloaded"
},
{
"name": "swagger-ui",
"package": "npm-asset/swagger-ui-dist"
}
]
},
"enable-patching": true,
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
}
},
"scripts": {
"post-install-cmd": [
"Varbase\\composer\\ScriptHandler::createRequiredFiles",
"Varbase\\composer\\ScriptHandler::removeGitDirectories"
],
"post-update-cmd": [
"Varbase\\composer\\ScriptHandler::createRequiredFiles",
"Varbase\\composer\\ScriptHandler::removeGitDirectories"
],
"post-drupal-scaffold-cmd": [
"Varbase\\composer\\ScriptHandler::postDrupalScaffoldProcedure"
]
},
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Vardot",
"homepage": "https://github.com/vardot",
"role": "Maintainer"
}
],
"description": "Project template for Varbase distribution.",
"repositories": {
"2": {
"type": "package",
"package": {
"name": "enyo/dropzone",
"version": "master",
"type": "drupal-library",
"source": {
"url": "https://github.com/enyo/dropzone.git",
"type": "git",
"reference": "master"
}
}
},
"1": {
"type": "package",
"package": {
"name": "kenwheeler/slick",
"version": "master",
"type": "drupal-library",
"source": {
"url": "https://github.com/kenwheeler/slick.git",
"type": "git",
"reference": "master"
}
}
},
"0": {
"type": "package",
"package": {
"name": "ajaxorg/ace-builds",
"version": "master",
"type": "drupal-library",
"source": {
"url": "https://github.com/ajaxorg/ace-builds.git",
"type": "git",
"reference": "master"
}
}
},
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"assets": {
"type": "composer",
"url": "https://asset-packagist.org"
},
"composer-patches": {
"type": "vcs",
"url": "https://github.com/vardot/composer-patches"
},
"packagist.org": {
"type": "composer",
"url": "https?://repo.packagist.org",
"allow_ssl_downgrade": true
}
},
"support": {
"issues": "http://drupal.org/project/issues/varbase",
"source": "http://cgit.drupalcode.org/varbase"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"oomphinc/composer-installers-extender": true,
"drupal/drupal-library-installer-plugin": true,
"drupal/console-extend-plugin": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": true,
"rvtraveller/qs-composer-installer": true,
"vardot/varbase-updater": true,
"composer/package-versions-deprecated": true
},
"vendor-dir": "vendor"
}
}
The error when I try to run drush is
PHP Warning: pcntl_exec(): Error has occurred: (errno 8) Exec format error in /usr/local/src/drush/includes/startup.inc on line 422
Error has occurred executing the Drush script found at /var/www/vhosts/mysite/vendor/bin/drush.launcher
The error pulled from watchdog in the database is
Argument 3 passed to Drupal\update_helper\Updater::__construct() must be an instance of Drupal\Core\Extension\ThemeInstallerInterface, instance of Drupal\config_update\ConfigReverter given, called in /var/www/vhosts/qe2foundation.ca/qe2/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262";s:9:"%function";s:43:"Drupal\update_helper\Updater->__construct()";s:5:"%file";s:86:"/var/www/vhosts/mysite/somedir/web/modules/contrib/update_helper/src/Updater.php
How can I provide composer with a twig version that it's okay with, so I can roll back Drupal to a version that will work with PHP 7.4?