jeffgeerling-com
jeffgeerling-com copied to clipboard
Drupal 10 upgrade woes - fix up the bugs
It's late, don't have time to fix everything from #151 now, so I'll leave some things to check on here:
- [ ] Aggregate CSS/JS doesn't seem to work anymore. No errors, just... no generated CSS/JS in public files directory.
- [ ] Insert module seems to... not be inserting. I was noticing a bunch of CKEditor-related JS errors in the console, not sure where those are coming from (I don't have CKEditor installed).
- [ ] Emails on localhost weren't sending (though Simple Mail seemed to work otherwise...), not sure if it was a sendmail configuration issue (using MailHog locally), or something else. But need to test email sends on the prod server.
Insert is definitely not working on Prod, either (just like on Dev).
ReferenceError: Can't find variable: CKEDITOR
TypeError: undefined is not an object (evaluating 'editorInterface.getInstances')
Maybe Insert is assuming the Text Editor module is loaded or something? This is a bare text input field.
Simple Mail Queue seems to have grabbed the comment correctly after I posted it...
After cron run, message was gone from queue table, and no errors popped up in watchdog.
Email arrived okay! Formatting is wonky, but something in a recent Drupal upgrade caused that... it's not the fault of the Drupal 10 upgrade.
For Insert, I think it's a bug in the Insert module, since it assumes CKEditor 5 is present and active... see Can't Insert images into textareas (without CKEditor)
I also tried adding CKEditor and allowing Image upload. It works fine... but if I upload an image at 2x resolution and resize it down, the width is reduced in the final markup but the height seems to get locked into the image's original height, which makes the image all stretchy and weird. Very odd behavior. Would be so nice if Allow image style to be selected in Text Editor's image dialog were part of Drupal core :)
It looks like Insert may be fixed as of beta 3! I will try now; see the issue linked in the comment above.
Edit: Looks like it is not fixed in beta3. There's also a patch that may make it work though!
Still not working with latest patch either :(
Figured out the aggregation issue with CSS/JS:
--- a/files/vhost.conf.j2
+++ b/files/vhost.conf.j2
@@ -183,7 +183,7 @@ server {
#rewrite ^/(.*)$ /index.php?q=$1;
}
- location ~ ^/sites/.*/files/styles/ {
+ location ~* /sites/.*/(css|js|styles)/ {
try_files $uri @rewrite;
}
}
However, JS still breaks on my main theme, at least logged in. Probably a JS ordering issue (you can assign different priorities, and I'm guessing it's aggregating with some function unable to access a var that should be set.
All issues (except for JS aggregation are fixed now — Insert seems to be working correctly now too... maybe it was a PHP version bug, or filesystem permissions, or who knows what!