- Issue created by @albertho425
- π¨πSwitzerland saschaeggi Zurich
Hey lovely Gutenberg team
Could you debug why this potentially is not showing up?
Thank you in advance
- π¦π½Γ land Islands albertho425 Seattle, WA
When using Gin as admin theme and Gutenberg editor in a content type in Drupal 10,
/web/themes/contrib/gin/src/GinContentFormHelper.php Line 178 $form['status']['#group'] = 'status'; is causing the published toggle to be missing.
- π©πͺGermany marco.b
theme_switcher to use Claro Theme at affected node forms can be used as a workaround.
- π©πͺGermany marco.b
I overlooked that this is about version 4.0.x-dev.
drupal/gin_gutenberg solves the problem with gutenberg 3.0.6. Has anyone tested here?
- π¦π½Γ land Islands albertho425 Seattle, WA
I tried gutenberg 3.0.6 and the issue persists.
I wrote a patch that comments out this entire block of code in the Gin theme and it works.
// Only alter the status field on content forms. if ($is_content_form) { // Set form id to status field. if (isset($form['status']['widget']) && isset($form['status']['widget']['value'])) { $form['status']['widget']['value']['#attributes']['form'] = $form['#id']; $widget_type = $form['status']['widget']['value']['#type'] ?? FALSE; } else { $widget_type = $form['status']['widget']['#type'] ?? FALSE; } // Only move status to status group if it is a checkbox. if ($widget_type === 'checkbox') { $form['status']['#group'] = 'status'; } }
- π©πͺGermany marco.b
@ albertho425
> I tried gutenberg 3.0.6 and the issue persists.
Did the issue even persist after installing drupal/gin_gutenberg? It worked for me.
IMHO the use of a a simple contrib module seems to be better that patching, isn't it?
- π¦π½Γ land Islands albertho425 Seattle, WA
Thank you @marco.b.
The gin_gutenberg module works great and also resolves the issue. Had I known about this module, I wouldn't have used the patch. Thanks again!
- π¬π·Greece osmnfth Grece
@all,
In my case i simply enabled the Gin Gutenberg: Integrate Gin theme with Gutenberg Editor because for some reason the module was not enabled.