Modal not working with Bootstrap 5 theme.

Created on 4 February 2024, 5 months ago
Updated 26 April 2024, 2 months ago

Problem/Motivation

The module works well with the Bootstrap 4 theme. But when tried with Bootstrap 5 theme, the modal doesn't open.

I believe this is due to the change in method, which is used to create/call a modal in Bootstrap 5.
Bootstrap 4 Method
Bootstrap 5 Method

Steps to reproduce

1. Install Drupal 9/10.
2. Install and set Bootstrap 5 as site's default theme.
3. Install Bootstrap External Link Pop-up module and create a test content.(Add random external URL(s) in the content).
4. Once node is saved, access the node and click on the added external URL(s).

It doesn't open the modal.

Proposed resolution

Make it compatible for both versions(Bootstrap 4.x and Bootstrap 5.x).

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇮🇳India vyasdhruv

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

Merge Requests

Comments & Activities

  • Issue created by @vyasdhruv
  • Status changed to Needs review 5 months ago
  • Issue was unassigned.
  • Status changed to RTBC 5 months ago
  • 🇮🇳India Sandeep_k New Delhi

    Hi @vyasdhruv, I've Tested MR- MR !4 mergeableon Drupal version- 9.5.12-dev, The patch was applied successfully and looks good to me.

    Testing Steps:

    • Install Drupal 9.5
    • Install and set Bootstrap 5 as the site's default theme.
    • Install the Bootstrap "External Link Pop-up" module.
    • Add an External link field to a Content type & create a new node- (Add a random external URL).
    • Go to the created node and click on the added external URL(s). The external link won't open.
    • Download the shared patch & apply.
    • Revisit the content node & view to reverify this.

    Testing Results:
    After applying the patch, the External Link Pop-up is showing now & the link is opening as well. RTBC++

  • Status changed to Needs review 4 months ago
  • 🇺🇸United States ChrisSnyder Maryland

    Has anyone tested this patch to make sure it still works for sites using Bootstrap 4? We should ensure it does not cause any regressions for those still using Bootstrap 4.

  • Status changed to RTBC 3 months ago
  • Hi,
    I have tested this change, following the below mentioned steps and the popup worked for me with Bootstrap 4 theme as well.
    Steps:

    1. Install Drupal 10.2.2
    2. Install Bootstrap4 theme and set as default.
    3. Install Bootstrap External Link Popup module.
    4. Add some dummy content - with external link(s).
    5. Access the node, and click on the link(s) to verify.
    6. Apply the patch.
    7. Access the node again. Click on the link(s) to reverify.

    Result:

    1. The popup worked for me before applying the patch.
    2. It worked same after applying the patch as well. Popup opened, on click cancel - it closed and on click ok - it redirected.
  • Hi,
    I have tested this change following the below mentioned steps and the popup worked for me with Bootstrap 4 theme as well.
    Steps:

    1. Install Drupal 10.2.2
    2. Install Bootstrap4 theme and set as default.
    3. Install Bootstrap External Link Popup module.
    4. Add some dummy content - with external link(s).
    5. Access the node, and click on the link(s) to verify.
    6. Apply the patch.
    7. Access the node again. Click on the link(s) to reverify.

    Result:

    1. The popup worked for me before applying the patch.
    2. It worked same after applying the patch as well. Popup opened, on click cancel - it closed and on click ok - it redirected.
  • 🇺🇸United States ChrisSnyder Maryland
  • Status changed to Fixed 3 months ago
  • 🇺🇸United States ChrisSnyder Maryland
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024