feed2js icon indicating copy to clipboard operation
feed2js copied to clipboard

Feed won't validate WordPress feeds containing images with srcset

Open pingram3541 opened this issue 7 years ago • 2 comments

I have a site where the script outputs errors stating the feed url is invalid or the feed content is not valid:

Error: Feed failed! Causes may be (1) No data found for RSS feed https://www.mywebsite.com/blog/feed; (2) There are no items are available for this feed; (3) The RSS feed does not validate.

However when I execute the script src directly in my browser it works just fine.

feed2js_ck = true;

document.write('<div class="rss-box">');
document.write('<ul class="rss-items">');
document.write('<li class="rss-item"><a class="rss-item" href="https://www.mywebsite.com/blog/families-of-criminals-reach-their-breaking-point-a-new-investigation-discovery-series-premiering-january-15" target="_self">FAMILIES OF CRIMINALS REACH THEIR BREAKING POINT - A NEW INVESTIGATION DISCOVERY SERIES PREMIERING JANUARY 15</a><br />');
document.write('</li>');
document.write('<li class="rss-item"><a class="rss-item" href="https://www.mywebsite.com/blog/lifestyle-leader-and-mindfulness-expert-is-keynote-speaker-at-long-island-womens-wellness-conference" target="_self">LIFESTYLE LEADER AND MINDFULNESS EXPERT IS KEYNOTE SPEAKER AT LONG ISLAND WOMENS WELLNESS CONFERENCE</a><br />');
document.write('</li>');
document.write('<li class="rss-item"><a class="rss-item" href="https://www.mywebsite.com/blog/lifestyle-leader-joan-moran-receives-nomination-la-business-journal-for-women-making-a-difference-award" target="_self">Lifestyle Leader Joan Moran Receives Nomination - LA Business Journal for Women Making a Difference Award</a><br />');
document.write('</li>');
document.write('<li class="rss-item"><a class="rss-item" href="https://www.mywebsite.com/blog/the-annual-socal-csp-event" target="_self">the Annual SoCal CSP Event</a><br />');
document.write('</li>');
document.write('<li class="rss-item"><a class="rss-item" href="https://www.mywebsite.com/blog/slam-dunk-delivery-with-two-nsa-members" target="_self">SLAM Dunk Delivery with Two NSA Members</a><br />');
document.write('</li>');
document.write('</ul></div>');

Any ideas?

pingram3541 avatar May 06 '17 02:05 pingram3541

Issue was the main site was https and blog was http.

pingram3541 avatar May 06 '17 02:05 pingram3541

Nope that wasn't it. Well it is but blog feed url is indeed loading http or https but fails when using https as the src attr when using this script. I should also clarify that I am using the "build" tool on the feed2js.org website. When I use a url with https, the script errors out. If I change to http it works but when loading from my website, http will always rewrite to https.

pingram3541 avatar May 06 '17 02:05 pingram3541