Support » Fixing WordPress » Edit/Save breaks things; Do it again, all is fine

  • I’m converting a WP 2.0.7 install to WP 2.3.1. Most things seem to be going okay, but I’ve hit a wall.

    I’m looking at a single post and
    1. Click edit on that post
    2. Immediately hit save (i.e. not really changing anything)

    I get back to the page, but all content after the end of the post doesn’t show up — no meta info at the end of the post, no sidebar, no footer. The page output just stops after the call to “the_content()”.

    If I get to the edit screen for the post (or any other post) and do the same edit/save, the problem goes away – all is fine.

    It doesn’t seem to depend on the post. It appears other changes can clear the problem, but I’m not sure what.

    There are no error messages in the generated page (except when I turn on E_ALL – see below) or in the server logs.

    I’m willing to believe this is a problem with a very old theme (TBS-blue, downloaded over a year ago, no longer available at the original site). I don’t see the problem when I use the Default theme.

    I’m willing to believe it is related to the Category Access plugin, see, since it goes away when I deactivate that plugin. The 11/6/07 version, 0.8.2, says it supports WordPress 2.3.

    If I turn on error_reporting(E_ALL) for single.php, I get a slew of errors referring to files in wp-includes (which don’t appear with the default theme), even when all plugins are deactivated. I don’t see that my pages are using any deprecated calls, but then I don’t really keep all those lists in my head.

    So, can someone help with one of the following:

    1) Where can I look to debug the current theme with the problem described above. What old code might I be using that would make just touching the content of a post have such side effects?

    2) Is there another recommended plugin that provides a fairly simple category access: A visitor who isn’t logged in can see the titles of all posts, but can’t see the post contents for articles in certain categories.

    3) Where’s a good list of v2.3.1 ready themes? I’m willing to pay something. I don’t need widgets. I don’t need fancy graphics. But I’m not a graphics designer or CSS expert and would prefer to start with a solid foundation that I can tweak.

    Sorry to go on so long…

Viewing 3 replies - 1 through 3 (of 3 total)
  • I set up a test environment with a clean install. The only plugin activated is category access. Using a modified version of the branches theme, I get access and error logs like those saved here:

    Using the default theme or a branches theme with all parts of the sidebar that require plugins deleted all works fine.

    Now working back to see where things when haywire.

    I’ve narrowed the problem down to the code in the sidebar that shows the recent posts. It includes the line
    that seems to be causing the crash.

    If I comment out that line (and so use the default query in the loop that is used for the recent posts), the problem does not appear.

    Note, however, when the problem is reproduced in this way, there are NO error messages in the error log.

    This isn’t a solution (sigh): without the query_posts the recent posts aren’t right on pages other than home. The recent posts plugin isn’t a solution either since it doesn’t have a way to exclude categories (in particular, the events category for the Event Calendar plugin).

    I’ll try to craft a simpler question in hopes that someone will be able to see an answer here.

    Updated to 2.5.1 and the problem has gone away.

    Note that the symptom was accompanied by a core file in the root of the web site — appeared to be a crash file for PHP…

    It wasn’t a critical site, and the site for which it was a “leading indicator” hasn’t yet needed an upgrade, so I guess we’re okay. Someday, I’ll get myself a full PHP test environment (rather than trying to debug with echo statements). In this case, where I wasn’t at all sure what file was active at the time of the crash, I needed something more sophisticated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Edit/Save breaks things; Do it again, all is fine’ is closed to new replies.