Closed Soare-Robert-Daniel closed 6 months ago
Plugin build for aba40761ee41a595b223b5cab52fd933cd799b4f is ready :bellhop_bell:!
@Soare-Robert-Daniel Tested and the issue is fixed now 🚀
:tada: This PR is included in version 9.0.23 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Close https://github.com/Codeinwp/tweet-old-post-pro/issues/480
Summary
Added better service response handling and upgraded the URL to use the latest API endpoint.
Description
The posting mechanism added a message like that ends
Error, database insert failed
. This was caused by the functionget_url
, which tries to shorten the URL by usingis.gd
service.To replicate this issue you need a valid domain. The services work only with URLs that are available on the internet and are not on the blocklist (FYI: tastewp URLs are on the blacklist).
The main problem is that when services cannot process the URL, it will give something like this as a response:
Because the response error is
200
, the code accepted the string without further verification.To solve this, I added a check to see that the response is a URL.
Any other response from the server will be treated as an error and logged:
There was also a report about the same issue for people who did not use the URL shortener https://github.com/Codeinwp/tweet-old-post-pro/issues/480#issuecomment-1896311145
I tested all the codes and could not reproduce them.
Testing
is.gd
is not giving the URL. You can test with TasteWP or a local instance.is.gd
, you will need a non-banned and online available instance.