Closed (fixed)
Project:
Gif Player Field
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Mar 2026 at 12:07 UTC
Updated:
4 Jul 2026 at 18:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
danrodComment #3
yusuf_khan commentedworking on it
Comment #5
yusuf_khan commented@danrod Please review my MR https://git.drupalcode.org/project/gifplayer/-/merge_requests/20
Comment #6
yusuf_khan commentedComment #7
vinodhini.e commentedHi,
Tested this on Drupal 10.5.1 and ran coding standards using PHPCS, Stylelint, and ESLint.
After applying MR !20 and re-running the reports, no issues are reported. Everything is working fine.
Thanks.
Comment #8
danrodThere are some PHPSTAN issues to fix and the tests doesn't seem to be working
Comment #9
yusuf_khan commentedhttps://git.drupalcode.org/project/gifplayer/-/merge_requests/20 - @danrod PHPSTAN issues has been fixed.Please review
Comment #10
danrodHi @yusuf_khan did you test the functionality at all? I reviewed the functionality and it is not working at all now (please see attachment). Please review your code and make sure that the gif actually loads.
Comment #11
danrodComment #12
yusuf_khan commented@danrod i will fix the issue
Comment #14
jerech commentedComment #15
danrodHi @jeremy1606 did you test your changes as well? I'm getting this error when loading a page with a gif:
I'm guessing the error is triggered from the line 284 at
src/Plugin/Field/FieldFormatter/GifPlayerFormatter.php:Comment #16
danrodComment #17
jerech commentedI've tried to fix the error. Could you check it again? Thank you very much.
Comment #18
danrodThanks @jerech the WSOD is gone, I can see the banana.png file, but still unable to see the GIF at all, setting this to "Needs Work" again. I'll find some time to fix this later this week (screenshot attached)
Comment #19
danrodComment #20
yusuf_khan commentedUpdated MR !20 with a fix for the GifPlayer JavaScript initialization.
The previous behavior used `TRUE` in JavaScript, which caused a ReferenceError and prevented the gifplayer plugin from initializing. I replaced the global initialized flag with Drupal's `once()` API and added the required `core/once` library dependency.
Tested locally on Drupal 11.3.3:
- Created an Article with a Gif Player Icon field.
- Confirmed the formatter renders the banana cover and valid `data-gif` URL.
- Confirmed the uploaded GIF loads after clicking the player.
- Ran PHPCS with Drupal and DrupalPractice standards.
- Ran `node --check js/gif-player.js`.
@danrod Please review.
Comment #21
danrodHi @yusuf_khan , thanks a lot, I tested your changes and it is working as expected, I also reviewed your code changes and found no issues. I'll merge this.
Comment #22
danrodComment #23
danrodComment #25
danrodI created a new release with this: https://www.drupal.org/project/gifplayer/releases/2.0.5