Closed (fixed)
Project:
Colorbox
Version:
2.1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2025 at 15:16 UTC
Updated:
14 May 2025 at 06:54 UTC
Jump to comment: Most recent
The new logic that checks the href to match the protocoll of the page doesn't support root-relative URL's (/sites/default/files....), which are the default and recommended as you don't need to cache by domain then.
Should check for things starting with a / and not dropping that then.
The handling of that also seems weird, if it unsets it then colorbox will do a request to domain/path/undefined, so it should probably log something and abort initialization instead of this?
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
paulmckibben@berdir can you please provide a list of steps to reproduce the issue?
Comment #4
berdirCreated a merge request, works for us, but not sure if there's a better way to deal with this in general.
Comment #5
paulmckibbenAdded steps to reproduce.
Comment #7
paulmckibbenMR is merged. Thank you @berdir!
Comment #8
paulmckibbenI thought I clicked the boxes for issue credit, but they're not checked. Trying again.
Comment #9
paulmckibbenIncidentally, this should not have been a Critical bug, per the definitions. This did not bring down a site or cause a security issue, it just broke certain content. Changing to Major.
Comment #10
florian commentedThis version works well!
After module update and after clearing Drupal cache it is a must to clear browser's cache as well.
Comment #11
berdirSaw the e-mail notification and came here to say that this should also work fine for protocol-relative paths as we just look for starting with /. but you edited your comment already.
That said, protocol-relative paths are discouraged and should not be used anymore, just always use https:// (or root relative paths), see https://www.designcise.com/web/tutorial/why-protocol-relative-url-are-no....