Score:0

Trouble upgrading 7.90 to 7.91

cn flag

I'm trying to keep a D7 site up to date, it's currently running 7.90. I tried to upgrade to 7.95, but I ran into trouble, and eventually figured out that it's the 7.90->7.91 transition that's breaking.

The symptoms of the breakage are that a bunch of files can't be loaded, which causes the styles to break:

console logs

In drush ws, I'm seeing a bunch of errors I don't understand:

 ID       Date          Type      Severity  Message                                                                                                                      
 2921088  22/Apr 23:03  file      notice    File temporary://filea2mhNL could not be copied, because the destination directory public://js is not configured correctly.  
 2921087  22/Apr 23:03  file      notice    File temporary://fileklXSEL could not be copied, because the destination directory public://js is not configured correctly.  
 2921086  22/Apr 23:03  file      notice    File temporary://fileeWhcQM could not be copied, because the destination directory public://js is not configured correctly.  
 2921085  22/Apr 23:03  file      notice    File temporary://filemKi11O could not be copied, because the destination directory public://js is not configured correctly.  
 2921084  22/Apr 23:03  file      notice    File temporary://file6jT1TM could not be copied, because the destination directory public://js is not configured correctly.  
 2921083  22/Apr 23:03  file      notice    File temporary://filepqrbbO could not be copied, because the destination directory public://js is not configured correctly.  
 2921082  22/Apr 23:03  file      notice    File temporary://fileQvQRjO could not be copied, because the destination directory public://css is not configured correctly. 
 2921081  22/Apr 23:03  file      notice    File temporary://fileYevWcO could not be copied, because the destination directory public://css is not configured correctly. 
 2921080  22/Apr 23:03  file      notice    File temporary://fileUnElcO could not be copied, because the destination directory public://css is not configured correctly. 
 2921079  22/Apr 23:03  file      notice    File temporary://file9DAYLM could not be copied, because the destination directory public://css is not configured correctly. 

What does "not configured correctly" mean? There are hundreds of these messages in the watchdog logs, but I can't tell where they're coming from or whether they're truly related to the site breakage.

The biggest smoking gun for the CSS breakage seems to be the Refused to apply style line, because the MIME type text/html does indeed look wrong, but I don't know where that's coming from or why that would change with this upgrade.

Context

I performed the upgrade using drush up drupal, and did drush cc all and drush updb (there were no updates to perform). I'm testing the upgrade locally, sia-drupal is an alias in /etc/hosts for 127.0.0.1. Drupal and mysql are running in local Docker containers.

I have the upgraded Drupal files in a git branch, I can switch back & forth between the base (7.90) and upgraded (7.91) versions and watch the breakage come and go.

I'd love any help to figure out what's going on and how to get past it. If any other context would be helpful, let me know and I'll include it. Thanks!

No Sssweat avatar
ua flag
`could not be copied, because the destination directory public://css is not configured correctly.` sounds like your public /css & /js folders do not have the correct group/owner (chown) or permission (chmod).
id flag
Can you confirm you read the release notes? https://www.drupal.org/project/drupal/releases/7.91
cn flag
Make sure you look beyond the accepted answer in the duplicate, as the other answer is probably going to be more helpful. If that doesn’t help, update this question with the details of what you’ve tried and it can most likely be re opened
Ken Williams avatar
cn flag
@NoSssweat I've done `chmod -R ugo+w sites/default/files` to see whether Drupal can't write to there, still the same result. I also see the server successfully writing files to `sites/default/files/css` and `/tmp` with every request.
Ken Williams avatar
cn flag
@cilefen Yes, I read the notes before posting - but thanks for drawing my attention to it again, that fixed it. I'll post some details in an answer.
Ken Williams avatar
cn flag
Darn, looks like I can't add an answer. So I didn't think the criteria applied to me because my "public" & "private" locations are both `sites/default/files`, not something *inside* the private location. But `$conf['sa_core_2022_012_override'] = TRUE;` worked, so obviously that's the issue. Off to read what to do about it properly...
No Sssweat avatar
ua flag
You shouldn't keep the /private folder inside the Drupal root folder tree, because it can be accessed via URL @KenWilliams. Any one could share URL and access it by going to it directly, ie: `mysite.com/sites/default/files/private/top-secret.pdf`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.