[SOLVED][Drupal Colorbox] Trouble with question mark in the URL when loading an outside page in Colorbox?

| | 1 min read

Many Drupal users have been encountering trouble with question marks in the URL when loading an outside page in Colorobox. If you are facing the same situation with Colorbox and multiple queries in URLs in your Drupal site then read on to find out the cause and the fix.

Here is the cause and the fix.

  • This issue occurs due to the improper use of multiple queries in a URL used to call an external site within Colorbox.
  • The question mark in a url is there to separate the path from the query.
  • To separate multiple queries use an ampersand (&).
  • Here is a WRONG implementation
    <a href="http://maps.google.de/maps?q=25,+Neie+Wee,+Schieren,+Luxembourg?width=800&height=600&iframe=true" class="colorbox-load">Map</a>
  • Here is the RIGHT implementation
    <a href="http://maps.google.de/maps?q=25,+Neie+Wee,+Schieren,+Luxembourg&width=800&height=600&iframe=true" class="colorbox-load">Map</a>

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more.