WPIntell

Source evidence

Blocking http requests… in the REST API

Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes · support · 2021-12-06T00:14:00+00:00

mixedsentiment
highseverity
0.95relevance
11replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 28 rows with source links

17.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

23 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
webfantastic resolved
Hi! The plugin does not work. I am trying to analyze the images, but the process does not start, and there are errors in the browser console. Please tell me how to fix it? — Mixed content: load all resources via HTTPS to improve the security of your site Even though the initial HTML page is loaded over a secure HTTPS connection, some resources like images, stylesheets or scripts are being accessed over an insecure HTTP connection. Usage of insecure resources is restricted to strengthen the security of your entire site. To resolve this issue, load all resources over a secure HTTPS connection. 2 resources Name Restriction Status ?_v=2.5.23&_locale=user blocked ?_v=2.5.23&_locale=user&page=1&posts_per_page=40 blocked Requests come from http, but wordpress does not want to process, it only asks for https. Hi there! It looks like you are using two different protocols for your home URL and site URL configured in Settings > General. Can you please check this? Regards Matthew 😊 Hi! I checked and all urls start with https. I do not know what the problem may be. We had a plugin installed that hides WordPress, but we did not disable the REST API https://wordpress.org/plugins/wp-hide-security-enhancer/ I checked the htaccess file, but everything is standard there: RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteCond %{REQUEST_METHOD} !POST RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,END] <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Only single thumbnail regeneration works when you can select only one image and regenerate it, but analysis does not work This reply was modified 4 years, 5 months ago by webfantastic . This reply was modified 4 years, 5 months ago by webfantastic . Hi again! Can you please open your developer console and type the following: realThumbnailGenerator.restRoot and send the result as screenshot? When I enter this command it shows the address to the rest API https://namesite.com/wp-json/ This reply was modified 4 years, 5 months ago by webfantastic . upload.php:2864 Uncaught TypeError: Cannot set properties of null (setting ‘onclick’) at upload.php:2864 (anonymous) @ upload.php:2864 upload.php:2867 Uncaught TypeError: Cannot set properties of null (setting ‘onclick’) at upload.php:2867 (anonymous) @ upload.php:2867 upload.php:1 Mixed Content: The page at ‘ https://site.com/wp-admin/upload.php?’ ; was loaded over HTTPS, but requested an insecure resource ‘ http://site.com/wp-json/real-thumbnail-generator/v1/stats/?_v=2.5.23&_locale=user’ ;. This request has been blocked; the content must be served over HTTPS. Can you please share a screenshot of this error message? Everything worked. I had to change the htaccess file to the default file, prescribing redirection to https there and it began to work. Apparently you have http links in the plugin that access the api Hi again! Apparently you have http links in the plugin that access the api We are using the WordPress core functionality https://developer.wordpress.org/reference/functions/get_rest_url/ to get the REST API URL, so I think this is more a configuration issue. But nice to hear that you have found the root cause, this could also be interesting for other uesrs as well! 🚀 Is it possible that the url with http is written somewhere in the database? Can you tell me how to check it? Thanks The REST API URL is generated from the home and site URL configured in Settings > General. But it could also be modified through a developer filter. Perhaps another plugin modifies it?

Comments

11 shown
Matthias Günter 2021-12-06T10:10:00+00:00

Hi there! It looks like you are using two different protocols for your home URL and site URL configured in Settings > General. Can you please check this? Regards Matthew 😊

webfantastic 2021-12-06T11:44:00+00:00

Hi! I checked and all urls start with https. I do not know what the problem may be.

webfantastic 2021-12-06T11:50:00+00:00

We had a plugin installed that hides WordPress, but we did not disable the REST API https://wordpress.org/plugins/wp-hide-security-enhancer/ I checked the htaccess file, but everything is standard there: RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteCond %{REQUEST_METHOD} !POST RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,END] <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Only single thumbnail regeneration works when you can select only one image and regenerate it, but analysis does not work This reply was modified 4 years, 5 months ago by webfantastic . This reply was modified 4 years, 5 months ago by webfantastic .

Matthias Günter 2021-12-06T12:08:00+00:00

Hi again! Can you please open your developer console and type the following: realThumbnailGenerator.restRoot and send the result as screenshot?

webfantastic 2021-12-06T12:24:00+00:00

When I enter this command it shows the address to the rest API https://namesite.com/wp-json/ This reply was modified 4 years, 5 months ago by webfantastic .

webfantastic 2021-12-06T12:28:00+00:00

upload.php:2864 Uncaught TypeError: Cannot set properties of null (setting ‘onclick’) at upload.php:2864 (anonymous) @ upload.php:2864 upload.php:2867 Uncaught TypeError: Cannot set properties of null (setting ‘onclick’) at upload.php:2867 (anonymous) @ upload.php:2867 upload.php:1 Mixed Content: The page at ‘ https://site.com/wp-admin/upload.php?’ ; was loaded over HTTPS, but requested an insecure resource ‘ http://site.com/wp-json/real-thumbnail-generator/v1/stats/?_v=2.5.23&_locale=user’ ;. This request has been blocked; the content must be served over HTTPS.

Matthias Günter 2021-12-06T13:33:00+00:00

Can you please share a screenshot of this error message?

webfantastic 2021-12-06T13:49:00+00:00

Everything worked. I had to change the htaccess file to the default file, prescribing redirection to https there and it began to work. Apparently you have http links in the plugin that access the api

Matthias Günter 2021-12-06T13:52:00+00:00

Hi again! Apparently you have http links in the plugin that access the api We are using the WordPress core functionality https://developer.wordpress.org/reference/functions/get_rest_url/ to get the REST API URL, so I think this is more a configuration issue. But nice to hear that you have found the root cause, this could also be interesting for other uesrs as well! 🚀

webfantastic 2021-12-06T13:55:00+00:00

Is it possible that the url with http is written somewhere in the database? Can you tell me how to check it? Thanks

Matthias Günter 2021-12-06T18:38:00+00:00

The REST API URL is generated from the home and site URL configured in Settings > General. But it could also be modified through a developer filter. Perhaps another plugin modifies it?