Problem

I have a list of child book pages (created with a views block) showing on the parent page. Each list item shows two fields: a title linked to the child book page, and a "Has new content" field. Child book pages that haven't been read should be marked as "new", and updated pages should be marked "updated".

The standard book navigation is located at the bottom of all the book pages. I mean the book-navigation.tpl.php navigation, with previous, up and next links.

If I visit a child page marked as "new" or "updated" it loses status as expected, and appears as if it has been read. The problem is that the book page that is "Next" in the book navigation also loses the "new/updated" status. So, the "Next" child page (a "new" page, not the one I actually visited) shows up as if I have already viewed it.

This does not happen for the page marked "Previous", only the page marked "Next". If I remove book-navigation.tpl.php, the problem goes away. But I really need to use the book navigation!

This is very confusing for a person who is trying to keep track of what pages they have read. I wonder if anyone can help with some insights into why the book navigation is causing the content coming up "Next" to lose it's new/updated status, and how I can fix this issue.

Thank you for your time,
Marlowe

Comments

solesum’s picture

Issue summary: View changes
dcam’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -book, -book navigation

Hello! I will try to offer suggestions to you, but I want to start off by saying that the core issue queue is not a good place to ask for support, especially for such a custom problem. The Support request category is mostly for contributed module issue queues. If you click the support link at the top of the page then you'll get a list of other possible support resources. The support forum or IRC would be better.

You're going to need to provide additional information in order for me to assist you. You didn't say how you're tracking when a user visits new or updated nodes. Without knowing that, I can't know what to look for in Drupal's code. I thought perhaps you might be hooking into the node load process, but nothing I saw about the book navigation preprocess suggests that the "next" node is loaded at that time. So that seemed like a dead-end idea.

solesum’s picture

Hi there, thanks for your response and sorry I posted to the wrong spot -- I wasn't sure where to post about a core module, but now I know.

That's what I was wondering -- if somehow the book navigation was loading the "next" node. That is how it seemed to me because it was only happening with the book-navigation.tpl.php included on the page, but I guess it is not the case. Thank you very much for looking, as I am not skilled enough to be able to tell if that is happening in the code.

To answer your question, I am using the "Has new content" field provided by the Views module to track when a user visits new or updated nodes. Using a view, I am checking off book pages that visitors have already read, and highlighting content that they still need to read (this is part of a free online community school, so can help people keep track of where they are in course content). I am not sure if I am hooking into the node load process.

Well I will keep digging and try to post to the support forum as you suggested. Thank you very much for taking a look, and let me know if you think of anything else.

Version: 7.29 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.