- Issue created by @jeremyvii
- 🇮🇳India kalpanajaiswal
I tried to replicate the issue but it didn't reproduce.
Drupal version: 10.2.7
office_hours module version: 1.17.0 In order to replicate, all the hours must empty on the entity.
Without Layout Builder.
With Layout Builder
- Status changed to Postponed: needs info
5 months ago 9:30am 19 June 2024 - 🇳🇱Netherlands johnv
This should not be possible. I guess all other settings are not used then, too. Please check that.
Please check if the correct ViewMode is used.
IN the code, you can see several references tolayout_builder
please grep them and test the behaviour. I can confirm that I am using the correct view mode. After further investigation, this appears to be happening with any field in Layout Builder. In
Drupal\layout_builder\Plugin\Block\FieldBlock::blockAccess
, the selected field'sisEmpty()
method is checked, and iftrue
, access to the block is forbidden. There appears to be an issue for the Drupal project to try to add a setting to allow the field to display, even if empty. It would be niceOfficeHoursItemList::isEmpty()
returnedfalse
ifshow_empty
is checked, but I can understand how that would be messy to implement.- 🇳🇱Netherlands johnv
I tried to move the 'show_empty' into $items->isEmpty(), but the formatter settings are lost in the ItemList.
I does not seem right to override the layout_builder code, even if it core.
Also, it seems as I have a higher Drupal version then you, since in my 10.2.x system, #3119786: Default values are not displayed for image fields placed in Layout Builder → is committed, removing the line you mention.
Perhaps the problem is solved in a higher Drupal version?