Book Error Message

Book Error Message

by Louise Weber -
Number of replies: 10

This is a repost...never got a response to my first post in early July.

IT dept upgraded Moodle to 2.3  When I go in to create a Book I get the 404 error message when I click on Save and Display.  After I back out and go to the Navigation Block and click on my Book everything is displayed.  Same thing happens when I add a chapter/subchapter.  Any thoughts?  Thanks.

Average of ratings: -
In reply to Louise Weber

Re: Book Error Message

by Wendy Hall -

We are getting the same thing when ever we try and adjust the settings - it pops up the error code and then bumps you back to the front page. We have noted it does save the change - however it is frustrating to have to go back into the e-book each time.

In reply to Wendy Hall

Re: Book Error Message

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Well, I hate to say it, but most likely there is something wrong in the setup for both of you.  Book (version 2012061700) works correctly in my Moodle 2.3.1 (Build: 20120706)...three different installations of it.

Have you tried turning on debugging to see what elese it might report?

AL

Average of ratings: Useful (2)
In reply to AL Rachels

Re: Book Error Message

by Rob Johnson -

I am seeing the same behavior.  Here is the stack trace with debugging on.  Please note, this site was upgraded from 1.9 to 2.1 last year.  It was not until we upgraded to 2.3.1 two weeks ago that is began to happen.  Thanks for any help you can provide.

Debug info: Unknown column 'revision' in 'field list'
UPDATE mdl_book SET revision = ? WHERE id = ?
[array (
0 => 1,
1 => '50',
)]
Error code: dmlwriteexception
Stack trace:
  • line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1207 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1529 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
  • line 100 of /mod/book/edit.php: call to moodle_database->set_field()
Output buffer: Notice: Undefined property: stdClass::$revision in /srv/www/htdocs/mod/book/edit.php on line 100 Notice: Undefined index: revision in /srv/www/htdocs/lib/dml/mysqli_native_moodle_database.php on line 1192
In reply to Rob Johnson

Re: Book Error Message

by Rob Johnson -

I compared my book table with a fresh 2.3.1 database.  There was no revision column as teh stack trace points out.  I created it with the same settings as the fresh install, and the error is gone. smile

Shouldn't this column have been created as part of the upgrade?

In reply to Rob Johnson

Re: Book Error Message

by Ankit Agarwal -

Hi Rob,

Can you report the issue in the tracker with all deatils (http://tracker.moodle.org) so that it could be investigated and fixed?


Cheers

In reply to Ankit Agarwal

Re: Book Error Message

by d morte -

I am receiving the same error. I am also running 2.3.1 as an upgrade from 2.2.4 (and other versions prior.) Any information regarding a fix would be appreciated.

In reply to d morte

Re: Book Error Message

by Rob Johnson -

If you are comfortable using phpmyadmin, you can create the missing table column manually.  I used a fresh 2.3.1 installation database as a reference.  It should be added to the MDL_book table after the customtitles column.  The settings I used are in the image below.

book

In reply to Ankit Agarwal

Re: Book Error Message

by Rob Johnson -

Reported to the tracker as MDL-35297.

Average of ratings: Useful (1)
In reply to Rob Johnson

Re: Book Error Message

by d morte -

We are using mysql and the following three commands did the trick for us.

alter table mdl_book add revision bigint(10) not null after customtitles;
alter table mdl_book alter revision set default 0;
show fields from mdl_book;


Thanks for the help with this one!

Average of ratings: Useful (1)
In reply to d morte

Re: Book Error Message

by E. L. Cooper -

As I am working on our 2013 class release I had this issue occur and yoiur commands resolved it. Wish I could give it 5 stars.