Js error in public pages

Created on 9 December 2021, about 3 years ago
Updated 9 August 2024, 4 months ago

Problem/Motivation

Hello!
I'm unable to make modal show in public pages, it only shows the modal backdrop. Div with class modal isn't getting display attribute changed from none. However in admin pages it works fine.
I'm getting following js error in console, apparently on trigger:

Uncaught TypeError: can't convert undefined to object

Has anybody experienced this error?
I've tried setting on/off the available Bootstrap configurations (Verify and Load Bootstrap automatically if necessary / Load Bootstrap with Modal Page) with no success. I have already installed boostrap β†’ 3.0 in my site. Can that be making a conflict?

I'm also loading jquery-1.11.1.min.js in all pages.

Thanks!

πŸ› Bug report
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia fruizdiego Sydney

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine CyberM

    I recently found a similar error with this module:
    "Uncaught ReferenceError: once is not defined"
    The modal window doesn't work in another browser (without authorization).
    It's on my site running version Drupal 10.3.1.
    It seems, there was no such error in the previous version in Drupal 10.2.6, but that's not certain.
    But what is certain is that this version also doesn't have this error with design themes like the default theme Olivero 10.3.1 and a theme like Solo 1.0.x-dev.
    But since I used a different theme and worked with it for a long time, during a long trial and testing I found this solution to fix this error that I need to increase permissions for module Contextual Links (Use contextual links).
    But now it's not quite clear to me how such an increase in permissions for this module can affect the security of the site?
    I decided not to use this module for now, probably in the future.
    But I would like to know the answer to this question.
    And also there may be an error:
    "For the cookie "hide_modal_id_undefined" is not set the correct value of the attribute "SameSite"."
    But this is a question for another thread.

  • πŸ‡§πŸ‡·Brazil renatog Campinas

    @cyberm what's the version of Modal, please?

  • πŸ‡ΊπŸ‡¦Ukraine CyberM

    @renatog Modal 5.0.10.

  • πŸ‡§πŸ‡·Brazil renatog Campinas

    Thanks for the confirmation, updating the version

Production build 0.71.5 2024