- 🇺🇸United States kurttrowbridge
Hello! I had the same issue involving the same select_translation module, and the patch in #6 worked for me. Marking as RTBC. Thanks!
- 🇪🇸Spain rodrigoaguilera Barcelona
Claro is now in core but it suffers from the same
- Status changed to Needs work
9 months ago 9:25pm 25 March 2024 The Needs Review Queue Bot → tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request → . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Merge request !7177Issue #3251895: claro_form_views_ui_config_item_form_alter() assumes a suffix... → (Open) created by rodrigoaguilera
- Status changed to Needs review
9 months ago 9:27pm 25 March 2024 - 🇪🇸Spain rodrigoaguilera Barcelona
I proposed a different approach that outputs the suffix as an empty string since the latest patch was not closing the div.
- 🇺🇸United States smustgrave
Hiding patches but wonder if this is a bug for select_translation.
- 🇪🇸Spain rodrigoaguilera Barcelona
This issue happened to me with facets 3.x and better exposed filters 6.0.3. I'm not sure which one caused it.
I think is quite legitimate to define a prefix without a suffix - Status changed to RTBC
9 months ago 2:05pm 8 April 2024 - 🇺🇸United States smustgrave
Not 100% sure on the scenario but do see the error.
Per 🌱 [policy, no patch] Better scoping for bug fix test coverage RTBC I believe this may fall under that scenario where the fix is small enough we might not need a full test case for it.
- 🇬🇧United Kingdom alexpott 🇪🇺🌍
This needs more investigate as it points to something else that is broken. Look at the full scope of code here:
// Remove `views-(direction)-(amount)` classes, replace with // `views-group-box--operator`, and add a `views-config-group-region` // wrapper. if (isset($form['options']['operator']['#prefix'])) { foreach (['views-left-30', 'views-left-40'] as $left_class) { if (str_contains($form['options']['operator']['#prefix'], $left_class)) { $form['options']['operator']['#prefix'] = '<div class="views-config-group-region">' . str_replace($left_class, 'views-group-box--operator', $form['options']['operator']['#prefix']); $form['options']['value']['#suffix'] = $form['options']['value']['#suffix'] . '</div>'; $form['options']['value']['#suffix'] = ($form['options']['value']['#suffix'] ?? '') . '</div>'; } } }
How have we got to a situation where both
if (isset($form['options']['operator']['#prefix'])) {
andif (str_contains($form['options']['operator']['#prefix'], $left_class)) {
are true but we have no prefix...AHHH... I see the prefix is in
$form['options']['operator']
and the suffix is in$form['options']['value']
that's very interesting. I think what Claro is doing here is icky and fragile. I'm not sure what's best for Claro but I agree that fixing this for contrib feels right and not requiring a test is okay too. - Status changed to Fixed
9 months ago 10:35am 9 April 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Discussed with @ckrina who pointed out that
It’s the eternal Drupal problem of dealing with markup logic in several places, and using #suffix and #prefix for what they are not prepared for. Not sure if that could be done on a template. I’d merge the quick fix and work the source of the problem in a follow-up.
@ckrina also pointed out the perhaps the follow-up is 📌 Remove floats and clearfixes Active
Committed and pushed b4263a3e42 to 11.x and cbf32be712 to 10.3.x and cb6fb284cb to 10.2.x. Thanks!
Backported to 10.2.x as a safe bugfix and didn't require tests as per @smustgrave in #17
-
alexpott →
committed cb6fb284 on 10.2.x
Issue #3251895 by Shabbir, rodrigoaguilera, ckrina:...
-
alexpott →
committed cb6fb284 on 10.2.x
-
alexpott →
committed cbf32be7 on 10.3.x
Issue #3251895 by Shabbir, rodrigoaguilera, ckrina:...
-
alexpott →
committed cbf32be7 on 10.3.x
-
alexpott →
committed b4263a3e on 11.x
Issue #3251895 by Shabbir, rodrigoaguilera, ckrina:...
-
alexpott →
committed b4263a3e on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.