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.
Why is it printing out the text twice? How do I change what is displayed in the close div? Here is the div that gets printed out:
<div id="TB_closeAjaxWindow"><a href="#" id="TB_closeWindowButton" title="Close,Close">Close,Close</a> or Esc Key,or Esc Key</div>
Thanks for your help.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1.jpg | 26.58 KB | vmkazakoff |
#5 | already_added.patch | 444 bytes | dkingofpa |
Comments
Comment #1
frjo CreditAttribution: frjo commentedI have never seen this problem and not heard anyone else mention it. Hmm.
Have you by any change managed to translate "Close" to "Close,Close"? Sounds a bit far fetched.
If you are interested in Lightbox features please test the new Colorbox module.
http://drupal.org/project/colorbox
I have ported all Thickbox features to Colorbox so it should work as a drop in replacement.
When Colorbox has a stable release I will start actively recommend people to switch/upgrade from Thickbox to Colorbox. I'm the maintainer of Thickbox and a co-maintainer of Colorbox.
Comment #2
dkingofpa CreditAttribution: dkingofpa commentedI didn't touch any of the files in the module. Just dropped it in and enabled it. I'm using thickbox with the splash module. Any weird interactions there? Thanks
Comment #3
dkingofpa CreditAttribution: dkingofpa commentedI dumped my Drupal.settings.thickbox variable at the top of the tb_show function into the javascript console. Output is below. Why are there two entries in close and esc_key? Where are those populated?
Comment #4
frjo CreditAttribution: frjo commentedIt is _thickbox_doheader() in thickbox.module that populates the settings.
Try clearing the Drupal cache and make sure you only have one version of thickbox installed.
Comment #5
dkingofpa CreditAttribution: dkingofpa commentedI think I found and fixed the error. _thickbox_doheader() was getting called twice and the $js_settings array was getting added to Drupal.settings.thickbox twice.
In _thickbox_doheader(), the original code looks like this:
I changed it so $already_added gets set to TRUE.
Does this make sense? I attached a patch (hope it's in the right format).
Comment #6
frjo CreditAttribution: frjo commentedNo idea when this bug managed to get in. Thanks for finding it!
I have committed a fix to 6-dev, slightly different from you patch. Will make a new release soon.
Comment #7
vmkazakoff CreditAttribution: vmkazakoff commentednot help in my situation...
i have the same:
Comment #8
vmkazakoff CreditAttribution: vmkazakoff commentedym...
but i make the next changes in you path:
OLD:
static $already_added;
if ($already_added) {
return; // Don't add the JavaScript and CSS multiple times.
} else {
$already_added = TRUE;
}
MY version:
static $already_added = TRUE;
if ($already_added) {
return; // Don't add the JavaScript and CSS multiple times.
} else {
$already_added = TRUE;
i dont no why, but it help my.
aniway: thanks for you path. It's more easily to find this function.
PS: sorry for my english...
Comment #9
gaintsev CreditAttribution: gaintsev commentedThanks! Had the same problem. The latter solution has helped.