Support » Fixing WordPress » ERROR: warning: preg_match() … Compilation failed … classes.php line 210 211

  • Resolved daydull

    (@daydull)


    I get the following warning now at the top of most (but not all) of the pages in my site, and also in the wordpress dashboard:

    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 1 in [site dir removed]/wp-includes/classes.php on line 211

    this error and one with the same text, but for line 210 instead of 211, is repeated about 10 times at the top of the page.

    and here is what lines 210 and 211 in the classes.php say:
    if (preg_match("#^$match#", $request_match, $matches) ||
    preg_match("#^$match#", urldecode($request_match), $matches)) {

    This error showed up out of nowhere. The site was untouched in months. Today, all I did was update an article, edit a “page”, and added some amazon links in a text widget on the sidebar — all stuff I’d done before.

    What can I do to fix this? After this showed up, I upgraded to wordpress 3.0.1 from 2.7 or so. I also updated all the plugins but I still get the error. (Again, this updating was only done AFTER the error appeared).

    Thanks for any help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Ten theme to rule-out a theme-specific issue (theme functions can affect the admin panel).

    Thread Starter daydull

    (@daydull)

    Deactivated all plugins and switched themes to the twenty ten. Same error unfortunately.

    I also went back in and deleted the very few things I had edited today (deleted all text from the articles, deleted the text widget I had edited) … still no change.

    This is really weird. I did nothing that was any different from what I’ve done in the past…and it was all very simple stuff like editing text. I did not mess with plugins or do any updates or go in and edit any files before this happened.

    Thread Starter daydull

    (@daydull)

    Ok, thanks for the help…after a fair amount of testing the problem is now fixed.

    The solution: I had to disable “Dean’s Permalinks Migration” plugin AND THEN switch my permalinks structure from my custom setting, to the default postid only, then back…all while the plugin was disabled.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    You’re welcome!

    I had the same problem with Nextgen gallery. The solution was:

    1. Desactivate the plugin
    2. Set the permalink structure
    3. Reactivate the plugin

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ERROR: warning: preg_match() … Compilation failed … classes.php line 210 211’ is closed to new replies.