Support » Fixing WordPress » Files | Manage broken after upgrade

  • After upgrading to 2.0, all seems well, except that when I click Files in Manage menu I get:

    Parse error: parse error, unexpected ‘}’ in
    /..path../wp-admin/templates.php on line 164

    Not sure where to begin troubleshooting this one, thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I always start with uploading a fresh version of the file mentioned in the error message. Files have the bad “habit” to get corrupted during upload 🙂

    Well, this is interesting – decided to start totally fresh and removed the entire WP installation. Dropped all tables from the database (this is a brand new site so we had nothing to lose), and started from scratch with a virgin WP2 installation. Everything goes well, but the error above persisists. Same exact symptom.

    Could this be an incompatibility with a plugin?

    Nope – just temporarily renamed the plugins dir — the error persists. No one else is seeing this?

    The installation was unpacked from tarball directly on the server, so no chance of an upload error (and everything else works fine).

    i’m getting this exact same error.

    using a brand new install of wordpress from the current stable tarball as of about 3 hours prior to this post.

    I’ve come across the same error. I followed the upgrade directions exactly. I’m not sure what is causing this conflict.

    Are we the only people with this issue?

    What are you using your install for? Maybe we have a common issue (besides the current one). My install is located on a university web server that has some pretty tight limitations, but ran version 1.5.x fine.

    Hi, I just wanted to add that I too am seeing this problem.

    $ uname -a
    Linux boson 2.6.10-1-k7-smp #1 SMP Fri Mar 11 04:38:08 EST 2005 i686 GNU/Linux

    $ php –version
    PHP 4.3.10-16 (cli) (built: Aug 24 2005 20:25:01)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

    I’ve just taken a look at templates.php and I can’t see what the problem is. There is indeed a “}” on line 164 which closes “switch($action) {” on line 16. I can’t see any errors in between those two lines.

    Nevertheless I too am getting “Parse error: parse error, unexpected ‘}’ in /path/to/blog/wp-admin/templates.php on line 164”

    Ah, I think I see the problem. My PHP installation is configured to not use short tags (because it messes up various XML things I use). That is, all PHP instructions must be included between “<?php ” and “?>”. In lines 89 and 91 of templates.php, there are two lines which use the short-form “<? ” and “?>”.

    Change these two lines:

    <? else: ?>


    <?endif; ?>


    <?php else: ?>


    <?php endif; ?>

    and see if that helps. It solves the problem for me.

    That did it. It looks as if it was a coding error on the developer’s behalf. Line 91 of my code read:

    <?endif; ?>

    Which should have at least been coded as:

    <? endif: ?> (space before the endif)

    I never thought to go through line by line in the code to see if the PHP notation had changed. It’s strange because every where else in the document, any PHP function is listed as:

    <?php some sort of code ?>

    Oh well. Thanks for the tip.

    Upgrading to 2.01 fixed this problem for me.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Files | Manage broken after upgrade’ is closed to new replies.