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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bhanojeerao created an issue. See original summary.

bertonha’s picture

This 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

tibezh’s picture

Looks good.

Neslee Canil Pinto’s picture

Status: Needs review » Needs work

For we it still doent work if i place more then 2 blocks

cswan’s picture

Hi, #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.