Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Problem with creating new site - incorrect structure of new site. #240

Closed
pavel-rybnicek opened this issue Oct 17, 2016 · 5 comments
Closed
Assignees
Milestone

Comments

@pavel-rybnicek
Copy link

Version Information

  • WordPress: 4.6.1
  • MultilingualPress: 2.4.7
  • MySQL: 5.1.52 and 5.6.16 - both tested

Steps to Reproduce

Not sure if this is a Multilingualpress problem.

I created a new site based on original site. Found out that one of the new tables (wp_terms) was missing the last column - the 'CREATE TABLE wp_2_terms LIKE wp_terms' created a different table structure. No error message in debug log. In the following step, the data copy failed, as the tables structure was different.

Tried to create table with the same statement under same user in phpmyadmin, the result was correct - the tables had the same structure.

Finally I repaired the table manually.

What I Expected

I don't understand the cause of the problem. Anyway, I thing such an error should be detected and reported to the user.

What Happened Instead

Screenshot or Video

@tfrommen
Copy link
Member

Hi,

this is strange, I will have a look at this.

Was there some message/error logged for copying, or did you get no error at all?

Was this some one-time error, or does it still happen if you create another duplicate?

Thanks,
Thorsten

@pavel-rybnicek
Copy link
Author

Hi Thorsten,

as a common user I didn't get any error message at all - I was just missing the taxonomies and application menu in the new site.

I was actually migrating from qTranslateX to Multilingualpress, so I made a backup website to test the migration. I tried that several times, always with the same result, so it's no random problem.

When I switched on the WP_DEBUG, I found the error message of the following step - data copy to the new table complained, that the table structure is different. No error message for the CREATE TABLE statement.

I added some tracing messages - the CREATE TABLE statement looks perfectly correct to me (and works as expected when run manually in phpAdmin).

Pavel

@tfrommen
Copy link
Member

tfrommen commented Aug 2, 2017

I'm still unable to reproduce (or even understand) this.
Unless you have any additional information, I will close this - for now.

@tfrommen
Copy link
Member

tfrommen commented Aug 9, 2017

For what it's worth, I am currently investigating another case where exactly this is happening. Only the terms table cannot be duplicated:

WordPress database error Column count doesn't match value count at row 1 for query INSERT INTO wp_2_terms SELECT * FROM wp_terms made by wpmu_create_blog, do_action('wpmu_new_blog'), WP_Hook->do_action, WP_Hook->apply_filters, Mlp_Duplicate_Blogs->wpmu_new_blog, Mlp_Table_Duplicator->replace_content

So far I only have FTP access, so I can't really say what's going on. I will report back once I had the chace to have a look at the DB etc.

@tfrommen
Copy link
Member

tfrommen commented Aug 9, 2017

Fixed in 3645d7b.

@tfrommen tfrommen closed this as completed Aug 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants