To open an URL in a modalframe using Colorbox, it should be like this (according to the documentation):
"[path]?width=500&height=500&iframe=true"

These URL parameters are passed onto the target website. So when you take a look at the Modalframe, you can see the URL used is:
<div id="cboxLoadedContent" style="width: 1400px; overflow: auto; height: 900px; "> <iframe frameborder="0" name="cbox1344331012950" src="http://example.com/?width=1400&height=900&iframe=true" class="cboxIframe"></iframe></div>

This is not correct by design I think, why should you pass the parameters needed for the Colorbox onto the target website. This leads to problems in two cases I think:

  1. When you want to pass parameters to the target website. Sometimes you want to open a target website and pass a parameter for height. How can this work when the parameters for the Colorbox are still in de URL?
  2. Sometimes the target website cannot handle the URL because of the parameters (especially with web applications). In our situation we got the message: "The page you are trying to request does not (yet) exist.". Because the web application didn't know how to handle the parameters.

Possible solution:
It would be much better when the parameters for the colorbox are passed as arguments in the class instead of the URL (something like: http://archive.plugins.jquery.com/project/metadata). Don't how if it works, but would be a cleaner solution.

Ugly patch:
For the time being I have quite an ugly patch to get this working.
In the colorbox_load.js I strip the arguments from the URL when creating the iframe. It is a really ugly patch, but this is the only think I could think of because, unfortunately, my knowledge of Javascript and Jquery is quite limited.

    iframe:function(){
      return $.urlParam('iframe', $(this).attr('href'));
    },

-->

    iframe:function(){
	var html = $.urlParam('iframe', $(this).attr('href'));
	$(this).attr('href', $(this).attr('href').split('?width=')[0]);
	return html;
    },
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pvanerk’s picture

pvanerk’s picture

Status: Active » Needs review
frjo’s picture

Status: Needs review » Closed (won't fix)

Closing old issues that doesn't seems to effect a lot of users.

Stevel’s picture

Version: 6.x-1.2 » 7.x-2.x-dev
Status: Closed (won't fix) » Active

I'm also affected by this issue. The width, height and iframe parameters are still passed to the iframe in the latest version.

sblommers’s picture

Added fixed colorbox_load patch with correct patch (so it works with patch from root and drush make)

frjo’s picture

Status: Active » Closed (won't fix)