404 when accessing REST API
-
Hi there,
thanks for providing this plugin that I really would like to use. Unfortunately, I cannot get it to work, since I get “An error occurred while connecting to REST API. Please try again. ” when trying to convert the images.
The issue seems to be caused by a 404 when accessing “https://blog.bikingglobetrotter.de/index.php?rest_route=/webp-converter/v1/paths?_wpnonce=f5fe180c18”
Do you have an explanation for that? I tried to debug the issue further, but no debug log file is written after activating WP_DEBUG and WP_DEBUG_LOG.
Rest API seems to accessible in general. (checked accessing ?rest_route= )The server uses wordpress:5.6.0 docker image running behind an NGINX SSL proxy (https://hub.docker.com/r/jwilder/nginx-proxy)
Any help is appreciated.
Questions from FAQ:
1. Do you have any error on the plugin settings page? Enter error codes. Have you consulted your server administrator or developer?
As said before, “An error occurred while connecting to REST API. Please try again. ” when trying to convert the image.2. URL of your website. If your site is not publicly available, add it to test environment.
see above3. Configuration of your server (link to it can be found on the settings page of plugin in the section “We are waiting for your message”) – please take a screenshot of the ENTIRE page and send it to me.
https://ibb.co/F5XX0my4. Settings of plugin – please take a screenshot of the ENTIRE page and send it to me.
https://ibb.co/c1xP7Qc
https://ibb.co/1TC12rh5. Do you use CDN? If so, please see the question “Does the plugin support CDN?” in plugin FAQ.
No6. Please do the test, which is described in the FAQ in question How to check if plugin works?. Please send a screenshot of Devtools with test results.
Well, since no image has been converted, chrome also don’t lists any webp file.7. Content of your .htaccess files from directories /wp-content, /wp-content/uploads and /wp-content/uploads-webpc (pasting the code using the CODE shortcode in the editor).
/wpcontent/.htaccess# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpeg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.png.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.png$ /wp-content/uploads-webpc/$1.png.webp [NC,T=image/webp,E=cache-control:no-cache,L] </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter/wpcontent/uploads/.htaccess
# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.jpg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/uploads/$1.jpg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.jpeg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/uploads/$1.jpeg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.png.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.png$ /wp-content/uploads-webpc/uploads/$1.png.webp [NC,T=image/webp,E=cache-control:no-cache,L] </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter/wp-content/uploads-webpc
# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_mime.c> AddType image/webp .webp </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/webp "access plus 1 year" </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter`
8. Do you use any plugin filters or actions from this FAQ? If so, list them all.
I don’t know what you mean with that.9. What plugin version are you using? If it is not the latest then update and check everything again.
Latest10. Used WordPress version.
5.6.0 (Docker image)11. A list of all the plugins you use. Have you tried checking the plugin operation by turning off all others and activating the default theme? If not, please try whenever possible. This is very important because other plugins or themes can cause problems. Therefore, we recommend disabling all necessary plugins and enabling the default theme.
List of installed plugins: https://ibb.co/cgyjnFj
I tried to disable all others, but the behavior is the same.Best regards
MichaelThe page I need help with: [log in to see the link]
The topic ‘404 when accessing REST API’ is closed to new replies.