发布失败。该响应不是有效的JSON响应

时间:2020-07-30 作者:Midhun Raj

enter image description here

I am using wordpress 5.4.2. I get this error when trying to add a new post. I changed my permalink to

Post name sample

http://localhost/wordpress/sample-post/

How should i change my .htaccess

My current htaccess is

    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    
    # END WordPress

~
Please help me II am new to wordpress

Akismet Anti-Spam Classic Editor Hello Dolly Increase Maximum Upload File Size Jetpack by WordPress.com myStickymenu OptinMonster API UberMenu 3 - The Ultimate WordPress Mega Menu .These are my installed plugins

This is my custom css

    .site-info { 
        display: none; 
    }
    
    .entry-meta .byline, .entry-meta .cat-links { display: none; }
    
    .entry-meta .posted-on { display: none; }
    .entry-footer{
        display:none;
    }
    
    .postmetadata {display:none;}
    
    .entry-meta {display:none !important;}
        .home .entry-meta { display: none; }
        .entry-footer {display:none !important;}
        .home .entry-footer { display: none; }

Console error

    [DOM] Found 2 elements with non-unique id #_wpnonce: (More info: https:// goo.gl/9p2vKq) <input type=​"hidden" id=​"_wpnonce" name=​"_wpnonce" value=​"65e17e3128">​ <input type=​"hidden" id=​"_wpnonce" name=​"_wpnonce" value=​"2ba7a6de71">​
    /wordpress/wp-json/wp/v2/users/me?_locale=user:1 Failed to load resource: the server responded with a status of 404 (Not Found)
    data.min.js?ver=e80048e7b309581a40e44b8bd8aaba41:2 Uncaught (in promise) Objectcode: "invalid_json"message: "The response is not a valid JSON response."__proto__: Object
1 个回复
SO网友:Sebas Rossi

我打赌你在本地主机服务器上,我也有同样的问题,并修复了更改文件权限。所有wp内容文件;文件夹,所有wp包括文件夹(&P);文件必须具有完全权限。

如果您在localhost上,这不是问题,您可以简单地授予整个WP安装的完全权限