duan0424 2019-07-14 09:43
浏览 62
已采纳

无法在WordPress中创建新帖子

Suddently the "publish" button has vanished, and there is the "send for review" button instead on new posts. When clicking the "save draft" button I get "you are not allowed to..." message. I enabled debugging on WordPress, and when I navigate to the new post page, I get:

WordPress database error: [Incorrect datetime value: '0000-00-00 00:00:00' for column 'post_date_gmt' at row 1]

INSERT INTO 'wp_posts' ('post_author','post_date','post_date_gmt','post_content','post_content_filtered','post_title','post_excerpt','post_status','post_type','comment_status','ping_status','post_password','post_name','to_ping','pinged','post_modified','post_modified_gmt','post_parent','menu_order','guid') VALUES (1,'2019-07-14 12:53:19','0000-00-00 00:00:00','','','autodraft','','auto-draft','post','open','closed','','','','','2019-07-14 12:53:19','0000-00-00 00:00:00',0,0

at the top of the new post page. I also get a bunch of warnings and notices too, but I figured it's unlikely these are causing the problem:

Warning: Creating default object from empty value in wp-admin\includes\post.php on line 475

Notice: Undefined property: stdClass::$ID in wp-admin\post-new.php on line 64

Notice: Undefined property: stdClass::$post_date in wp-admin\edit-form-advanced.php on line 49
.
.
.

I'm new to php and WordPress, so does any WP veteran know if these are normal, or do these have to do anything to do with being unable to create new posts or save a new post draft?

  • 写回答

1条回答 默认 最新

  • dongliechuich10319 2019-07-14 10:59
    关注

    I've resolved this issue by changing all core files inside WordPress since that inside the files can be a malware. This is not a solution for the custom-designed theme because then is probably some mistake inside the theme.

    You can download a fresh new install, remove the wp-content folder, and wp-config.php file and just merge via FTP/SFTP to your root folder where is the WordPress install.

    I would suggest you create a backup first.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