Js agregate colorbox doesn't work

Created on 25 March 2025, 3 months ago

Hello,

When I check the box to agregate js files on /admin/config/development/performance
Colorbox no longer works even after clearing the cache. The file opens fine, but without the colorbox functions (cross, legend, design...). I have to go back in my browser to return to my content.

I use advagg js minify/admin/config/development/performance/advagg/js-minify
If I put
JSMin+ ~1300ms
or
Disabled

It is the same.

Have you got an idea why agregate js files cause problem ?

Thank you

🐛 Bug report
Status

Active

Version

2.1

Component

Miscellaneous

Created by

🇫🇷France selinav

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

Comments & Activities

  • Issue created by @selinav
  • 🇫🇷France selinav

    For information my theme.info

    name: perso
    type: theme
    base theme: false
    description: 'A clean, accessible, and flexible Drupal front-end theme.'
    alt text: 'Screenshot of perso, Drupal front-end theme.'
    core_version_requirement: '>=10.0'
    package: Core
    version: 10x
    libraries:
      - perso/global-styling
    regions:
      header: Header
      primary_menu: 'Primary menu'
      secondary_menu: 'Secondary menu'
      hero: 'Hero (full width)'
      highlighted: Highlighted
      breadcrumb: Breadcrumb
      social: Social Bar
      content_above: Content Above
      content: Content
      sidebar: 'Sidebar'
      content_below: 'Content Below'
      footer_top: 'Footer Top'
      footer_bottom: 'Footer Bottom'
    libraries-override:
      system/admin:
        css:
          theme:
            css/system.admin.css: false
      system/base:
        css:
          component:
            css/components/ajax-progress.module.css: css/components/ajax-progress.module.css
            css/components/autocomplete-loading.module.css: css/components/autocomplete-loading.module.css
      core/drupal.checkbox: false
      core/drupal.dropbutton:
        css:
          component:
            misc/dropbutton/dropbutton.css: css/components/dropbutton.css
      core/drupal.vertical-tabs:
        css:
          component:
            misc/vertical-tabs.css: css/components/vertical-tabs.css
      media/oembed.formatter: false
      layout_builder/twocol_section: perso/layout_builder_twocol_section
      layout_builder/threecol_section: perso/layout_builder_threecol_section
      layout_builder/fourcol_section: perso/layout_builder_fourcol_section
    libraries-extend:
      core/drupal.message:
        - perso/drupal.message
      core/drupal.collapse:
        - perso/details
      core/drupal.dialog:
        - perso/drupal.dialog
      core/drupal.progress:
        - perso/progress
      layout_discovery/onecol:
        - perso/layout_discovery_section
      layout_discovery/twocol_bricks:
        - perso/layout_discovery_section
      layout_discovery/twocol:
        - perso/layout_discovery_section
      layout_discovery/threecol_25_50_25:
        - perso/layout_discovery_section
      layout_discovery/threecol_33_34_33:
        - perso/layout_discovery_section
      node/drupal.node.preview:
        - perso/drupal.node.preview
      content_moderation/content_moderation:
        - perso/content_moderation
    
  • 🇫🇷France selinav

    Can anyone help me with any ideas about what the problem might be if it's not the module?

    I think it's my theme because I'm using the module on another site and I'm not having the same problem.
    What can I check?

    Thanks

  • 🇫🇷France selinav

    After long hours of research, I discovered that it was my custom theme. In the web console, I got a message saying "drupal.ajax is undefined."
    When I created my theme over a year ago, I made a copy of the Olivero theme. Mine worked fine, but there must have been some Drupal 10 updates that weren't reflected in my theme. I searched and couldn't find anything, so I started with a new version of the Olivero theme.

    After making a copy of the new version of the Olivero theme and adapting it to my design, my theme works fine, and there are no more JavaScript aggregation issues.

Production build 0.71.5 2024