I recently deployed an update to Drupal 8.6.3 from 8.6.2 on our Drupal-specific managed web host (Pantheon).
Unfortunately, I noticed after the update that our site’s footer was missing, but only for anonymous users. This footer is made of custom blocks placed in a footer region.
The footer is only missing for anonymous users. When you are logged in, the footer blocks appear properly. I’ve tried clearing the cache, running cron, clearing the cache again, etc. There are no errors in the watchdog logs that look like they would relate to this problem.
I’ve tried several, escalating troubleshooting steps to fix the error. Here they are, in more or less the order that I tried them:
I created new custom blocks (using the “basic block” type) in the footer region. For these new blocks, I left them to display the title. The content of the new custom blocks were not rendered for anonymous users, but the title of the block was rendered. To further test, I edited the existing custom blocks in the footer region to display the title. The title displayed, but not the content. This tells me that Drupal is aware of the custom blocks in the region, but not rendering their content for anonymous users.
I then added the built-in login block into the footer. This rendered properly for the anonymous user. This tells me the problem is limited to custom blocks
I then added new custom blocks, and existing custom blocks, with titles, to the content region. I wanted to disprove the idea that there was a problem with the footer region. Like earlier, content was rendered for logged in users, but not for anonymous users. This tells me that the problem is with the content of custom blocks for anonymous users, regardless of the region they’re placed in.
At this point, I decided that the problem probably just wasn’t my particular config, and I did some googling to see if others had encountered this issue.
I found a number of issues regarding updating from 8.3.x to 8.5.x, and certain update hooks not running. We had been a little behind on updates, and had updated from 8.5.6 to 8.6.2 about a month ago, and then to 8.6.3 last night. So I didn’t think these would apply to my situation, but I looked at their fixes and tried them if I could, anyway.
- Basic Blocks are not visible for Anonymous users
When I looked at the databse, all of my block content and revision statuses already had the value
1. For testing’s sake, I did the update anyway. Still no blocks.
- Core update from 8.3.x – 8.5.x Manual Process
A commenter linked this from the first issue I looked at, so I checked it out. I didn’t thing it applied, since we already had been running 8.5.6 for a while with no problem with our blocks. I didn’t have these fields in my
block_content_revision table, but when I added them, it didn’t fix the problem.
- Allow BaseFieldDefinition::setInitialValueFromField() to set a default value – this fixes issues with block_content_update_8400()
This seem to relate to schema update hooks for block revisions not having been run. For troubleshooting’s sake, I set my block_content revision level to 0 to trigger a re-run of all the update hooks. This didn’t resolve the issue.
In the issue queues that I looked at, there was also talk about the translation module. We don’t have that enabled on our site.
So my site has a major issue, and it’s kind of ruining my holiday : S Any help would be appreciated!