Can't create/edit chapter..
  • Hy all,

    I have the problem, that I can't create or edit Chapter...

    I can create a new book, but when it comes to create a chapter, there is the notification on top "creating chapter" and there it stuck.
    Also when I want to edit a chapter in a existing book, there it stuck "loading chapter data"..

    I restarted the server, but this problem still occur.

    Thanks in advance,
    Christian
  • 4 Comments sorted by
  • Hi Christian!

    You might not have running Redis server or there is some problem with it. These are exactly places where Redis is being used (create chapter, edit chapter) and why your browser is stuck with "loading chapter data" message.

    Aco
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Christian, hi Aco,

    I found a problem like this when using the default version of redis-server on Debian wheezy (redis 2.4.14) which is quite old now. Upgrading to current redis stable series 2.8.x fixed it for me. If you are on wheezy, as root, make sure you have the wheezy-backports repo set up, then you can do:

    apt-get -t wheezy-backports install redis-server
    service apache2 restart
    redis-cli monitor

    Then try creating a chapter, you should see lots of redis messages fly by in the terminal. If you don't see any redis messages with the monitor, something else is broken (like your REDIS settings in the Booktype project base.py file).

    I am now running redis 2.8.6 on wheezy. I did not need to do this upgrade on Ubuntu 14.04 Trusty which has redis-server 2.8.4. So in general it seems like running the redis project's recommended stable 2.8.x series is a good idea.

    Aco, which version of redis do you use in production?

    Cheers!

    Daniel
  • Hi!

    The issue is in Python Redis library. There is no handshake when client connects to the redis server and Python Redis library does not care much if you have older version of the Redis Server. Regarding of this it will use latest redis commands for the communication. Because of that things will fail.

    One way of fixing things is updating the Redis Server. The other way is downgrading version of the Redis Library. By default we install latest version of the Redis Library. We should not limit the version of the library just because someone will have older version of the server. This we should add to the new Booktype 2.0 install instructions and list of requirements.

    Aco
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Christian, hi Aco,

    I am testing with Redis 2.8.17 on Debian 8.1 Jessie and ran into this issue after changing some values in settings/base.py

    Workaround was to do this on the server:

    sudo redis-cli flushall

    I will add this tip to the manual.

    Cheers!

    Daniel