Everything works fine on my localhost site, but when I copied everything to the live site I get the following issues:

Error: uncaught exception: script.aculo.us requires the Prototype JavaScript framework >= 1.6.0 this comes from some kind of hashed version of the colorbox file v1.3.17.2.

Next, I have a page for a monthly winner created with Views. On the page is an image field. The teaser on the front page is a thumbnail and correct. I click on it and it takes me to the full page where the image should be a medium size. However, the image is the original size. The lightbox works, but is moot since it just pops up an image the same size as the one on the page.

I noticed that the Live site is missing Configure -> Colorbox "Image Filed options (CCK)" where it says "image field gallery" as a subtitle and has radio buttons for "per post gallery, "per page gallery", etc. Could that be part of it?

Also noticed this line in the log: Notice: Undefined index: display_settings in theme_colorbox_image_formatter() (line 24 of /home/mysite/public_html/sites/all/modules/colorbox/colorbox.theme.inc).

When I use Firebug to see what code source is generated for the picture that I want to click on, I see differences on the working localhost site and the HostGator live site:

not working:

<a class="colorbox init-colorbox-processed-processed cboxElement" rel="" title="" href="http://mysite.com/sites/default/files/yard_of_month/July2011.jpg">
<img title="" alt="" src="http://myaite.com/sites/default/files/yard_of_month/July2011.jpg" typeof="foaf:Image">
</a>

working

<a class="colorbox imagefield imagefield-imagelink init-colorbox-processed-processed cboxElement" rel="gallery-59" title="July Yard of the Month Winner" href="http://localhost/drupal2/sites/default/files/yard_of_month/July2011.jpg">
<img title="July Yard of the Month Winner" alt="" src="http://localhost/drupal2/sites/default/files/styles/medium/public/yard_of_month/July2011.jpg" typeof="foaf:Image">
</a>

On top of all that, the insert module isn't working correctly above. There should be an expandable link called "insert" on the configure fields screen. It is't a link and you can't click on it to expose the "enable insert button" and set all the insert styles.
Colorbox module error.

I'm convinced there is some setting or version on HostGator that needs changing. Thanks.

Comments

flightrisk’s picture

Issue summary: View changes

edited to show source

frjo’s picture

Category: bug » support
Priority: Major » Normal

Is this not something you should take up with HostGator?

Since everything woks locally for you it seems to be no problem with you Drupal install or Colorbox.

The error about "script.aculo.us requires the Prototype" must come from some other module you are using. Colorbox use the jQuery library that is included in Drupal core.

flightrisk’s picture

I've been talking to HostGator and so far they can find nothing wrong. I've tried PHP 5.3 and 5.2. the "aculo" error is indeed a problem with colorbox for D7. There must be some left over code. If you search for that error, you will find others who have it, but no solution. I get a notice that is it in a file with a very long name (see URI below) in a .js folder. So it is like a temp or hashed file of the real file. When I open that file, I can see all the comments at the top saying it is colorbox v1.3.17.2. And the routine that causes the problem is here:

// script.aculo.us scriptaculous.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008

Message: Exception thrown and not caught
Line: 458
Char: 8
Code: 0
URI: http://mysite.com/sites/default/files/js/js_Ov1Eyiqs6Mt5-p__fuWPmVZS0MXW...

this is the code, line 458 "throw("Script.aculo....":

var Scriptaculous = {
  Version: '1.8.1',
  require: function(libraryName) {
    // inserting via DOM fails in Safari 2.0, so brute force approach
    document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
  },
  REQUIRED_PROTOTYPE: '1.6.0',
  load: function() {
    function convertVersionString(versionString){
      var r = versionString.split('.');
      return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
    }
 
    if((typeof Prototype=='undefined') || 
       (typeof Element == 'undefined') || 
       (typeof Element.Methods=='undefined') ||
       (convertVersionString(Prototype.Version) < 
        convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
       throw("script.aculo.us requires the Prototype JavaScript framework >= " +
        Scriptaculous.REQUIRED_PROTOTYPE);
    
    $A(document.getElementsByTagName("script")).findAll( function(s) {
      return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
    }).each( function(s) {
      var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
      var includes = s.src.match(/\?.*load=([a-z,]*)/);
      (includes ? includes[1] : 'builder,effects').split(',').each(
       function(include) { Scriptaculous.require(path+include+'.js') });
    });
  }
}
flightrisk’s picture

Well, I can't explain why, I didn't do anything I can think of, but the images are now correct. The lighbox image was then also a medium size, but I could fix that by going into the "manage display" for the image field in that content type and select the lightbox size and I was working again.

frjo’s picture

The js file with "a very long name" is an aggregated file, the Colorbox script just happens to be on top. Drupal has this feature built in (Configuration -> Performance) and there are other modules that do this in different ways as well.

So the "script.aculo.us requires the Prototype" does definitely come from some other module you are using.

Are you using a standard image field for you images? If so then do to your content type and under "manage display" you can set what image style (or original size) to use on the node itself as well as on in the colorbox.

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)
lsolesen’s picture

Issue summary: View changes

made a quick edit

frjo’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)