Skip to content

Instantly share code, notes, and snippets.

@andrewshell
Created December 7, 2022 04:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewshell/8b57f96bf62a1dea9fa1a8137e13951a to your computer and use it in GitHub Desktop.
Save andrewshell/8b57f96bf62a1dea9fa1a8137e13951a to your computer and use it in GitHub Desktop.
Debugging rssCloud on WordPress.com

I have a test application running at test.rsscloud.io on ports 80 and 9876.

The following code works:

curl --location --request POST 'https://brokenriverbooks.com/?rsscloud=notify' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'domain=test.rsscloud.io' \
--data-urlencode 'port=80' \
--data-urlencode 'path=/feedupdated-s8759' \
--data-urlencode 'registerProcedure=' \
--data-urlencode 'protocol=http-post' \
--data-urlencode 'url1=https://brokenriverbooks.com/feed/'

However if you change the port to 9876 it fails. For some reason the rssCloud plugin seems unable to hit ports that are not 80.

@andysylvester
Copy link

@josephscott - Yesterday, per your suggestion, I created a new WordPress site (https://scott2.andysylvester.com/) and disabled all plugins, then installed version 0.5.0 of the RSS Cloud plugin, and was able to successfully see posts appear within several seconds on FeedLand, which would indicate that the plugin is working. I also checked the feed in the browser and using curl, and both contained the correct content. This morning, I decided to do additional tests using my test app and Dave Winer's test app. Both apps were able to receive the notification from new posts. However, posts did not appear in FeedLand. I also checked the feed in the browser and using curl, and both contained the correct content.

When I looked at the output of my app, which uses the readFeed function within the NPM reallySimple package to get the feed, the first title in the feed it read was for test post 8, although I had created a new test post. This behavior continued even though I made several additional posts. In the posts, I captured info on each state of testing. To me, if FeedLand was not seeing any changes in the feed, I can totally understand that it would not display anything from the feed. As I have commented before, this seems like a caching problem, but I am not sure where to look.

I do not fully understand what is happening here, but this behavior has now occurred on two different WordPress sites using the latest RSS Cloud plugin. I would like to work this out, because WordPress is the major creator of rssCloud-enabled feeds, and I want to use rssCloud and WordPress in a new project. @josephscott, I am willing to keep posting to this thread, or in some other forum to work this out, I appreciate the feedback you have given me, and want to run this problem down if I can.

@josephscott
Copy link

From what you are describing, I'm not sure that this is directly related to the RSS Cloud plugin. You mentioned that it worked out of the box, with the feed showing the latest data and pings going out to FeedLand.

To track this down I think you are going to need more data. I'd recommend adding logging to every step, that what you can confirm when a step went missing that you were expecting to happen.

@andysylvester
Copy link

@josephscott - thanks for getting back with me. I did see it work "out of the box", but then saw this caching issue when I was running some supplemental test scripts. I will add some logging and report back on what I find.

@andysylvester
Copy link

@josephscott - I apologize for taking so long to get back to you on this thread. I found that my hosting provider (Bluehost) had a site-by-site caching setting that I was not aware of. I turned caching off, and I also uncommented line 12 in rsscloud.php within the WordPress RSS Cloud plugin. After taking those two actions, I was able to see WordPress posts within a few seconds on FeedLand and a separate tool I created. More info is available here: https://andysylvester.com/2023/02/23/solved-my-problem-with-wordpress-caching/. Thanks for your helpful suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment