Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The symptoms:
1. IE is rendering the nav menu (normally located in the header) in the absolute upper-left corner of the screen on certain pages, and the drop-downs don't work at all. When resizing the window, the menu instantly realigns itself to the proper location, but the drop-downs still don't work.
2. IE also spits out the following error:
Line: 2
Char: 1
Error: Syntax error
Code:0
URL: [my url]
The circumstances:
This problem appears to occur on admin/access and node/3 pages (i.e. xxx/yyy/zzz), whereas the problem does not exist in root pages (i.e. node, admin).
Thoughts:
This smells like an IE, JavaScript, and / or CSS problem.
Comments
Comment #1
JoshLangner CreditAttribution: JoshLangner commentedEdit: Just FYI, everything works fine in Firefox and Opera.
Comment #2
JoshLangner CreditAttribution: JoshLangner commentedOkay, I nailed the problem. Here is the situation: The broken code is as follows:
As you can see, the links that use "dev472/...", which is the root directory to my site, work correctly, whereas the links with "... do not.
The code on page.tpl.php that generates this is:
I changed the $base_url to be "url(NULL, NULL, NULL, FALSE)", which produces exactly what I want:
There. Now my the drop-downs will work with Drupal installations that have roots in subdirectories.
Comment #3
JoshLangner CreditAttribution: JoshLangner commentedFor future reference, there are other instances of $base_url that may cause problems. Best get these fixed.
Comment #4
JoshLangner CreditAttribution: JoshLangner commentedFor future reference, there are other instances of $base_url that may cause problems. Best get these fixed.
Comment #5
rkerr CreditAttribution: rkerr commentedSuppose those should be base_path() instead of $base_url .... will update CVS in a minute.