Closed geerlingguy closed 11 months ago
looking forward to this, thank you for the update!
I'm running PHP 8.1 now, and MySQL 5.7.x, and the server is ready for the upgrade...
This document has an outline of all the things I need to do: https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-from-drupal-9-to-drupal-10/overview
Are you planning to do the upgrade on a live stream like last time? That was pretty cool.
Some things I've already noted:
composer require --dev drupal/upgrade_status
(then enable in the UI and visit /admin/reports/upgrade-status
).composer require drupal/stable
to install the Stable contrib module. See how to do Classy stuff with https://www.drupal.org/project/classy ? Or maybe look up the change records.@bmartinez287 - Probably not, the tough thing is I don't have as much time to work on it, so it'll probably be hacking away at things late night some night once Drupal 9.x is completely unsupported.
It kinda makes me sad I didn't just keep the site on Drupal 7 lol. Drupal upgrades are the death of a small site like this!
Things to clean up before pushing live:
Released Simple Mail 2.0.1, compatible with Drupal 10: https://www.drupal.org/project/simple_mail/issues/3289635
Chicken-and-egg problem... I need to upgrade Insert to https://www.drupal.org/project/insert/releases/3.0.0-beta2 — but if I try doing that it says it requires Drupal 10.
But I can't upgrade to Drupal 10 until Insert is upgraded. What to do?
Ah... so first:
composer require drupal/core-recommended:"^10.0" --no-update
Then upgrade everything:
composer update
That throws some error messages though, all stemming seemingly from Insert. So upgrade Insert now without update:
composer require 'drupal/insert:^3.0@beta' --no-update
Then again:
composer update
Now seeing Root composer.json requires drush/drush ^10 -> satisfiable by drush/drush[10.0.0-alpha1, ..., 10.x-dev].
, so next:
composer require 'drush/drush:^12' --no-update'
Then again...
composer update
And finally it's doing all the things!
This page was very helpful: Upgrading to Drupal 10 (And Beyond) With Composer
Hmm... Drush doesn't work anymore:
root@c93dd0c9b598:/var/www/html# drush
The Drush launcher could not find a local Drush in your Drupal site.
Please add Drush with Composer to your project.
Run 'cd "/var/www/html" && composer require drush/drush'
I updated to the latest Drush 12 and Drush Launcher, but that didn't help. It seems like Drush 12 broke compatibility and Drush Launcher was recently archived.
See: https://github.com/drush-ops/drush-launcher/ (it's archived), and https://www.drush.org/12.x/install/ for a few options if you want to still just type drush
and not vendor/bin/drush
.
For my own purposes I'll just type the explicit path. Annoying but automatable.
Pushing the code up now. What are the chances it 'just works'?
TASK [Ensure Drupal 8 codebase is present and updated.] ****************************************************************
changed: [sshjg.jeffgeerling.com]
TASK [Make sure 'default' directory is writeable.] *********************************************************************
ok: [sshjg.jeffgeerling.com]
TASK [Make sure all Drupal 8 composer dependencies are installed.] *****************************************************
changed: [sshjg.jeffgeerling.com]
TASK [Run post-deployment tasks after codebase is updated.] ************************************************************
changed: [sshjg.jeffgeerling.com] => (item=drush cache:clear drush)
changed: [sshjg.jeffgeerling.com] => (item=drush cache:rebuild)
changed: [sshjg.jeffgeerling.com] => (item=drush config:import -y)
changed: [sshjg.jeffgeerling.com] => (item=drush updatedb -y)
And moment of truth...
Well that's odd...
Warning: include_once(/home/geerlingguy/domains/drupal8/web/core/themes/classy/classy.theme): Failed to open stream: No such file or directory in include_once() (line 153 of /home/geerlingguy/domains/drupal8/web/core/lib/Drupal/Core/Extension/Extension.php)
Why is classy not there?
Ah.
geerlingguy@www:~/domains/drupal8/web/themes/contrib$ ls
classy gin stable
It's not parsing out the contrib
maybe?
It seems like the site is just not generating any CSS or JS files right now. Drupal's rendering things okay at least.
File permissions? They are looking okay...
It even has:
File system
Writable (public download method)
Not seeing anything that would be messing up css/js generation :/
I mean... it all works locally. Maybe something in composer is getting cached? Might wipe out vendor dir and reinstall composer deps.
Ran:
rm -rf vendor
composer install
Zero difference.
Okay... so temporary fix, went to /admin/config/development/performance
and disabled CSS/JS aggregation.
One possibility (however small)—I override the .htaccess
file Drupal provides. Maybe there's some important change in there for Drupal 10?
Noticed after seeing https://stackoverflow.com/a/20946969/100134
I'll try rebooting it, that's a good trick!
Nope. Drupal just refuses to generate CSS/JS, and shows no errors while doing so.
Going to check into my tmp dir and see if there's anything funky there.
Otherwise the upgrade is looking okay. Opened https://github.com/geerlingguy/jeffgeerling-com/issues/157 to track more bugs.
Hrm. looks good from production while logged out. Ahh I see you turned CSS agg off. Core rewrote CSS agg to try and replace advanced agg. It's been non functional in 10.1 for me. I just leave CSS agg off.
@Greg-Boggs - Yeah, got it to look okay by disabling CSS/JS aggregation, and I'm going to track that bug and the one other major bug (Insert not working) in #157. Thanks for checking!
Drupal 10 will be released soon (Dec 14). Upgrade would be good. Have to also upgrade the server to PHP 8.1 or later (right now it's still on a 7.4 lts release from the distro).