Empty Title and Contents When Editing Blog

I've posted my first blog entry on my newly installed v1.7.6 site. I was able to save my post several times, and bring it up again to edit it. But now when I try to edit it, both the title and the content areas are blank. I created another blog entry, and when I went back to edit the first one, it opened, but having tried since, it comes up blank again. The second post seems to be ok.

I'm doing the final testing before the site goes live, so this has got me worried. Can anyone tell me what the problem is?

  • what are you using to running elgg locally?

  • I deleted the post and re-entered it, and haven't had the problem again so far. I'll have to watch out and see if it happens again.

  • I am experiencing the same issue on 1.7.4 and 1.7.7.

  • Same here on 1.7.7
    I checked the database, and the object was still there.

  • Sounds like database corruption issues. I just created a blog post on an Elgg 1.7.4 system, and edited it five times and did not encounter the problem.

    Can someone explain in more detail how to reproduce this problem?

  • Ah interesting - on editing the blog post six times in a row, the content disappeared from the edit form. As Ruben pointed out, it does still seem to be in the database. I wonder if six is a magic number somehow.

    I'm looking into this now.

  • The problem appears to be related to the sticky forms caching system used by the blog plugin.

    This is what I get with some debugging statements:

    title: Editing blog post test

    body: Looking at the strange re-edit bug. Text changed five times.




    So the correct data is retrieved from the database, and the caching system has the correct blog post guid, but the cache has blank content.

    I'm looking into why that might be.

    I can't find a reference to this issue in the issue tracker. Does anyone know if it is a known bug?

  • OK, I have a simpler way to reproduce this:

    a. create a blog post.

    b. visit the post edit form and edit the blog, but do not save it yet

    c. wait 5 or 6 minutes for the savedraft function to kick in which creates a cache of the blog content

    d. then save the changed blog.

    e. edit the blog post again. In my tests the edit form is then blank.

    When the blog post is saved, the cache is supposed to be cleared. However, the blogguid value is *not* cleared for reasons that I still have not figured out and the edit form erroneously takes the (now empty) content from the cache the next time you try to edit the post.

    I'm now trying to figure out why the blogguid value is not cleared.

  • Now that I have narrowed the problem down to the blogguid, I have been able to find a relevant reference in the issue tracker. It does not refer to this specific problem, but to a problem with the blog cache in Elgg 1.7.4:


    I will test this on a later version to see if it has been fixed.

  • OK, I tracked down the problem and will post to the tracker.

    The problem in a nutshell:

    The blogguid was introduced in the Elgg 1.7.4 blog cache to fix this bug:


    Unfortunately although it is cleared when a *new* blog post is created, it is *not* cleared when a blog post is edited.

    To fix this problem, add:


    after line 69 of