Closed (fixed)
Project:
Javascript Tools
Version:
4.7.x-1.x-dev
Component:
Collapsiblock
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Apr 2006 at 13:53 UTC
Updated:
12 May 2006 at 18:45 UTC
I have a large number of menus that I put in different blocks. When clicking on a link in one block and having another block collapsed makes unfortunately the menus in the latter block reappear. Is it possible to have a block collapsed until I explicitly open it, closed (and vice versa)?
Comments
Comment #1
nedjoThanks for reporting this. The behaviour you describe is what is supposed to happen, so I'd appreciate you help tracking down why you're not seeing it.
At the beginning of a user session, the state of a block is determined by what the site admin has set at that block's configuration--not collapsible, collapsible and expanded, collapsible and collapsed.
Then document cookies are used to track the collapsed state of a block over a session. So, e.g., on each new page load, a block is collapsed if either (a) its default admin-configured state is collapsed, and a user has not changed its state yet in the session, or (b) a user has collapsed the block on a previous page view in the session.
I added this persistence only a day or two ago. Are you using the latest version? Does it have a setCookie call in the.js file?
Do you have cookies enabled? Are you getting any js error messages? (In Firefox, open the Tools > Javascript Console and see if there's anything there.)
Comment #2
gdip commentedYou write "is determined by what the site admin has set at that block's configuration"...
I use the latest Drupal 4.7 rc3 but I cannot find the options you mention when cehcking administer->blocks.
Am I looking in the wrong place maybe?
Comment #3
nedjoSorry, I hadn't merged in these changes from the HEAD version into the 4.7 branch. I've just done that, so it should be part of the downloaded version by tomorrow. Meantime, you could use the CVS version.
Look for the 'configure' link for each block. When you bring up the specific block's configuration, you should see the configuration options.
Comment #4
gdip commentedI installed the cvs version and found the options you mention but none of them seem to affect the behaviour of blocks. The block always expand.
I get a lot of "collapsiblock/defaults.js not found." though. Is it maybe the path which isn't working as it should?
Comment #5
nedjoThanks for sticking with this!
Probably you need to unenable and then reenable the module. I created a new menu item to allow access to a dynamically generated js file, but that menu item won't be available until the menu items are refreshed, which happens when you enable the module.
If not, then I made an error in the path. Do you have clean URLs enabled? I haven't tested with clean URLs.
Comment #6
gdip commentedI still get the same error message and it doesn't work reenabling it. Does it have anything to do with me being logged in as admin maybe?
"Do you have clean URLs enabled?"
No.
Comment #7
gdip commentedThe cvs version works as indicated in Drupal 4.7 rc3.
Comment #8
(not verified) commented