typisttech/sunny

Notification overload and cUrl Debugger error

Closed this issue · 6 comments

Detailed description

Problem 1:

When updating a post these notifications "Sunny: Purge initiated." keep poping up and do not get dismissed? They stay and accumulate so at times there are hundreds of these notifications. Seems the purge is not working correctly and then the notification just stays.

Problem 2 (I think it is connected):

When going into the debugger and trying a url with the check status, the result shows an error:


Status: 422 error
Code: http_request_failed
Message: cURL error 6: Could not resolve host: https%3A%2F%2Fbarbaralicious.com
Url: http://https%3A%2F%2Fbarbaralicious.com

I guess that cURL has some kind of problem. Don't fully see what's going on and how I could fix this. Or if it is something that could be fixed in the plugin.

Context

sunny_-_debuggers_ _barbaralicious_ _wordpress

Your environment

  • Version used (e.g. PHP 5.6, HHVM 3): PHP CGI 7.1
  • Hosting on All-Inkl

Thanks for this plugin. The v2 looks good in general and I like the update. But I guess since it's a completely new version it also has some problems?

Cheers,
Chris

Why you have PHP 5.6 and 7.1(CGI??) at the same time?

About notifications:
Currently, if WP_DEBUG is true, you have to manually dismiss it. This is a bug needs to be fixed.
See: https://github.com/TypistTech/sunny/blob/master/src/Notifications/Notice.php#L86

About multiple purging:
Yes, there is a chance that one user action trigger multiple purges. I am working on a queue to process urls in the background which should resolve this. ETA: unknown

I am only using the 7.1 the 5.6 is just the default message of the issue thing.

Ok will check WP_DEBUG

Oh... I misread the php version line.

I see that unnecessary http:// is added to the url. However, I can't reproduce the error.
Are you having this issue on another site?

See: http://i.imgur.com/oWBZHB4.jpg

Please check $url on these lines:

https://github.com/TypistTech/sunny/blob/master/src/REST/Controllers/Caches/Status/ShowController.php#L63
https://github.com/TypistTech/sunny/blob/master/src/REST/Controllers/Caches/Status/ShowController.php#L81
https://github.com/TypistTech/sunny/blob/master/src/Caches/Status.php#L63

Ok, the WP_DEBUG = false fixed the notice problem and those are no longer an issue.

The check seems to still not work. I deleted the plugin and reinstalled it from WP Directory. So it is the same as the code base. Don't know what's going on there.

Also noticed that somehow there is an http:// beeing added in front of the url. But submitting without http is not a valid url (form says that).

I could only assume that it is some conflict with another plugin.

But as far as I checked the debug.log (before disabling it with WP_DEBUG = false Sunny seems to purge the caches successfully.

So I can't request the status but the purging seems to work. And so far I think that is enough.

Please let me know if I can test anything else for you.

Sunny forces users to type http:// or https:// because Cloudflare caches them as 2 different items.

About the redundant http(s):// part:
I guess it is some conflict with another plugin or some JS.

Closing this issue.
Open a new one if it happens again on another site.