I'm not sure if this is related to my previously reported issue which was fixed. Currently on the 7.x version of the module, first level book pages are displayed, but when the user clicks on those first layer pages the child pages are not expanded in the block. Nothing is shown in the logs.

CommentFileSizeAuthor
#6 Screen shot 2011-05-24 at 07.33.15.jpg29.11 KBmcjim
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcjim’s picture

Assigned: Unassigned » mcjim

If you configure the block (you should have the configure link pop up if you hover over it) can you see if "Allow menu to expand" is checked or not?

patlo’s picture

It *is* checked. Sorry, I thought I wrote that part.

I am not certain, but I'm pretty sure that expansion was working previously, prior to me upgrading to the recent code fix you posted for my earlier reported issue.

mcjim’s picture

Oh yeah, so you did :-)
Teach me not to read the title.
I'll have a look, see if I can work out what's going on.
Meanwhile, could you try creating a new book for me, to see if that also misbehaves?

patlo’s picture

That's funny, I didn't see it in the body of the report this time, I just thought I remembered writing it *somewhere*. Ha.

A newly added book with a few child and grandchild pages, is displaying the same behavior. Clicking the top link in the book block brings up the right content page, and the content page shows links to child pages, but the book block in the sidebar is not expanded.

patlo’s picture

I've noticed some very odd behavior that may or may not be helpful. Occasionally, adding another page in the hierarchy will cause part of the current hierarchy to be shown in the block. But it "sticks" there - I can't collapse or further expand the page. It remains "stuck" open, showing the same child and perhaps a grandchild (I've only noticed it display one child and one grandchild, never more than that). This is true even if I close the browser and delete cookies and restart. I can't figure out a reproducible case for this, but I've seen it happen several times in the last 2 days.

I also checked out the originally reported behavior on a couple different themes just in case theme code was screwing up, but it's the same on both themes - child items aren't expanded.

mcjim’s picture

I'm struggling to reproduce this, to be honest.
I've attached a screenshot of what I'm getting.
This is on a clean install with only book, bookblock, devel and coder enabled.

mcjim’s picture

If you enable the book module's block on that page, does that behave properly?

Any other modules you've got installed that do anything with books, menus or node access, even?

patlo’s picture

I disabled all non-core modules. When I re-enable Book Block, I get this, 8 times:
Notice: Undefined offset: 114 in bookblock_block_info() (line 32 of {path}/sites/all/modules/bookblock/bookblock.module

The book block does show up as re-enabled (checked in modules list, and back to the sidebar). When I refresh the browser window I got:
Notice: Undefined property: stdClass::$nid in node_access() (line 2836 of {path}/modules/node/node.module).
Notice: Undefined variable: block in bookblock_block_view() (line 84 of {path}/sites/all/modules/bookblock/bookblock.module).

After selecting one of the book pages from the book block, those undefined errors go away and I get the content I expect, but no child pages expand, still.

I ran cron again, just to confirm that all modules are up-to-date. I again got 8x of
Notice: Undefined offset: 114 in bookblock_block_info() (line 32 of {path}/sites/all/modules/bookblock/bookblock.module

I was running these modules which may be of interest:
- Chaos Tool Suite
- Flags
- Media
- Add to Any
- Advanced Forum
- Dynamic Display Block
- Menu Block
- Token
- Nodeblock
- Views

Just repeating, all these are now disabled, and I'm getting the above mentioned errors.

It almost seems as though that book has been corrupted, but the content displays fine, and creating a new book gives me the same behavior in the book block.

If it would be helpful to you to have site access to do some exploration, I can arrange that.

patlo’s picture

If I understand what you're asking in your followup post correctly, he block has been enabled on all pages, and for all content types. Visibility Settings are all "not restricted."

Thanks so much for your help, mcjim!

mcjim’s picture

No probs: I just want to get it fixed. It was only a rough upgrade of the module from 6.x to 7.x and it needs someone like you to test it!

The block I meant, though, was the book module's own block, called "Book navigation" on the block page. It does a similar thing, so if you can enable that and have a look at some book pages it will be interesting to see if you get the same errors or not.

mcjim’s picture

I've just added some debug code to the dev branch. Not sure when it gets rolled into the downloadable file, though.

It will set a watchdog message when you visit the block administration page. The message will contain the node IDs of the books it thinks you want to display as bookblocks.

You can check these out by going to http://yoursite.com/node/[nodeid], where [nodeid] is one of those listed in the watchdog message.

If all that makes sense… are those nodes the right ones? I'm just wondering if the variable that stores the bookblocks has been corrupted in some way.

patlo’s picture

OK, gotcha.

The book navigation block does work correctly. My main admin issue with it is that it's not clear to users that they can click the book name to expand content from it, where book block starts with the first level expanded. But it's not throwing any additional errors.

And I'm not seeing the above mentioned errors when clicking on book content, but just in the alert area (not sure what that's called, but the system message menu on top center of most themes).

The debug code hasn't yet made it into the updates list for me. I'll check it again and let you know what I see.

jimbuchan’s picture

I am new to Drupal - just building my first test site on a local host which I have installed yesterday. I will need to construct a menu with drop down or expandable options. I have attempted this and have configured the parent menu to enable the drop down using the show as expanded option in Home/Administration/Structure/Menus. I have this installed on OSX 10.6.8 and using version 7.x of Drupal. Any advice welcome.