Closed (fixed)
Project:
Book made simple
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2011 at 08:43 UTC
Updated:
15 Jan 2013 at 02:14 UTC
To me it looks like a bug, that the vertical tab with the book settings is not visible, despite of having the permissions 'administer book outlines' and 'show core Outline form element'.
the reason seems to be that node_access('view', $node) returns false, if the nid is 0 (which is the case when a new node is created).
So I suggest changing the code of the function "is_outline_access" from
function is_outline_access($node = NULL) {
if (isset($node->nid) && ! _book_outline_access($node)) { //_book_outline_access returns false here, even though user has sufficient permissions. (_book_outline_access calls node_access('view', $node), which return false, when creating a new node )
return false;
}
return user_access("show core Outline form element");
}
to
function is_outline_access($node = NULL) {
if (isset($node->nid) && ! user_access('administer book outlines')) {
return false;
}
return user_access("show core Outline form element");
}
using the changed function, the permissions are checked directly, which might be a better option here..
best,
walter
Comments
Comment #1
MarcElbichon commentedWill be ported to next release.
Thanks for you collaboration
Comment #2
valderama commentedcool.. i have update my d.o. profile then :) "contributed code"..
Comment #3
canadrian commentedI experience the same issue. The tab does not show on node create forms, but it does show on node edit forms.
Comment #4
MarcElbichon commentedCommited in dev version
Comment #5
scottrigby