Posted by mikeytown2 on January 9, 2009 at 11:33pm
| Project: | Beautify |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | psynaptic |
| Status: | active |
Issue Summary
If you change the garland theme so that the javascript it outputted at the end of the document, javascript doesn't load correctly.
Following these rules
http://developer.yahoo.com/performance/rules.html#js_bottom
http://wimleers.com/article/improving-drupals-page-loading-performance#r...
Built-in doesn't have this issue.
Comments
#1
Ahh yes, I use JS at the bottom of my page too.
I've found that it works on my test site and on 1 live site although the script tags are not well formed like they are when they are in the head.
Can you describe the problem a little more so I can try and track this down?
#2
Using Javascript Aggregator, and Dhtml Menu as well.
http://drupal.org/project/javascript_aggregator
http://drupal.org/project/dhtml_menu
I can't think of any thing else that would effect it
#3
I have installed DHTML Menu and Javascript Aggregator, enabled the permissions 'access administration pages' and 'administer site configuration' for anonymous users, set the JS aggregation to on and placed the administer menu in the left sidebar of Garland. JavaScript is still functioning for me with $scripts at the bottom as in Wim Leers' guide. I have tested in both Beautify and Compact modes of htmLawed.
It might be something else about your setup that's causing this. Can you explain more so we can try and track this bug down? Thanks.
#4
I think it revolves around HTML and XHTML
I've disabled JS and it still gives me a very odd page layout on the Modules Page
in FF3 heres the view source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>Modules | Blue Diamond Home & RV</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/drupal-6.8/sites/default/files/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/node/node.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/admin.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/defaults.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/system.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/system-menus.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/user/user.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/cck/theme/content-module.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/date/date.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/directory/directory.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/filefield/filefield.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/graphstat/graphstat.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/imagefield/imagefield.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/office_hours/office_hours.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/tabs/drupal-tabs.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/text_resize/text_resize.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/cck/modules/fieldgroup/fieldgroup.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/faceted_search/faceted_search_ui.css?7" />
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/themes/my_garland/style.css?7" />
<link type="text/css" rel="stylesheet" media="print" href="/drupal-6.8/sites/all/themes/my_garland/print.css?7" />
<!--[if lt IE 7]>
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/themes/my_garland/fix-ie.css" /> <![endif]-->
</head>
<body >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Modules | Blue Diamond Home & RV
<div id="header-region" class="clear-block">
</div>
<div id="wrapper">
<div id="container" class="clear-block">
<div id="header">
<div id="logo-floater">
Here's the view generated source
<html dir="ltr" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<title>Modules | Blue Diamond Home & RV</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="/drupal-6.8/sites/default/files/favicon.ico" type="image/x-icon">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/node/node.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/admin.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/defaults.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/system.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/system/system-menus.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/modules/user/user.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/cck/theme/content-module.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/date/date.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/directory/directory.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/filefield/filefield.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/graphstat/graphstat.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/imagefield/imagefield.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/office_hours/office_hours.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/cck/modules/fieldgroup/fieldgroup.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/modules/faceted_search/faceted_search_ui.css?7">
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/themes/my_garland/style.css?7">
<link type="text/css" rel="stylesheet" media="print" href="/drupal-6.8/sites/all/themes/my_garland/print.css?7">
<!--[if lt IE 7]>
<link type="text/css" rel="stylesheet" media="all" href="/drupal-6.8/sites/all/themes/my_garland/fix-ie.css" /> <![endif]-->
</head><body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Modules | Blue Diamond Home & RV
<div id="header-region" class="clear-block">
</div>
<div id="wrapper">
<div id="container" class="clear-block">
<div id="header">
<div id="logo-floater">
#5
latest div fixes this. I think it does, anyway kinda a mute point since logged in doesn't see output, and the error is the most evident on the admin module page.
#6
Hi mikeytown2, thanks for the help.
It looks like the doctype is being added back wrongly. If that was the case then it wouldn't be just happening on the modules page. Can you have a look with anonymous users and see if you can see the doctype being put back in the wrong place, or anything that might help us sort this (unless it's fixed!).
#7
I think it was the cache... JS appears to have stopped working again.
#8
Oh, that's a shame. Can you paste your HTML source again?
#9
K figured this one out i think after doing a diff on the source...
Normal Output
<script type="text/javascript"><!--//-->
<![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/",
Mod Output
<script type="text/javascript">
<![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/",
Not 100% because the diff program had a lot of trouble with the files but, I think this is it.
#10
The seems to just remove a comment which wouldn't cause any problems.
Please post the source of your unprocessed and processed HTML. Thanks.
#11
#12