xyu / heroku-wp

WordPress on Heroku
MIT License
869 stars 280 forks source link

Extraneous error message on installation #68

Open odedharth opened 7 years ago

odedharth commented 7 years ago

Hi,

I got this error at the installation:

➜  heroku-wp git:(mdacne-wp) heroku run wp core install \   
    --url=xxxx.herokuapp.com \
    --title="blog" \
    --admin_user="admin" \
    --admin_password="xxxxxxx" \
    --admin_email="xxxxxxx@xxxx.xxxx"
Running wp core install --url=mdacne-wp.herokuapp.com "--title=MDacne blog" --admin_user=admin --admin_password=mdacne-is-the-best --admin_email=oded@mdalgorithms.com on ⬢ mdacne-wp... up, run.2703 (Free)
WordPress database error Table 'jdkxdktie8zjglxg.wp_options' doesn't exist for query INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('uninstall_plugins', 'a:2:{i:0;b:0;s:45:\"secure-db-connection/secure-db-connection.php\";s:32:\"WP_SecureDBConnection::uninstall\";}', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) made by include('/app/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('wp-settings.php'), include_once('/mu-plugins/secure-db-connection/secure-db-connection.php'), register_uninstall_hook, update_option, add_option
sh: 1: -t: not found
Success: WordPress installed successfully.

I wonder what this error means? The blog seems to work, but I'm new to WP so maybe this could lead to a problem in the future.

Fs02 commented 7 years ago

same here

djgadd commented 7 years ago

It's the secure-db-connection plugin trying to install itself before WordPress has installed. For the most part it's a mild annoyance at the install stage and shouldn't impact you if you manage to succesfully install WordPress.

If it does prevent you from installing then you need to remove the plugin as a requirement until after you've installed, which isn't particularly elegant.

For what it's worth, I resolved this issue in my project by using this to load my MU plugins and have a modified version commited to my project's repo. I've modified it to suit my needs, and got around the problem in this ticket by checking to see if WP_INSTALLING is set to true and bailing out of loading any MU plugins if it is.

I'm not sure how it would fit in with this repo, as I only used it as a reference for setting my project up for Heroku, but hopefully it'll help.

xyu commented 7 years ago

@djgadd is correct, this is a harmless (expected) error. This stems from the fact that there is no database to record the mu-plugin info before the WordPress database is created.