Warning: Missing argument 2 for wpdb::prepare()

Hello Experts,

When my subdomain endangeredhawaii.lisachau.com loads, it first shows an error for a second before loading the page-
Warning: Missing argument 2 for wpdb::prepare(), called in /home1/lisachau/public_html/wp-content/mu-plugins/domain-mapping.php on line 511 and defined in /home1/lisachau/public_html/wp-includes/wp-db.php on line 1275

This error showed up after using the wpmudev domain mapping plugin. I am using the Divi theme from elegant themes.

Here are things I have done:
-I turned off all other plugins, but error still shows up.
-I have asked for support with Divi from elegant themes. I am reluctant to attend switching themes to a general wordpress theme to test if it is the Divi theme, because I will lose all the customizations within Divi (I will have start from scratch).
-I've read other posts in wpmudev about the same error, which seems to fix itself if you update everything, which I did. (Previously my website was supported by my old partner. I signed up for myself, skipped the trial period, and updated everything hoping it would repair the error.)

Thank you for your help,
Lisa

  • Rupok
    • Support Ninja

    Hi Lisa, thanks for asking.

    Which version of Domain Mapping are you using? As you already did plugin conflict test and it didn't help, my next suggestion would be theme testing, but you also confirmed this is not a good idea for you. So I've no way to confirm if this is divi specific or not. Because on my test site, I'm running Domain Mapping without any issue like this and I'm using Twenty Twelve theme. As theme testing should be the last option for you, can you confirm you have debug display disabled? If not, or if you are not sure, can you please login to your server with any FTP application and go to your domain root directory? There you will get "wp-config.php" file. Download and open that file. Now search for the following line in that file:
    define( 'WP_DEBUG_DISPLAY', true );
    If you find this line, please change this with:
    define( 'WP_DEBUG_DISPLAY', false );
    Or if you don't find that line, just add these lines:

    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    I hope the warning will be gone at this point. If not, can you try to create a staging site where you can regenerate the same issue and do theme testing? To know more about staging site creation, you can check these tutorials:
    https://premium.wpmudev.org/blog/set-up-staging-site-cloner/
    https://premium.wpmudev.org/blog/testing-environment-wordpress/
    Please let us know when you are done. I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Lisa
    • WPMU DEV Initiate

    Hi Rupok,
    Support has been enabled on lisachau.com.

    I added the lines as you suggested and the error disappeared.
    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    However, now the header and logo have disappeared.

    Thanks you for the advice. I will work on your suggestion of creating a staging site to run tests.

  • Nithin
    • Support Wizard

    Hi Lisa,

    It seems like the website is not accessible anymore, I'm getting a blank white screen, are you working on it? If your site is down, you could deactivate all the plugins, to rule out any plugins causing this issue. For more info check this link: https://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F

    Once done, please revoke, and re-enable support access, and please let us know, so that we could give a closer look. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Lisa
    • WPMU DEV Initiate

    Hi,

    I got the white screen of death for the subdomain, and I could not get into the subdomain dashboard or see the subdomain website. Now, I still cannot get onto the subdomain dashboard, and the subdomain website redirects to an error page from my main site on lisachau.com.

    I deactivated all network plugins except WPMUDEV dashboard within the WP network dashboard. All trouble began once I started using WPMUDEV mapping plugin. I cannot get onto the dashboard to see what might be causing the trouble.

    I have allowed for support access. Please help.

  • Lisa
    • WPMU DEV Initiate

    I followed your instructions for deactivating plugins via FTP through the link above. This appeared in WP network admin plugins:

    The plugin iwp-client/init.php has been deactivated due to an error: Plugin file does not exist.
    The plugin social-bartender/social-bartender.php has been deactivated due to an error: Plugin file does not exist.
    The plugin wpmudev-updates/update-notifications.php has been deactivated due to an error: Plugin file does not exist.

    Then Via FTP renamed "plugins.hold" back to "plugins", still getting errors and inability to see dashboard. So I network activated WPMUDEV dashboard and allowed for support access.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.