Hi there,
did you know that problem, if like to use a width the rel attribute breaks..

like this ->
<a rel="600px]" href="http://xxxxx">Search google</a>
this works ->
<a href="http://www.google.com" rel="lightframe[][my caption]">Search google</a>
this works ->
<a href="http://www.google.com" rel="lightframe[search]">Search google</a>
but this not ->
<a href="http://www.google.com" rel="lightframe[|width:400px; height:300px; scrolling: auto;]">Search google</a>

Could someone can give me a hint?




Status:Active» Postponed (maintainer needs more info)

I can't reproduce that problem using the latest dev release. Can you provide a link to your site where I can see it happening? My contact form is enabled if you wish to do so privately (just quote the ticket number).


Do you have the input filter "Disable Lightbox iframe filter" enabled for the input format you're using? You can check at admin/settings/filters. If so, you should disable it.

It's disabled..

actually it's one of the other filters that interferes - I think it's "HTML corrector", or possibly "HTML filter" (though I wouldn't recommend disabling this one for untrusted users). It's also possible removing the spaces from the rel attribute might fix the problem.

Status:Fixed» Postponed (maintainer needs more info)

I setup a own lightbox filter now - and that works :-) for a note but..

if I use the lightframe in a view - "Rewrite the output of this field" - it doesn't work .. I disabled all filters only the lightbox-filters are active...

Status:Postponed (maintainer needs more info)» Fixed

Status:Postponed (maintainer needs more info)» Active

sorry to fast ...

is there not a way to escape tokens... seems like that is the problem

I'm also having this problem. Has any maintainer looked into this and what might be causing it? I am trying to use the rewrite in views to make a emfield video lightbox'ed with a specific width and height (or else it plays in the lightbox with scroll bars). Perhaps there's another way to do it.

To be specific, I tried disabling all the default site filters and enabling all lightbox filters except for the Disable Lightbox iframe filter.

In my view, I have a video emfield- Content: Video (field_video_upload)

I am rewriting output of this field as:

<a href="[field_video_upload_fid]" rel="lightvideo[|width:400px;height:300px;][caption]">%1</a>

in the rendered HTML for the view, it comes up deformed, as:

<span class="field-content"><a href="http://localhost/sites/default/files/video/Wildlife.wmv" rel="300px;][caption]">Media node</a></span>

when I leave out the width/height as:

<a href="[field_video_upload_fid]" rel="lightvideo[][caption]">%1</a>

it renders correctly the video with "caption" in the lightbox.

So, ..... ? What's this all about? @taits asks a good question: can you escape the [] brackets, because maybe views is trying to interpret this as a token? I tried \[|width...\] but that didn't take any differently.

Advice? Is this not workable because of the square brackets? Is your the patch you guys are passing around in #474454: Views lightbox2 custom field handler (update) going to work better for me in this case to display video?

-- glen

The problem is a conflict with one of the input filters. I can't remember which one exactly, it may be the "html corrector".

@Stella, yes I saw that in an earlier post. However, I tried disabling ALL the filters for "Full HTML" and it didn't make a change. I am also using Better Formats to manage filters. Am I missing something? Is there a view-specific filters definition?

Category:bug» feature

I would recommend that the code check that the offending filter is not enabled when the module is installed.


new48.3 KB

when trying to add a lightbox trigger i get the following error. any help would be appreciated. i have the following config:
FileField 6.x-3.2
Image 6.x-1.0-alpha5
ImageAPI 6.x-1.6
ImageCache 6.x-2.0-beta10
Lightbox2 6.x-1.x-dev (2009-Oct-02)

im also experiencing rewrite issues like above when i add width and height to output field. i have "Disable Lightbox iframe filter" enabled

Category:feature» support

to add to my previous post here is the code im using (image thumb to open vimeo emed video).

