- Issue created by @elgandoz
- πΊπ¦Ukraine glu2006
It's temp solution.
Hope this helps.
The problem is that we check the active theme, but the function returns the opposite value./** * Returns true if the current theme is not gin. * * @return bool * <strong>return true if gin === 'false'</strong> */ function gin_lb_is_valid_theme() { /** @var \Drupal\Core\Theme\ThemeManagerInterface $theme_manager */ $theme_manager = \Drupal::service('theme.manager'); $active_theme = $theme_manager->getActiveTheme(); if ($active_theme->getName() === 'gin' || array_key_exists('gin', $active_theme->getBaseThemeExtensions())) { return FALSE; } return TRUE; }
- Status changed to Needs work
over 1 year ago 4:18pm 14 August 2023 - π«π·France Grimreaper France π«π·
Hi,
I encountered the same issue.
Even if I agree that the boolean logic and the naming around gin_lb_is_valid_theme() function is very confusing, I think the logic behind is to trigger only when not in Gin. To be triggered in Layout Builder in front.
But the problem is that it is not specific enough and so it alters front froms too.
I think we need to add template suggestions to have a preprocess more specific to form element when in Layout Builder.
- Assigned to Grimreaper
- @grimreaper opened merge request.
-
Grimreaper β
committed a13cf26b on 1.0.x
Issue #3375912 by Grimreaper: File upload button missing on the front-...
-
Grimreaper β
committed a13cf26b on 1.0.x
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 2:30pm 21 August 2023 - π«π·France Grimreaper France π«π·
Tested with file and image widget on:
- gin_login
- node form using front theme instead of Gin
- Custom form (section_library) in Layout Builder
- block content form in Layout Builder Automatically closed - issue fixed for 2 weeks with no activity.