Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing database tables on Multisite #859

Open
hupe13 opened this issue Jan 22, 2025 · 4 comments · May be fixed by #860
Open

Missing database tables on Multisite #859

hupe13 opened this issue Jan 22, 2025 · 4 comments · May be fixed by #860

Comments

@hupe13
Copy link

hupe13 commented Jan 22, 2025

I have Plugin Check installed on a multisite installation and activated it on site 19. I see many errors in debug log about non existing tables in the database.

WordPress database error Table 'database.wp_19_pc_blogs' doesn't exist for query
WordPress database error Table 'database.wp_19_pc_sitemeta' doesn't exist for query
WordPress database error Table 'database.wp_19_pc_usermeta' doesn't exist for query
WordPress database error Table 'database.wp_19_pc_users' doesn't exist for query

Apparently these tables are not created.

@swissspidy swissspidy changed the title wp_19_pc_users, wp_19_pc_blogs and more Missing database tables on Multisite Jan 22, 2025
@swissspidy
Copy link
Member

These are actually standard tables created by WordPress itself. There seems to be something wrong with your Multisite installation.

Also note that PCP doesn't have full Multisite support at the moment, see #64.

@hupe13
Copy link
Author

hupe13 commented Jan 22, 2025

The tables wp_blogs, wp_sitemeta, wp_usermeta and wp_users exist, but not with "_19_pc" in the name.

@dd32
Copy link
Member

dd32 commented Jan 23, 2025

This sounds like PCP not setting the base_prefix correctly during it's table_prefix switching for runtime tests;

// Set the new prefix.
$old_prefix = $wpdb->set_prefix( $table_prefix . 'pc_' );

@davidperezgar
Copy link
Member

Yes! It seems that's the problem.

@davidperezgar davidperezgar linked a pull request Jan 23, 2025 that will close this issue
@davidperezgar davidperezgar linked a pull request Jan 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants