Reproduction:

  • Install JavaScript Aggregator
  • Set "Aggregate JavaScript files:" to enabled
  • View an individual scoop's page
  • Observe the voting button images don't appear; All that is visible is a generic form button

Is it possible that one of the JavaScript files for drigg was not closed properly and therefore when it is merged with other JavaScript code, it doesn't function properly?

Comments

sikjoy’s picture

I believe this should be submitted to the Extra Voting Forms module's queue.

I'm not sure what you mean by "not closed properly." Do you mean that a class or function has a missing closing bracket? Can you please clarify?

--sicjoy

philbar’s picture

I'm not sure. All I know is that something is not playing nice when combined with other JavaScript.

Here is the other JavaScript files it combines with:

/misc/jquery.js
/misc/drupal.js
/sites/all/modules/drigg/drigg/drigg.js
/sites/all/modules/drigg/drigg_rl/drigg_rl.js
/sites/all/modules/extra_voting_forms/extra_voting_forms.js
/sites/all/modules/jquery_update/compat.js

EDIT: Apparently the culprit is jquery. See: http://drupal.org/node/266594

philbar’s picture

I do get an error with drigg.js because $ is not defined:

// This is executed on document load.
//
// If this appears to be a drigg node form, wire up the text
// entries for validation.

$(function(){
	if ( $("#edit-drigg-node-form").length > 0 ) {
		$("#edit-trackback-ping-url").blur(DriggValidatePingURL);
                //if(! drigg_editing_node ){
			$("#edit-url").blur(DriggValidateStoryURL);
                //}
		$("#edit-title").blur(DriggValidateTitle);
                $("#edit-title").blur(DriggValidateBody);
		$("#node-form").submit(DriggValidateBeforeSubmit);
	}
});
sikjoy’s picture

$ is defined by jQuery. jQuery is part of Drupal core. It seems like there is either something wrong with your installation or JavaScript Aggregator is placing the JS files in the wrong order. More specifically, jQuery must come first as most JS in Drupal depends upon it.

--sicjoy

philbar’s picture

Assigned: Unassigned » philbar

I'll try to investigate it more later tonight. I also noticed a problem with the javascript used in XML Sitemap.

mercmobily’s picture

Hi,

OK. THANK you all!
And... please keep in mind that we can't really fix Drupal's own bugs, and can't keep bugs open here if they are not strictly related to Drigg!

Merc.

philbar’s picture

Status: Active » Closed (fixed)

I'm not really sure what was causing the problem, but I'm pretty sure I got it working. I discovered that jQuery Update module had some problems with collapsible menus.

Right now I have Aggregate JS and Optimize JS enabled. I have excluded "compat.js" from jQuery Update. I haven't discovered any problems thus far.

PS How is that documentation wiki coming? I have a lot of information that I can add to it so other users don't have to hunt around for answers like I had to.

mercmobily’s picture

Hi,

It's best not to discuss things in a closed bug...
Wiki are expensive in terms of time. They get vandalised consistently. I have a "tutorial" section at http://www.drigg-code.org -- it would be great if you could write some...

Merc.