- Issue created by @jmoruzi
- Assigned to Gautam_105@
- 🇫🇷France joachim desarmenien Bordeaux
What do you think about replacing
(function($, Drupal, once) { Drupal.behaviors.beforeafter = { attach: function(context, settings) { once('.cocoen-beforeafter-container', context).cocoen(); } } })(jQuery, Drupal, once);
with
(function($, Drupal) { Drupal.behaviors.beforeafter = { attach: function(context) { once('cocoen', '.cocoen-beforeafter-container', context).forEach(function (element) { $(element).cocoen(); }); } } })(jQuery, Drupal);
in cocoen_beforeafter.js
- 🇵🇱Poland lamp5 Rzeszow
- 🇨🇦Canada jmoruzi Brantford, ON
Thank you, the error is gone and the images are displaying correctly now.
- Status changed to Needs review
7 months ago 2:28pm 25 April 2024 - Merge request !5Issue #3441116 by joachim-desarmenien : Fix Uncaught TypeError: once(...).cocoen is not a function → (Merged) created by joachim desarmenien
- Assigned to joachim desarmenien
Hello, I used the patch and it does not work with media, the image is hidden
- 🇫🇷France joachim desarmenien Bordeaux
Hello the issue ti make it work with media is here : https://www.drupal.org/project/cocoen_beforeafter/issues/3312086 ✨ Support for media Needs work
- Status changed to Needs work
6 months ago 10:57am 15 May 2024 - 🇮🇳India arunkumark Coimbatore
I reviewed the patch, The patch was applied successfully but the image was not shown after applying the patch.
Please see the attached screenshot.
Before patch applied:
After patch applied:
There is issue with the JS implentation.
-
lamp5 →
committed 4700eb3b on 8.x-1.x authored by
joachim desarmenien →
Issue #3441116 by joachim desarmenien: Uncaught TypeError: once(...)....
-
lamp5 →
committed 4700eb3b on 8.x-1.x authored by
joachim desarmenien →
- Issue was unassigned.
- Status changed to Fixed
6 months ago 11:04am 15 May 2024 -
lamp5 →
committed 4700eb3b on 2.0.x authored by
joachim desarmenien →
Issue #3441116 by joachim desarmenien: Uncaught TypeError: once(...)....
-
lamp5 →
committed 4700eb3b on 2.0.x authored by
joachim desarmenien →
Automatically closed - issue fixed for 2 weeks with no activity.