How can I do to get the list of book pages written by me?
If I'm a user that wrote some pages I'd like to reach the list so I can choose one page to modify it.

p.s.: today I an authenticated user goes to a page of his but it does not have the 3 menu View - Edit - Revisions... why???

Comments

cog.rusty’s picture

To create a page or a block which lists you own book pages you need to install the views module, and then go to /admin/build/views and create a view with filters "Node: Author is Current Users" and "Node: Type" = "Book page"

The tabs which are available to a user depend on the permissions of his/her user role(s) in /admin/user/access. Check the "edit own [a type here]" and "view revisions" for the user roles you want.

devbox’s picture

Wow, Views module is great (also if has some missing things) but it is really complex and without manual :)

For the user role it is set (book module -> edit own book pages), other user can modify their pages I don't understand why that user cannot edit its pages :(

cog.rusty’s picture

Strange. Are you sure that the user has that role? (in /admin/user/user)
And he created those pages himself?
Is the user logged-in for sure?

Also, have you installed any access control module such as taxonomy_accesss or content_access or organic groups?

devbox’s picture

Strange. Are you sure that the user has that role? (in /admin/user/user)

And what should I check here? The user is active.

And he created those pages himself?

Yes, the author is him. I can see it under the page title.

Is the user logged-in for sure?

Yes :)

have you installed any access control module such as taxonomy_accesss or content_access or organic groups?

No.

I don't know... since yesterday that user could edit their pages... today not...

Do you know what is the .php file that I should check?

cog.rusty’s picture

Nothing in the code. Fixing something might break it for others, with all the hooks and stuff.
Try the "Rebuild permissions" button in /admin/content/node-settings

If that doesn't work, you could take a look at the database with phpmyadmin, especially:

- Browse the "user_roles" table: Is there a row with uid=that user and rid=2? (authenticated)

- Browse the "node_access" table: Is there only one row with realm='all'? Or many row with different realms? If there are many, check for that node's nid, to see if there are rows with grant_update=0.

devbox’s picture

admin/content/node-settings goes to "Post settings" but this page does not have the button "Rebuild permissions", only "Save configuration" and "Reset to Default".

The "user_roles" table is empty, but others users can edit the pages!
I added the uid and the rid that you tell me but this does not change the situation.

node_access contains this:
nid = 0
gid = 0
realm = "all"
grant_view = 1
grant_update = 0
grant_delete = 0

I don't know the meaning of this table.

cog.rusty’s picture

Everything seems OK here.

The button did not appear because your node_access table was clear, with only the initial general settings.

If you only have the initial 2 user roles, anonymous and authenticated, and nothing else, then that row in users_roles was not needed either.

It must be something else.

devbox’s picture

I see that the function book_access() in book.module (that I don't know who call it) is called for $op = 'update' for all users, but for the unable user are called only for 'view' and 'delete'.

Why?

I think this is the cause.

cog.rusty’s picture

Since you have only authenticated users and no other roles, the difference must be something in that node, not in the user's permissions.

What is different about that node?
- It is a "book page". Can other users edit their nodes of type "book page"?
- Was it initially written using a different input format such as "Full HTML" or "PHP code", which the user is not allowed to use now?
- Does that node have any newer unpublished revisions?

devbox’s picture

- Does that node have any newer unpublished revisions?

FOUND the problem!

The last revision was done by the admin user and CANNOT BE DELETED!
But this is not the cause: I updated the table node_revisions setting the uid to the user id, but never change.
The cause is the field format: the last release was of format = 2, other release have format = 1: I changed format =1 and this make it work!
BUT What is the format??? And why it make the problem???
How it was changed to the wrong value?
I can change it from drupal or I have to go to the DB?

Thanks

sdecabooter’s picture

The format database field is the selected 'Input Format'. The input formats of your Drupal installation can be found at admin/settings/filters.
You can select the input format when posting a node underneath the text area (that is if you have permissions to select an input format).

Hope this can help you :)

cog.rusty’s picture

So, it was 2 of the three possible problems I listed. You had probably added a revision using "Full HTML" input format (instead of "Filtered HTML"), which that user was not allowed to use.

devbox’s picture

Undertand: this is a really limit!
So if I changes (in this case) the input format from the FULL HTML to Filtered HTML the user can no more edit ITS page!
Ok, but in this way there is no way to let the user modify its page... and there is no advertise that tell the cause...

Well, ok, thank you for now :)

cog.rusty’s picture

Yes, that is a little hidden... By default, users can edit only Filtered HTML nodes.