Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Timer is working with 1 block on a page. I tried to place another block in same page then title displayed but timer not displayed. Same issue if we place 3rd block on same page. I inspected element on browser, it is showing empty Divs.
Comment | File | Size | Author |
---|---|---|---|
#5 | jquery_countdown_timer-notworkingmultipleblocks-2909019-5.patch | 5.22 KB | cswan |
#2 | jquery_countdown_timer-notworkingmultipleblocks-2909019-2.patch | 4.32 KB | bertonha |
#2 | Screen Shot 2017-09-25 at 3.40.25 PM.png | 75.07 KB | bertonha |
Comments
Comment #2
bertonha CreditAttribution: bertonha commentedThis patch might solve the issue.
1- Passed the block_id in the block configuration, to be able to separate the values in an array of indexes and pass though drupalSettings to the javascript
2- Changed to be a $.each looping to be able to get the configuration and apply to different blocks separatly
Evidence attached.
@bhanojeerao
Comment #3
tibezh CreditAttribution: tibezh at OPTASY, Drupal Ukraine Community commentedLooks good.
Comment #4
Neslee Canil PintoFor we it still doent work if i place more then 2 blocks
Comment #5
cswan CreditAttribution: cswan commentedHi, #2 patch didn’t work for me. I think that block ID was not there because we were using Layout Builder. I modified the #2 patch and created own as attached. I added a new form field “custom_id” and used it in place of block ID. This was my first time created a patch file. I hope I did it correctly.