I see the Expand | Collapse menus but they aren't working.

Comments

jrockowitz’s picture

espirates,

I could not exactly duplicate your issue. My guess is that maybe you had already installed the fieldset_helper module and updated it. I made a minor tweak to my code to try to handle this scenario.

Try un-installing and re-installing the module.

What browser and OS are you using?

Are there any javascript errors being logged?

Thanks,
~Jake

espirates’s picture

Just these errors

JavaScript - ?q=admin/modules
Event thread: load
Error:
name: TypeError
message: Statement on line 1: Type mismatch (usually non-object value supplied where object required)
stacktrace:   Line 1 of function script 
    this.contentDocument.postMessage('cooliris')
  ...
JavaScript - ?q=admin/build/modules
Event thread: load
Error:
name: TypeError
message: Statement on line 1: Type mismatch (usually non-object value supplied where object required)
stacktrace:   Line 1 of function script 
    this.contentDocument.postMessage('cooliris')
  ...
JavaScript - ?q=admin/build/modules
Event thread: mouseout
Error:
name: ReferenceError
message: Statement on line 77: Undefined variable: time
stacktrace:   Line 77 of User JS script 
    function(){if(time)clearTimeout(time);}
  ...
JavaScript - ?q=admin/build/modules
Event thread: mouseout
Error:
name: ReferenceError
message: Statement on line 77: Undefined variable: time
stacktrace:   Line 77 of User JS script 
    function(){if(time)clearTimeout(time);}
  ...
deleted rest of errors for ease of scrolling...
jrockowitz’s picture

espirates,

Thanks for submitting your javascript error log. Neither one of the below script error's stacktrace is from the fieldset_helper's javascript file.

this.contentDocument.postMessage('cooliris')
function(){if(time)clearTimeout(time);}

My guess is a different module that is installed is throwing the above errors which is killing all the javascript, including the fieldset helper, on the page.

Do you have 'Optimize JavaScript files' enabled in Administer > Site configuration > Performance (admin/settings/performance)?
If it is enabled try disabling it and check if the Expand/Collapse starts working. You can then view the page source and see which javascript files are being loaded. Cut-n-paste the list here and I will try to figure which script is throwing the error.

Thanks
~jake

espirates’s picture

I only have a few other modules enabled, don't think they could be interfering, the module just isn't working on mac using Opera and Safari browser.

I did managed to find this error messages

JavaScript - ?q=admin/settings/fieldset_helper
Event thread: mouseout
Error:
name: ReferenceError
message: Statement on line 77: Undefined variable: time
stacktrace:   Line 77 of User JS script 
    function(){if(time)clearTimeout(time);}
  ...
JavaScript - ?q=admin/settings/fieldset_helper
Event thread: mouseout
Error:
name: ReferenceError
message: Statement on line 77: Undefined variable: time
stacktrace:   Line 77 of User JS script 
    function(){if(time)clearTimeout(time);}
  ...
JavaScript - ?q=admin/settings/fieldset_helper
Event thread: mouseout
Error:
name: ReferenceError
message: Statement on line 77: Undefined variable: time
stacktrace:   Line 77 of User JS script 
    function(){if(time)clearTimeout(time);}

TypeError: Result of expression 'Drupal.FieldsetHelper' [undefined] is not an object.
jrockowitz’s picture

I don't own a mac but I have tested the code in Safari PC and Opera Linux. Can you test the issue using Firefox which usually has a more detailed error log?

If it is my code I have to pinpoint where the [undefined] item is before I can fix the problem.

You might install just this module in a new Drupal installation and confirm that the bug still exists?
If you can't do a clean install I will set one up and email you the login.

There is also a hidden test page (admin/settings/fieldset_helper/test) that you can use make sure the fieldset helper script is not working. This would help me confirm that the issue is only be occurring on the module page and nowhere else.

Thanks for having patience.

espirates’s picture

Not working on SlowFox either, on the test page the only thing working is Test a collapsible fieldset that is just plain html, the others only work if you manually click the fieldset.

Error Console

Error: Drupal.FieldsetHelper is undefined
Source File: javascript:Drupal.FieldsetHelper.collapseFieldsets('#system-modules%20>%20div%20>%20fieldset.collapsible');
Line: 1

Error: Drupal.FieldsetHelper is undefined
Source File: javascript:Drupal.FieldsetHelper.expandFieldsets('#system-modules%20>%20div%20>%20fieldset.collapsible');
Line: 1

Error: Drupal.FieldsetHelper is undefined
Source File: javascript:Drupal.FieldsetHelper.collapseFieldsets('#system-modules%20>%20div%20>%20fieldset.collapsible');
Line: 1
jrockowitz’s picture

'Error: Drupal.FieldsetHelper is undefined' means that the fieldset_helper.js file is just not loading due to a script error on the page.

Please try my demonstration page and see if it works.
http://drupal.bigbluedrop.com/admin/settings/fieldset_helper/test

If my demo page is working correctly then the issue is either another contributed module and/or theme. The next step would be for you to attach a saved 'zipped' copy of the admin/modules page with all the related files and this will give me a list of all your installed modules with their related javascript files..

If my demo page is not working then I have borrow a Mac laptop to duplicate the issue and fix the problem.

Thanks for your patience,
~jake

espirates’s picture

Ok, I figured out what the problem was, it's the Admin module, http://drupal.org/project/admin

When disabled, the categories now have a toggle arrow and the expand collapse works. Is there anyway to make it work with the Admin module, would hate to give up this Admin theme.

jrockowitz’s picture

espirates,

This morning I was experimenting with the Admin module and noticed the same problem. I added the problem to my issue queue.

I am not 100% sure I can fix this because the Admin module is basically converting every fieldset to a div and my code is targeting the default Drupal core fieldset output. I am little stumped so I have to think about what is the best solution. I might not be able to get the fieldset_helper module to work within the Admin module's theme.

Thanks
~jake

jrockowitz’s picture