为什么我的wordpress帖子以编程方式创建,而不是打开详细信息页面并重定向到索引

时间:2018-12-23 06:35:25

标签: wordpress

我使用python以编程方式创建了一个帖子:

sql = "insert into `wp_18_posts` " \
          "(`post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, " \
          "`post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`," \
          "`to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`," \
          "`guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`, `django_id`)" \
          " values " \
          "(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"

该帖子同时显示在数据库和索引页面中,但是一旦我单击该帖子,它就会将我重新重定向回索引。因此,详细信息页面无法打开。

我将post_status设置为“发布”。

我还手动在mysql中设置分类法。但没有成功。

编辑:

这是debug.log: enter image description here

欣赏任何提示。

1 个答案:

答案 0 :(得分:0)

根据您添加的调试报告,它表示在使用前缀'wp_18'的地方表wp_9_option不存在

相关问题