• In my dashboard under Blog Statistics there’s an error showing up:

    Parse error: syntax error, unexpected ‘,’ in /home/dapost/domains/marcoraaphorst.nl/public_html/wp-includes/gettext.php(313) : eval()’d code on line 1

    WHat might be the cause of this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter melodiefabrieknl

    (@melodiefabrieknl)

    sorry people, can anyone please help?

    I’m getting exactly the same problem on WP 2.1.2, I have upgraded to 2.1.3 but it didn’t help… any ideas?

    Okay, I’ve managed to fix it – with a quick and dirty hack…

    I have opened index.php under wp-admin and changed

    $numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
    if (0 < $numcomms) $numcomms = number_format($numcomms);

    into

    $numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
    if (0 < $numcomms) $numcomms = number_format($numcomms);
    $numcomms = str_replace (",","",$numcomms);

    This is because I have installed WordPress in Italian language, and today I’ve reached comment #1,000. For some reason, my WordPress installation didn’t like the “,”.
    So the str_replace strips it out…
    I hope this helps!

    Thread Starter melodiefabrieknl

    (@melodiefabrieknl)

    it seems to be a bug. we should report it. thanks bdf!

    did you report this already?
    for all international wp blogs it migth be possible to change the line above as well. just start looking at line 101 of the index.php in the wp-admin.

    change both lines to:

    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'");
    if (0 < $numposts) $numposts = number_format($numposts);
    $numposts = str_replace (",","",$numposts);
    
    $numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
    if (0 < $numcomms) $numcomms = number_format($numcomms);
    $numcomms = str_replace (",","",$numcomms);

    and your dashboard is fine again.

    this bug appears when you have more than 1000 entries and comments.
    thnx to BDF everything works fine.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Parse error in my Dashboard’ is closed to new replies.