If I select 'None' from the colorbox settings page style selectbox, the colorbox.js is never attached. I believe this to be in err, as the description for the select states, in part:

Select "None" if you have added Colorbox styles to your theme.

However, the expected behavior is that, while specific style related js and css files are not loaded, basic functionality should be present.

I tracked the issue down to the colorbox/init being only loaded as a dependency for the preset styles and not for 'None'. I see two possible fixes: either remove the check for the style being 'none' and add a library definition for 'none' or add an else where you attach colorbox/init. I'll add a patch doing the latter shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arskiainen created an issue. See original summary.

arskiainen’s picture

Here is the patch.

renatog’s picture

Assigned: arskiainen » renatog
Status: Needs review » Reviewed & tested by the community
Issue tags: +ciandt-contrib
FileSize
82.28 KB

Good catch @arskiainen

I applied the patch and works good for me.

Regards

  • RenatoG committed 728a0b2 on 8.x-1.x authored by arskiainen
    Issue #2873669 by arskiainen, RenatoG: Colorbox does not init if using...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Commited in dev branch.

Thank you very much @arskiainen.

Good Work and Good Weekend.

Regards.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.