Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Calendar generates following code which seems ok:
<a rel="gallery-teamcalendar" class="colorbox-inline" href="/?width=600px&height=400px&inline=true#colorbox-inline-1">event1</a>
pop-up is shown correctly, but then the site navigates to the href!
Comments
Comment #1
dolly nyc CreditAttribution: dolly nyc commentedyou need to tell colorbox specifically what content to load -- the / tells it to go to your home page
Comment #2
jamescook CreditAttribution: jamescook commentedI worked around this problem with a hard link to the page which should be in the pop-up. Getting back to the problem now.
In the meantine I upgraded colorbox module to the latest version and the js library too.
To be clearer:
I'm on the main calendar page at "/teamcalendar". I click on the pop-up link in an event.
The link generated is e.g.
/teamcalendar/event/VcA_Netzwerk_Meeting?width=600px&height=400px&inline=true#colorbox-inline-1631749796
Clicking DOES open up a pop-up box with the correct contents BUT after a time (2 or 3 seconds) the page navigates to the href.
So what's happening is that the click which leads to the pop-up opening ALSO is subsequently handled to do a page navigation off the current page.
AFAICT this behaviour should be blocked by js OR the link rendered is wrong - should be
/teamcalendar?width=600px&height=400px&inline=true#colorbox-inline-1631749796
i.e. should stay on the same page that way
Comment #3
jamescook CreditAttribution: jamescook commentedTo answer my own question(!):
Seems that anchor handling js/jquery code (# etc) is conflicting with the colorbox link trigger - haven't investigated it thoroughly yet - but disabling the anchor handling (which does do redirects) solves my problem with the colorbox popup links.
Comment #4
jamescook CreditAttribution: jamescook commented