The MU forums have moved to WordPress.org

Fatal error: Cannot break/continue 1 level in admin-db.php (13 posts)

  1. moorezilla
    Member
    Posted 17 years ago #

    I am running mu 1.2.1 on ubuntu 6.10, php5.1, apache2 and everything was working fine until I uploaded some additional themes. Now I fire this error whenever I go to the presentation or the theme tab.

    Fatal error: Cannot break/continue 1 level in /home/web/chelseahigh/sites/wp-admin/admin-db.php on line 669

    I deleted all of the themes after the error and now have default, home, and classic remaining in the theme directory underneath wp-content, but the error won't go away.

    Any ideas how I can fix this? I searched the forums but couldn't find an answer.

    Thanks.

  2. drmike
    Member
    Posted 17 years ago #

    1.2.1 modified how the themes were stored. Go back to Site Admin -> Themes and resave them all.

  3. moorezilla
    Member
    Posted 17 years ago #

    Thanks for your reply.

    Unfortunately, when I go back to Site Admin -> Themes I get the same error:

    Fatal error: Cannot break/continue 1 level in /home/web/chelseahigh/sites/wp-admin/admin-db.php on line 669

    Is there something I can change in the database to fix this error? Or is there a new version of admin-db.php? I don't care about getting additional themes to work any more; I just want the error to go away for now.

  4. moorezilla
    Member
    Posted 17 years ago #

    Possible fix.

    I changed line 669 in admin-db.php to be "return;" instead of "continue;"

    and the error went away. I'm not sure if this breaks the ability to add other themes, but at least the error went away.

  5. mypatricks
    Member
    Posted 17 years ago #

    Are you install Multi-Site Manager?

  6. moorezilla
    Member
    Posted 17 years ago #

    nope... standard 1.2.1 installation without any additional plugins or whatnot.

  7. nolageek
    Member
    Posted 17 years ago #

    > Are you install Multi-Site Manager?

    I'm getting this error as well and I am using Multi-Site Manager.

  8. billdennis5
    Member
    Posted 17 years ago #

    That's good advice: How do I find which line is 669?

  9. nutloaf
    Member
    Posted 17 years ago #

    drmike - I think this is a syntax error. The continue on line 669 doesn't belong there at all.

    It appears to be in the middle of a check to make sure the $allowed_themes array is actually an array. It should probably throw a proper error.

    Replacing continue with return will let you use Site Admin -> Themes to resave the allowed themes list. Then the problem goes away.

  10. drmike
    Member
    Posted 17 years ago #

    Best bet would be to open a ticket on trac and let Donncha take a look at the issue.

    In between midnight feedings of course. :)

  11. jelyon
    Member
    Posted 16 years ago #

    I just posted this on the discussion for the multi site manager plugin page at http://wpmudevorg.wordpress.com:

    I too, with a wordpress-mu-1.2.1 site, the new 002 plugin, received the dreaded "Fatal error: Cannot break/continue 1 level /j/random/path/html/wp-admin/admin-db.php on line 669" when trying to change the theme.

    I'd been using instructions from the following discussion:

    <http://mu.wordpress.org/forums/topic.php?id=2076&replies=24>:

    So I started poking around in the WP_Site Meta table - wherein I noticed that the sites that were working had many more entries than the sites that did not. As Cafespain noted:

    "Oh and don't forget to duplicate the records in the wp_sitemeta table for the new site or you won't have access to any themes (oops)."

    And so I performed this step for the three recalcitrant sites: (edited slightly for clarity)

    "4. Duplicate the wp_sitemeta entries for your new site:

    insert into wp_sitemeta (site_id, meta_key, meta_value) SELECT x, meta_key, meta_value FROM wp_sitemeta WHERE site_id = 1

    (change x to the id of the new site record created at step 3.)"

    Voila! It works as advertised.

    I'm not a programmer, so I'm wondering if there's a reason the WP_sitemeta data for the new sites isn't added? It'd be nice not to be required to launch into phpmyadmin when adding new sites.

  12. kp2575
    Member
    Posted 16 years ago #

    In order to get this new domain to work I just have to redo follow steps 3 and 4? I am a little confused by this.

  13. kp2575
    Member
    Posted 16 years ago #

    "insert into wp_sitemeta (site_id, meta_key, meta_value) SELECT x, meta_key, meta_value FROM wp_sitemeta WHERE site_id = 1"

    Do I just post that into php.admin under the wp_sitemeta?

About this Topic

  • Started 17 years ago by moorezilla
  • Latest reply from kp2575