<a class="emvideo-thumbnail-replacement emvideo-modal-lightbox2 lightbox2 lightbox-processed emvideo-thumbnail-replacement-processed" rel="lightframe[flash_video|width:416; height:283;]" title="Cinemash: Training Day " href="/littlebleufilms/emvideo/modal/93/400/267/field_embedded_video/vimeo/7207609">
<span/><img width="200" height="135" title="Thumbnail Not Available" alt="Thumbnail Not Available" src="http://3rwebdesign.com/littlebleufilms/sites/default/files/emvideo-vimeo-7207609.jpg"/>

When i use firebug to see output i get:

<a class="emvideo-thumbnail-replacement emvideo-modal-lightbox2 lightbox2 lightbox-processed emvideo-thumbnail-replacement-processed views-processed" href="/littlebleufilms/emvideo/modal/93/400/267/field_embedded_video/vimeo/7207609" title=" Training Day " rel="283;]">
<span/><img width="200" height="135" src="http://3rwebdesign.com/littlebleufilms/sites/default/files/emvideo-vimeo-7207609.jpg" alt="Thumbnail Not Available" title="Thumbnail Not Available"/>

you'll see the rel="lightframe[]" is breaking

I'm having the same problem, it only works if I'm not using any filters (ie: PHP mode... which is obviously not very useful for a community site :) But we're talking about a bigger issue here - allowing certain characters or attributes within an input format that is not as granular as individual HTML attributes, only tags. It's stripping it because it looks like javascript.

It's a little off-putting that this important views compatibility issue has not yet been resolved.

Can we get Lightbox2 to support something other than square-bracketed options that interfere with views, like:

rel="lightvideo{|width:400px;height:300px;}{caption}" or whatever????!

It happens because of the colon separators in the style part. You could get around it by allowing an alternative separator, such as an equal sign (which worked for me, with a small change to the "setStyles" function in "lightbox.js" in 6.x-1.x-dev (I think the latest release)).

dosborn - you are the man! ran into this very problem in using views to rewrite the output using latest version (6.x-1.9),

starting at line 1030 of lightbox.js, changed setStyles(), lines:


      if (stylesArray[i].indexOf('width:') >= 0) {
        var w = stylesArray[i].replace('width:', '');

      if (stylesArray[i].indexOf('width=') >= 0) {
        var w = stylesArray[i].replace('width=', '');

      else if (stylesArray[i].indexOf('height:') >= 0) {
        var h = stylesArray[i].replace('height:', '');

      else if (stylesArray[i].indexOf('height=') >= 0) {
        var h = stylesArray[i].replace('height=', '');

      else if (stylesArray[i].indexOf('scrolling:') >= 0) {
        var scrolling = stylesArray[i].replace('scrolling:', '');

      else if (stylesArray[i].indexOf('scrolling=') >= 0) {
        var scrolling = stylesArray[i].replace('scrolling=', '');

      else if (stylesArray[i].indexOf('overflow:') >= 0) {
        var overflow = stylesArray[i].replace('overflow:', '');

      else if (stylesArray[i].indexOf('overflow=') >= 0) {
        var overflow = stylesArray[i].replace('overflow=', '');

I'm not exactly sure if there is a specific reason for using ':' instead of another separator like "="? Maybe stella can answer this but wouldn't it make sense to use '=' by default if there is no real benefit to using colon instead? It seems views likes this better. Just a thought.

Thanks guys

Priority:Normal» Major

I have the lates dev version, and have modified the lightbox.js version as in#18, and the modification allows the lightbox to appear when being set with and = vs :, however the sizes are ignored


This is a pretty urgent issue for me,

@dosborn & @tiato rock.
This worked for me too. Just a note though. If you are using any other lightbox triggers in views this adjustment will break them because they are looking for ":" instead of "="

Status:Active» Needs review
new1.45 KB

Here is a patch that accomplishes #18 above.

Patch worked like a charm. Thanks!

@ #19 : Clear the browser cache and reload the page - that works for me

Status:Needs review» Reviewed & tested by the community

+1 for patch #21, working here too

The patch at #21 worked for me and fixed this issue: #1985346: lightframe does not work for IE 8/9/10

ps - I did this for Drupal 7.