Hi,

have installed the book access module and it works very well. However, when a user with permission to edit view, and create book pages accesses the book and selects the associated 'edit' button, the following warning is displayed. Hope this is enough information...

warning: Invalid argument supplied for foreach() in .../book_access/book_access.module on line 363.

thanks

Comments

harry slaughter’s picture

Status: Active » Postponed (maintainer needs more info)

I am not able to reproduce this problem.

Can you be more specific regarding permissions/access settings? Are you talking about the '/admin/user/access' page or the '/admin/content/book/access' page?

gregsumi’s picture

Category: support » bug

Hi,

I've received the same error.

I've determined that the error only occurs:

-when the user has permission to create new pages, but not new books (under access control)
-when the user attempts to edit the first page of the book

It appears that problem is related to the "parent " menu that appears on the typical book editing page (when the user does not have permission to create a new book, this menu is not displayed and the warning is displayed).

Hopes this helps!

Cool functionality - everything seems to work (in my so far limited test)

florian.cathala’s picture

Hi,

Your issue made me remember that I had the same problem, for which I have just opened an issue. Sorry for duplicate.

I suggested a patch, it is available at http://drupal.org/node/218111

Florian

masterplumber’s picture

I can confirm this is a problem for me too.

As above, it seems to happen only when a user with permission to create pages within a book (but is not allowed to create new books) tries to edit the first page of the book. The book itself has been created by an admin.

I need this functionality as I am trying to develop wiki documentation for 2 separate projects on the same site. I want editors to be able to change anything within the single book they have responsibility for. SO once the book has been initially set up they can add, edit etc.

As a matter of interest, although the warning is displayed it seems to have little effect i.e. the 'editor' as described above can actually edit that first page despite the warning. Adding and amending other pages is not affected.

Apart from that it works really well - great bit of code and just what I was looking for.

ac’s picture

Flusher,

That link you provide to your patch is to this page. Is there a patch somewhere?

florian.cathala’s picture

ac,

Sorry for this mistake, I updated my post.

I confirm the url where I submitted the patch I talk about : http://drupal.org/node/218111

It appears that it has been applied to HEAD by the maintainer.

ac’s picture

Thanks flusher!

ac’s picture

Status: Postponed (maintainer needs more info) » Fixed

Applied to HEAD as per comment #6

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.