OK, had a chance to tear this one apart and finally tracked down what's happening. In short, after touching an existing feed entry after RSS Feed Filter has been installed then my server environment is no longer seeing the $filterWords variable as being empty. Not necessarily a problem but I'm using some corporate XML feeds that do not have a 'content' tag in their RSS item entries. Because of that it then fails the check to see if the $filterWords is found in $entry['content'].
Now the details...
- On a clean XF install add the feed https://global.canon/en/rssfeed/news/index.xml.
- Install RSS Feed Filter but do not modify the entry for the feed you just added. Instead take a look at the database table xf_feed for the feed you created. The value of "snog_words" column is null.
- At this point the feed should import fine as expected.
- Now go in and modify the feed entry. Don't change anything, just go ahead and hit the 'save' button.
- Go back and look at the database table for the entry - it is no longer null, it is now a blob value.
- Try to import the feed, likely nothing got imported. Note for testing you'll need to clear your xf_feed_log table for the feed ID in question.
- The reason nothing got imported is because at around line 40 of /src/addons/Snog/RSS/XF/Service/Feed.php it no longer evaluates as being empty, instead it is seeing an array with a blank value.
- Because it did not evaluate to empty it is trying to find blank ("") in $entry['content'].
- For this feed $entry['content'] does not exist so it is failing the conditional and never sets $filterFound to be true.
- Because $filterFound is not true the current RSS item gets skipped.
- If $entry['content'] did exist then "" would've been found and $filterFound would've been set to true and the RSS item would not have been skipped.
So for anybody else having issues, start with checking the feed you're using to see if the content tag is present.
For my purposes I'm getting around the issue by changing the $filterFound conditional at line 44 to look in
both $entry['content'] and $entry['title'] which, for feeds with no content tag, allows the filter words to still be searched and if filter words are not being used then "" is found in the title which allows for $filterFound to be set to true so the item doesn't get skipped.