problem when saving the SiteAdmin Options

I am talking about the global Options: /wp-admin/ms-options.php

When I save the settings for: New Site Settings => Welcome Email seem to get reset back to what they currently are. I simply can't change them. Btw. are those supposed to contain HTML formatting? I am asking because it seems my welcome email gets sent as plain text so the user actually receives the HTML code in his email...

Besides that I have a problem with another setting on the same options page:
Admin Panel Help settings => Help Content

every time I save the options it seems the content gets sanitized by adding \ in front of " so this is a sampel result after saving: <div id=\"ajutor-backend\"> if I save again, and again, more and more slashes get added: <div id=\\\\\\\"ajutor-backend\\\\\\\">

my only chance to correct that is to edit the setting via phpmyadmin.

any ideas what could be happening or how to debug it?

  • Ovidiu

    its a wpmu 2.9.2 that I just upgraded to wp 3.0.1 and the problem has been persisting since 2.8 at least.

    just to make sure, this is not normal: http://screencast.com/t/MDFmMjU4Z right?

    I'll go through all active plugins again, but any ideas/hints as to what kind of plugin could cause this? Or if it could be a wordpress function, what function could it be? If I had some hints I could grep my way through all plugin files and find some suspects, isolate them and test.

  • Ovidiu

    grepped the whole web folder. doesn't look like I caught anything though:

    h1550830:/var/www/clients/clientxx/webxx/web/wp-content/plugins# grep -R -i 'welcome_email' ../../../web/
    ../../../web/wp-admin/includes/schema.php: $welcome_email = __( 'Dear User,
    ../../../web/wp-admin/includes/schema.php: 'welcome_email' => $welcome_email,
    ../../../web/wp-admin/ms-options.php: <th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
    ../../../web/wp-admin/ms-options.php: <textarea name="welcome_email" id="welcome_email" rows="5" cols="45" class="large-text">
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_email' ) ) ) ?></textarea>
    ../../../web/wp-admin/ms-edit.php: $options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'mu_media_buttons', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'admin_notice_feed', 'global_terms_enabled' );
    grep: ../../../web/wp-content/themes/ahimsa/custom.css: No such file or directory
    grep: ../../../web/wp-content/themes/ahimsa/footer-custom.php: No such file or directory
    ../../../web/wp-includes/ms-functions.php: $welcome_email = stripslashes( get_site_option( 'welcome_email' ) );
    ../../../web/wp-includes/ms-functions.php: if ( $welcome_email == false )
    ../../../web/wp-includes/ms-functions.php: $welcome_email = stripslashes( __( 'Dear User,
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta);
    ../../../web/wp-includes/ms-functions.php: $message = $welcome_email;
    ../../../web/wp-includes/ms-functions.php: $welcome_email = get_site_option( 'welcome_user_email' );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta);
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
    ../../../web/wp-includes/ms-functions.php: $message = $welcome_email;
    h1550830:/var/www/clients/clientxx/webxx/web/wp-content/plugins#

    anything else you could think of to look out for?

  • Ovidiu

    shorter list this time, with one possible culprit:

    ../../../web/forums/bb-includes/backpress/functions.formatting.php:// ! function wp_htmledit_pre()
    ../../../web/wp-admin/network.php: <?php echo wp_htmledit_pre( $web_config_file ); ?>
    ../../../web/wp-admin/network.php:<?php echo wp_htmledit_pre( $htaccess_file ); ?></textarea>
    ../../../web/wp-admin/options.php: echo "<textarea class='$class' name='$name' id='$name' cols='30' rows='5'>" . wp_htmledit_pre( $value ) . "</textarea>";
    ../../../web/wp-admin/press-this.php: <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo wp_htmledit_pre( $selection ); ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_email' ) ) ) ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_user_email' ) ) ) ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'first_post' ) ) ) ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( stripslashes( get_site_option('first_page') ) ) ?></textarea>
    ../../../web/wp-admin/ms-options.php:<?php echo wp_htmledit_pre( stripslashes( get_site_option('first_comment') ) ) ?></textarea>
    ../../../web/wp-admin/ms-sites.php: <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $opti$
    ../../../web/wp-content/plugins/tinymce-advanced/tinymce-advanced.php:add_filter('htmledit_pre', 'tadv_htmledit', 999);
    ../../../web/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php: add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
    ../../../web/wp-includes/general-template.php: add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
    ../../../web/wp-includes/formatting.php: * 'htmledit_pre' filter is applied.
    ../../../web/wp-includes/formatting.php:function wp_htmledit_pre($output) {
    ../../../web/wp-includes/formatting.php: return apply_filters('htmledit_pre', $output);

    tinymce-advanced is the only one of the two plugins that I have activated. deactivated it and the problem persists. the other one isn't activated :slight_frown:

    Ok, I guess there is not much more to do - if anyone has any other idea I am open to anything that could solve this!

  • Ovidiu

    I was too quick to judge: the HTML problem is indeed solved. will notify the plugin author about this

    Any ideas about the slashes? you are on a problem-solving roll here my friend :slight_smile:

    If you weren't working for wpmudev I'd give you some reputation or press the THANKS button but since you're unlikely to profit from that you'll have to make do with a virtual slap on your shoulder :wink:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.