Problem/Motivation
When enabling Workspaces module, blocks that include media images do not appear on the page.
Screenshot of missing Umami custom block that contain media image -

Steps to replicate:
- Install Demo Umami install profile
- Enable Workspaces and Workspaces UI modules
- Switch to the stage workspace
/admin/config/workflow/workspaces/manage/stage/activate
- Edit the Hero block
/en/admin/content/block/3
- Deploy content
/admin/config/workflow/workspaces/manage/stage/publish
Unable to reproduce on 11.x, workspace publishes without error and blocks remain on homepage
You will get an error -
Deployment failed. All errors have been logged.
(but no errors appear in the Recent errors log page /en/admin/reports/dblog)
It gets more interesting...
If you edit a node in stage, save it, and now click on 'deploy content', the deployment will be successful!
wait. what?
:)
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
shaalComment #3
jerdavisI can confirm. I'm curious what is triggering this issue or if this is being looked into.
Comment #5
mandclu commentedI've been testing workspaces with Umami in Drupal 9.2 and can still reproduce this problem. In my testing, as soon as you switch to any workspace besides "Live" these custom blocks fail to display. For Umami this includes the hero blocks on both the home page and recipes page.
Comment #7
dqdThat(!) made me think because of custom block ...
I can confirm and reproduce this issue using a media field in a custom block type with the Drupal Bootstrap5 theme and tried to investigate further to prevent us to look on the wrong places. First idea which came into mind is what if some themes hook into and breaking media references by calling content. I remember I had such issues on custom themes back in D7 days so I started to switch themes (no workspaces module involved), and viola! Turns out that the media field images in a custom block appear on standard Bartik theme, on classic Danland theme, on classic Drupal Bootstrap 3 theme, on Cornerstone base theme, on Fepper theme. And now it gets interesting because on Drupal Bootstrap Barrio it appears only in certain regions and it get rid off completely on Bootstrap5.
I sadly cannot test on umami theme (as stated above) on different regions since umami is not included no more on Drupal 9 but anyone who can test this for OT on different regions with and without workspaces we can come closer to the reason of that issue and if it is maybe theme related (moving it to the respective issue queues then) or core theme layer related or still core block layer related how it hands over to themes.
But we can say for now that it is not a workspace related but rather block.content module related issue I think. Because I had no workspace module in place nor activated on this test. Maybe the OT can retest occurrence without workspaces module because maybe he just accidently thought it happened with workspaces by chance. And even IF it happens with workspaces activated it does not need to be the reason.
I will deescalate the issue prio because there is no major functionality broken and there are several work-arounds available to get media images into blocks (Views block for example).
Comment #11
smustgrave commentedWasn't able to replicate this issue. Wonder if someone could confirm it's still an issue in D10?
Comment #12
mandclu commentedI just did a fresh install of Umami on Drupal 10.0.9. As soon as I switch to the Stage workspace the umami_views_block__promoted_items_block_1 and umami_banner_home blocks on the home page disappear.
Comment #13
nlisgo commentedI am able to recreate this but in the steps to replicate I change:
/admin/config/workflow/workspaces/manage/stage/deploy
to:
/admin/config/workflow/workspaces/manage/stage/publish?destination
Comment #14
nlisgo commentedFor some reason I need to add the desitination parameter or I get a WSOD. I will raise a separate issue for that.
Comment #15
nlisgo commentedI created an issue to address the fact that we are not logging the error. #3376177
When I surface the error this is what I get:
The error is caused by the empty condition:
WHERE ("content_moderation_state_field_revision"."content_entity_revision_id" IN (:db_condition_placeholder_0)) AND ()I've tried to get to the bottom of where the empty condition originates and the intention behind it but it's proving difficult for me.
Comment #16
acbramley commentedI've tested this on latest core and cannot reproduce the error. The steps in the IS are quite outdated though, I've updated them with the required steps.
Will leave this open a touch longer, I assume this was an issue in workspaces rather than block_content though.
Comment #17
smustgrave commentedJust following up if anyone has been able to update in latest D11?
Comment #18
acbramley commentedClosing out as it's been 3 months since #16
If you are able to reproduce this issue, please feel free to reopen with the steps to reproduce.