- Issue created by @Luispe
- Status changed to Needs review
about 1 year ago 10:14pm 27 September 2023 - last update
about 1 year ago 50 pass - 🇮🇩Indonesia gausarts
Thank you.
Looks like being blocked by
$no_image
check. - last update
about 1 year ago 50 pass - 🇮🇩Indonesia gausarts
Another miss. Unlike Slick, Splide is capable of displaying images even with vanilla mode.
-
gausarts →
committed bec78a61 on 8.x-2.x
Issue #3390209 by gausarts, Luispe: Field Formatter lose "View mode"
-
gausarts →
committed bec78a61 on 8.x-2.x
- Status changed to Fixed
about 1 year ago 12:20am 28 September 2023 - 🇮🇩Indonesia gausarts
Not so useful tips:
When changing formatters, slick to splide entity references (rare case in real world), and you don't see Splide options, be sure to reload the page first. Looks like Drupal AJAX doesn't read the differences between the two almost similar forms with minor added form items.Feel free to re-open if still an issue.
Committed. Thank you for contribution.
Hello I can't apply the patch.
I get the following:~/website/web/modules/contrib/blazy$ git apply -v drupal.org_files_issues_2023-09-28_blazy-3390209-view-mode-gone-5.patch
Checking patch css/blazy.css...
error: while searching for:
border: 0;
}/* To keep animated elements in place when not happing .blazy container. */
.media--blazy,
/* Or BlazyFilter which has no .blazy container. */
.media--fx {error: patch failed: css/blazy.css:54
error: css/blazy.css: patch does not apply
Checking patch src/Form/BlazyAdminBase.php...And then nothing happens.
- last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - 🇮🇩Indonesia gausarts
Not sure :)
Try viewing this file in browsers:
.../modules/contrib/blazy/blazy.cssSearch for typos:
happing
vshaving
.If the first exists, something else breaks it.
If the later exists, you are using the latest DEV which already contains it, no need to apply the patch. Hello gausarts,
As always a pleasure to deal with you, you do a great job and we thank you very much.
I hope you forgive me, but I'm sorry to inform you that the patch is not correct, maybe the output has been mixed with other changes you were making, the first lines of the patch must be removed so that the patch is applied correctly:
diff --git a/css/blazy.css b/css/blazy.css index a7b6477..6cda23c 100644 --- a/css/blazy.css +++ b/css/blazy.css @@ -54,7 +54,7 @@ html:not(.js) [data-b-blur] { border: 0; } -/* To keep animated elements in place when not happing .blazy container. */ +/* To keep animated elements in place when not having .blazy container. */ .media--blazy, /* Or BlazyFilter which has no .blazy container. */ .media--fx {
Also it doesn't work properly, although the "View mode" field appears, but only the "default" value appears, this is because you use the variable "$target_type" to get the view mode options in:
$form['view_mode'] = [ '#type' => 'select', '#options' => $this->getViewModeOptions($target_type), '#title' => $this->t('View mode'), '#weight' => -101, '#enforced' => TRUE, ];
But this variable, which should have a string value, like "node" for example, has become a boolean value, because previously you make a comparison "||" and if both values are empty it returns "false" and if any of them contains any data it returns "true":
$target_type = $scopes->get('target_type') || $blazies->get('field.target_type');
- 🇮🇩Indonesia gausarts
Looks like JS logic mixed up PHP :)
Try changing
||
to?:
. Thank You gausart, I have uploaded a new patch with the suggested changes, in case anyone needs it.
- last update
about 1 year ago Patch Failed to Apply Thank you all! Now it's working.
I change || to ?: as suggested.Thank you.
Automatically closed - issue fixed for 2 weeks with no activity.