Error while creating Wordpress post

Asked

Viewed 1,108 times

0

Hello,

I had a few problems with a cross-Omain virus (SEO Infect) in my hosting, after cleaning, reconfigure things my wordpress is presenting an error that is new to my person, in place of the box where you type your content appears "You are currently editing the page that displays your most recent posts." Does anyone know how to fix it? I am not able to identify if it is in the database that I store or if it is in some file.

Erro

3 answers

2


Go on Settings -> Reading Settings and select another page from select "Posts page".

inserir a descrição da imagem aqui

This warning appears precisely because as this page is selected there, its content will be replaced by its list of posts.

0

I can not currently comment, but the answers of Marta Freitas is perfect! It worked for me!

Error happened when importing database to another server.

However, for some strange reason I didn’t need all the commands, I had to go testing one by one (because adding them all in phpMyAdmin would stop at a certain port). But it was great!

So to me the answer was this:

DELETE FROM wp_termmeta WHERE meta_id=0; 
DELETE FROM wp_terms WHERE term_id=0; 
DELETE FROM wp_term_taxonomy WHERE term_taxonomy_id=0; 
DELETE FROM wp_commentmeta WHERE meta_id=0; 
DELETE FROM wp_comments WHERE comment_ID=0; 
DELETE FROM wp_links WHERE link_id=0; 
DELETE FROM wp_options WHERE option_id=0; 
DELETE FROM wp_postmeta WHERE meta_id=0; 
DELETE FROM wp_users WHERE ID=0; 
DELETE FROM wp_posts WHERE ID=0; 
DELETE FROM wp_usermeta WHERE umeta_id=0;

ALTER TABLE wp_termmeta ADD PRIMARY KEY(meta_id); 
ALTER TABLE wp_terms ADD PRIMARY KEY(term_id); 
ALTER TABLE wp_term_taxonomy ADD PRIMARY KEY(term_taxonomy_id); 
ALTER TABLE wp_commentmeta ADD PRIMARY KEY(meta_id); 
ALTER TABLE wp_comments ADD PRIMARY KEY(comment_ID); 
ALTER TABLE wp_links ADD PRIMARY KEY(link_id); 
ALTER TABLE wp_options ADD PRIMARY KEY(option_id); 
ALTER TABLE wp_postmeta ADD PRIMARY KEY(meta_id); 
ALTER TABLE wp_users ADD PRIMARY KEY(ID); 
ALTER TABLE wp_posts ADD PRIMARY KEY(ID); 
ALTER TABLE wp_usermeta ADD PRIMARY KEY(umeta_id);

ALTER TABLE wp_termmeta CHANGE meta_id meta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_terms CHANGE term_id term_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_term_taxonomy CHANGE term_taxonomy_id term_taxonomy_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_commentmeta CHANGE meta_id meta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_comments CHANGE comment_ID comment_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_links CHANGE link_id link_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_options CHANGE option_id option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_postmeta CHANGE meta_id meta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_users CHANGE ID ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_posts CHANGE ID ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_usermeta CHANGE umeta_id umeta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;

-2

I had the same problem in a blog and the cause was the configuration of the wordpress tables in the database. The table wp_posts were not with primary key in the ID and AUTO_INCREMENT. Due to this every time you try to add a new post/page is generated the ID 0 that causes the error message.

How it has to be: inserir a descrição da imagem aqui

For the correction you must change the tables, you can use the commands below: P.S.: In some tables, I configured PK through the panel in Phpmyadmin (Selects table > structure > selects column > primary key.

DELETE FROM wp_termmeta WHERE meta_id=0; 
DELETE FROM wp_terms WHERE term_id=0; 
DELETE FROM wp_term_taxonomy WHERE term_taxonomy_id=0; 
DELETE FROM wp_commentmeta WHERE meta_id=0; 
DELETE FROM wp_comments WHERE comment_ID=0; 
DELETE FROM wp_links WHERE link_id=0; 
DELETE FROM wp_options WHERE option_id=0; 
DELETE FROM wp_postmeta WHERE meta_id=0; 
DELETE FROM wp_users WHERE ID=0; 
DELETE FROM wp_posts WHERE ID=0; 
DELETE FROM wp_usermeta WHERE umeta_id=0;

ALTER TABLE wp_termmeta ADD PRIMARY KEY(meta_id); 
ALTER TABLE wp_terms ADD PRIMARY KEY(term_id); 
ALTER TABLE wp_term_taxonomy ADD PRIMARY KEY(term_taxonomy_id); 
ALTER TABLE wp_commentmeta ADD PRIMARY KEY(meta_id); 
ALTER TABLE wp_comments ADD PRIMARY KEY(comment_ID); 
ALTER TABLE wp_links ADD PRIMARY KEY(link_id); 
ALTER TABLE wp_options ADD PRIMARY KEY(option_id); 
ALTER TABLE wp_postmeta ADD PRIMARY KEY(meta_id); 
ALTER TABLE wp_users ADD PRIMARY KEY(ID); 
ALTER TABLE wp_posts ADD PRIMARY KEY(ID); 
ALTER TABLE wp_usermeta ADD PRIMARY KEY(umeta_id);

ALTER TABLE wp_termmeta CHANGE meta_id meta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_terms CHANGE term_id term_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_term_taxonomy CHANGE term_taxonomy_id term_taxonomy_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_commentmeta CHANGE meta_id meta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_comments CHANGE comment_ID comment_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_links CHANGE link_id link_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_options CHANGE option_id option_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_postmeta CHANGE meta_id meta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_users CHANGE ID ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_posts CHANGE ID ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; 
ALTER TABLE wp_usermeta CHANGE umeta_id umeta_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.