Issue Details (XML | Word | Printable)

Key: MDL-10367
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Critical Critical
Assignee: Tim Hunt
Reporter: Urs Hunkler
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

adding require_js to meta.php in a theme loads the rquested library twice.

Created: 06/Jul/07 03:46 PM   Updated: 03/Feb/09 03:31 PM
Component/s: AJAX
Affects Version/s: 1.8.1
Fix Version/s: None

Issue Links:
Relates
 

Participants: Tim Hunt and Urs Hunkler
Security Level: None
Resolved date: 03/Feb/09
Affected Branches: MOODLE_18_STABLE


 Description  « Hide
What I have:

The meta.php in the custom theme folder contains:
(I added the echo statements around require_js for debugging)

<?php echo ('<!-- include start -->');
require_js($CFG->wwwroot.'/lib/mootools/mootools_comp.js');
echo ('<!-- include end -->'); ?>

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpswwwroot ?>/theme/textcampus/styles_ie7.css" />
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpswwwroot ?>/theme/textcampus/styles_ie6.css" />
<link rel="stylesheet" media="all" type="text/css" href="<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/basic_dd_ie.css" />
<![endif]-->

The correlating output in the Moodle page is:

<!-- include start --><script type="text/javascript" src="http://moodle18.userver.lan/lib/mootools/mootools_comp.js"></script>
<!-- include end -->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="http://moodle18.userver.lan/theme/textcampus/styles_ie7.css" />
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="http://moodle18.userver.lan/theme/textcampus/styles_ie6.css" />
<link rel="stylesheet" media="all" type="text/css" href="http://moodle18.userver.lan/theme/textcampus/basic_dd_ie.css" />
<![endif]-->
<script type="text/javascript" src="http://moodle18.userver.lan/lib/mootools/mootools_comp.js"></script>

The mootoolscomp.js library gets loaded twice.

When I load the library with require_js from header.html all works well.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Urs Hunkler added a comment - 06/Jul/07 04:00 PM
Might have a relation to MDL-10075?

Tim Hunt added a comment - 03/Feb/09 03:31 PM
I just tested, and I this is now working. (I think sam marshall fixed it at some point.)