The MU forums have moved to WordPress.org

Error in Blogs under Site Admin (11 posts)

  1. BillyD
    Member
    Posted 16 years ago #

    I go to edit the name of my Argentina Blog under Site Admin -> Blogs -> Argentina Blog, but there is a problem. All the options are repeated twice (i.e., siteurl, blogname description......siteurl, blogname, description) and the first blogname field says "Argentina" while the second says "My weblog" and the name remains "My weblog" when I call it somewhere. After I rename that one to Argentina, it still comes back with the same title. Also, when I make a new blog and give it a name, the name still appears as "My weblog." What should I do? Thank you for your help.

  2. Supergeek
    Member
    Posted 16 years ago #

    I have this same issue. Anyone have any insight? I went into the database and looked at the options and there are many options repeated in the table per blog.

    mysql> select option_id, option_name, option_value from wp_5_options where option_name = 'blogname';
    +-----------+-------------+------------------+
    | option_id | option_name | option_value     |
    +-----------+-------------+------------------+
    |         2 | blogname    | My Weblog        |
    |        71 | blogname    | This is my test. |
    +-----------+-------------+------------------+
    2 rows in set (0.02 sec)
  3. Supergeek
    Member
    Posted 16 years ago #

    Apparently there are a LOT of duplicated table entries for every blog.

    mysql> select option_id, option_name from wp_1_options order by option_name;
    +-----------+-----------------------------------------+
    | option_id | option_name                             |
    +-----------+-----------------------------------------+
    |        39 | active_plugins                          |
    |        71 | admin_email                             |
    |         6 | admin_email                             |
    |        43 | advanced_edit                           |
    |       104 | advanced_edit                           |
    |        53 | blacklist_keys                          |
    |       112 | blacklist_keys                          |
    |        68 | blogdescription                         |
    |         3 | blogdescription                         |
    |        67 | blogname                                |
    |         2 | blogname                                |
    |        37 | blog_charset                            |
    |       100 | blog_charset                            |
    |       122 | blog_public                             |
    |        63 | blog_public                             |
    |        41 | category_base                           |
    |       151 | category_children                       |
    |       153 | cleanJS_theme                           |
    |        75 | comments_notify                         |
    |        11 | comments_notify                         |
    |        44 | comment_max_links                       |
    |       105 | comment_max_links                       |
    |        32 | comment_moderation                      |
    |        96 | comment_moderation                      |
    |        54 | comment_registration                    |
    |       113 | comment_registration                    |
    |        51 | comment_whitelist                       |
    |       110 | comment_whitelist                       |
    

    It goes on. And apparently this problem has been in the code for a very long time according to my searches in the forum, and references in the bug tracker.

    Can we get a fix for this please?

  4. Supergeek
    Member
    Posted 16 years ago #

    In an attempt to fix this, I changed wp-admin/upgrade-schema.php line 86 from

    KEY option_name (option_name)

    to

    UNIQUE option_name (option_name)

    It creates the wp_1_options table correctly, and I can write articles and such with this account, but the httpd error log spits out the following:

    [Sun Jun 17 17:11:33 2007] [error] [client x.x.x.x] WordPress database error: [Duplicate entry 'rss_(big long key string, not sure if revealing it is a security issue)' for key 2]nINSERT INTO wp_1_options (option_name, option_value, option_description, autoload) VALUES ( etc.

    I can create additional accounts, but creating new blogs gives identical errors in the log.

    So it looks like some INSERTs might need to be changed to UPDATEs or "INSERT ... ON DUPLICATE KEY UPDATE"s.

    I'm not familiar enough WPMU to suggest a complete fix, sorry.

  5. Supergeek
    Member
    Posted 16 years ago #

    Ok, a little update. In addition to the change in wp-admin/upgrade-schema.php, I changed the INSERT in wp-includes/functions.php on lines 396+ to the following:

    $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, option_description, autoload)"
    ." VALUES ('$name', '$value', '$description', '$autoload')"
    ." ON DUPLICATE KEY UPDATE"
    ." option_value = '$value', option_description = '$description', autoload = '$autoload'");

    (Broken into several lines just because it's easier to read.)

    Make these two changes to code after download/check out, but before installation. After installation, you'd have to do an ALTER TABLE to make option_name unique, and manually delete all the extra fields on any already-created blogs.

    Everything *appears* to be working fine, but I really don't know if wpmu will blow up in a few minutes or a few hours. Caveat emptor.

  6. lunabyte
    Member
    Posted 16 years ago #

    Not to like trump the effort here, but this might be better served (and paid attention to) if it was submitted to trac.

  7. Supergeek
    Member
    Posted 16 years ago #

    I really am not familiar enough with the codebase to feel comfortable submitting that as a formal fix. I was hoping to get feedback on it from someone a little more knowledgeable of WPMU, since I just downloaded it and installed it for the first time like 3 days ago.

  8. lunabyte
    Member
    Posted 16 years ago #

    Either way, whether that's what's actually implemented or not, it will still let our developer (note, there is no "s" on the end there) know it exists.

    Although, to be honest, I think there is already a basic ticket open on the double entries.

  9. drmike
    Member
    Posted 16 years ago #

    At the very least, open up a ticket, explain what the situation is, and add in a link to the forum here please.

  10. Supergeek
    Member
    Posted 16 years ago #

    There is an existing ticket, so I will add my fix as a reply if I can.

  11. Supergeek
    Member
    Posted 16 years ago #

    Added my fix to ticket 335 (http://trac.mu.wordpress.org/ticket/335).

    Also related to ticket 354
    (http://trac.mu.wordpress.org/ticket/354).

About this Topic

  • Started 16 years ago by BillyD
  • Latest reply from Supergeek