Javascript is broken when both the book.module and the javascript aggregation performance setting are enabled.

CommentFileSizeAuthor
#2 add_js_semicolon_1.patch1.64 KBdvessel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dvessel’s picture

I can verify this problem. It also happens in example.com/admin/user/user which loads these to scripts when not aggregated.

<script type="text/javascript" src="/misc/jquery.js"></script>
<script type="text/javascript" src="/misc/drupal.js"></script>
<script type="text/javascript" src="/misc/tableselect.js"></script>
<script type="text/javascript" src="/misc/tableheader.js"></script>

Gives a parsing error.

dvessel’s picture

Status: Active » Needs work
FileSize
1.64 KB

It was a missing semicolon at the end of the function. Deans packer script requires it. I found only 3 instances of this.

dvessel’s picture

Status: Needs work » Needs review
pwolanin’s picture

Title: Javascript breaks when both Book module and Javascript aggregation are enabled » Javascript breaks when Javascript aggregation is enabled
pwolanin’s picture

added a new page to the Handbook under coding standards:

http://drupal.org/node/172169

webernet’s picture

Status: Needs review » Reviewed & tested by the community

Tested OK.

pwolanin’s picture

I also tested, and this fixes the bugs.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

This sounds quite logical, committed.

dvessel’s picture

Wanted to note that webernet found the bug and pretty much found the cause, we were all searching for where it was happening and after it was found, I made the patch. So, he should be credited too.

Anonymous’s picture

Status: Fixed » Closed (fixed)