Error with block webform

Created on 12 May 2023, over 1 year ago
Updated 28 May 2024, 7 months ago

Problem/Motivation

I just tested the module with a webform block and although I activate the modal check, it is not displayed

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Nelo_Drup
  • 🇳🇱Netherlands Ruuds

    It seems to work in the project we built this module for. Do you get any specific javascript errors in your browser's inspector console?

  • @Ruuds The block does not hide and the button does not appear either

  • 🇳🇱Netherlands Ruuds

    If that's the case, the block_button_modal_block_view_alter or the template_preprocess_block_button_modal_block method probably doesn't get called.

    As i cannot reproduce the issue, maybe you can help me out identifying the issue. If you replace the contents of the block_button_modal.module file with https://gist.github.com/ruuds/5163d887431862d83f9f6d4d3a592939 (changed lines are 32, 36 and 56), what output do you get?

    The lines

    block_button_modal checkpoint 1
    block_button_modal checkpoint 2
    block_button_modal checkpoint 3
    

    should appear somewhere on your page.

  • @Ruuds Thanks for answering, I copied the code as you indicated and I see that it only printed block_button_modal checkpoint 1, as seen in the picture https://postimg.cc/ykBCDSVm.
    I want to clarify something that may have to do with it. I am using a theme from scratch using the starterkit generator. Also, my characteristics are the following:
    - Drupal 9.5.8
    - MySQL 5.7.41
    - PHP 7.4.33
    - Apache 2.4.52

    Note I use php 7.4.33 because there are still several modules that were not updated to PHP 8 maybe that has something to do with it

  • 🇳🇱Netherlands Ruuds

    If only 'checkpoint 1' is shown, it means that the block_button_modal is not enabled for the webform block. As it works correctly in my situation i am wondering if you are using any additional block-related modules? It seems, for example, that the block_class module prevented saving of third party settings (which is used to determine if block_button_modal is enabled or no) in an older version. See https://www.drupal.org/project/block_class/issues/3299925

  • Status changed to Needs review 7 months ago
  • 🇳🇱Netherlands Ruuds

    Please try updating to 1.1.1 and let me know if that works.

Production build 0.71.5 2024