I've got an RSS feed I display on my site. The RSS works fine and it displays the items from the other site's RSS feed fine. However, after each item displayed it says "Invalid Date". Does anyone know where I can delete this "Invalid date" text so that it does not show in feed display?
|
Old topic here I know but I have the same problem.. No idea how to get rid of this. |
Attached is a screen shot. |
Please could you provide problematic RSS URL ? so we can investigate the problem Rules → http://www.boonex.com/terms |
Here's one Alex
http://www.dpreview.com/feeds/news/latest
Placed on the main Photos Home page cache =0
Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net |
I prefer not to post my link publicly. I have a php file on my server that generates calls and rss feed so the link is actually to a php file to output my rss feed once inserted into the rss feed block. Ill message you the link. |
I didn't noticed any problem with this RSS feed:
http://www.demozzz.com/dolphin714b/m/photos/home/
Here's one Alex
http://www.dpreview.com/feeds/news/latest
Placed on the main Photos Home page cache =0
Rules → http://www.boonex.com/terms |
There is no date field at all in your custom made RSS feed, this is the reason it can't be parsed and shown.
I prefer not to post my link publicly. I have a php file on my server that generates calls and rss feed so the link is actually to a php file to output my rss feed once inserted into the rss feed block. Ill message you the link.
Rules → http://www.boonex.com/terms |
I didn't noticed any problem with this RSS feed:
http://www.demozzz.com/dolphin714b/m/photos/home/
Here's one Alex
http://www.dpreview.com/feeds/news/latest
Placed on the main Photos Home page cache =0
You did not see a problem. Here is a screen shot of your site with that feed.

https://www.deanbassett.com |
There is no date field at all in your custom made RSS feed, this is the reason it can't be parsed and shown.
I prefer not to post my link publicly. I have a php file on my server that generates calls and rss feed so the link is actually to a php file to output my rss feed once inserted into the rss feed block. Ill message you the link.
I have no idea how to add a date field.. Maybe removing the line of code that tries to parse a date field would be easier?
|
Attached is my php file that generates my rss feed. |
Attached is my php file that generates my rss feed.
You could try to modify this in your code.
foreach($scorearray as $score) { echo "<item>\n"; echo "<title>".$score["title"]."</title>\n"; echo "<link>".$score["url"]."</link>\n"; echo "</item>\n"; }
To this..
foreach($scorearray as $score) { echo "<item>\n"; echo "<title>".$score["title"]."</title>\n"; echo "<link>".$score["url"]."</link>\n"; echo "<pubDate>".date(DATE_RSS)."</pubDate>\n"; echo "</item>\n"; }
https://www.deanbassett.com |
Wow thanks deano. That made the dates work. However it dates everything for the current time and date as it is right this very moment (which I can deal with). I would rather it stamp the date as the time the entry was added but Ill take this it looks much better than "invalid date". Thanks a lot. |
I was going to, but the data it gets from here.. http://sports.espn.go.com/mlb/bottomline/scores
Does not seem to have a date in it, so i could not extract one.
https://www.deanbassett.com |
I was going to, but the data it gets from here.. http://sports.espn.go.com/mlb/bottomline/scores
Does not seem to have a date in it, so i could not extract one.
Deano, just go to AU and make Andrew hire you! Seems the only real person that knows WTF is going on!!
ManOfTeal.COM a Proud UNA site, six years running strong! |
Why not just have it echo a blank since the publish date is not available? Geeks, making the world a better place |
As the OP, I was very excited to see someone had success with this issue.
Deano, I tried adding the echo "<pubDate>".date(DATE_RSS)."</pubDate>\n"; in different places in my RSS script but I had no luck. I have attached my RSS script that shows "Invalid Date" on my Dolphin site. When you have a minute, would you be so kind as tell me where I should include it in my script?
Thanks!
|
Your script is to complicated. There is more then one area that is generating a feed. One of them has a date area, the others do not. I am not really sure where to place it. Most likely more than one location. https://www.deanbassett.com |
Try this instead. Instead of changing your scripts that are generating the RSS, Lets change dolphin to deal with it.
Edit inc/js/jquery.dolRSSFeed.js
Look for this at about line 32
oDate = new Date( item.updated );
Directly under that line , add this.
if(oDate == 'Invalid Date') { if(item.updated != '') { oDate = item.updated; } else { oDate = ''; } }
If no date is provided in the feed then it should not display one. If one is provided, but is in the wrong format, then it will be displayed as is. In the case of the feed here http://www.dpreview.com/feeds/news/latest the dates are specified as Sat, 27 Jul 2013 23:28:47 Z which is not the proper format for RSS feed dates. https://www.deanbassett.com |
Try this instead.
You need a donate button on your site...
ManOfTeal.COM a Proud UNA site, six years running strong! |
I used to have one on my site before a major malfunction forced me to start the site over.
Anyhow. Thanks for reminding me it was missing.
I have added a donation block back on my site again.
https://www.deanbassett.com |
I used to have one on my site before a major malfunction forced me to start the site over.
Anyhow. Thanks for reminding me it was missing.
I have added a donation block back on my site again.
Hint to all those that get his great help; [clears throat] Deano is always here for us!
I mean even a couple bucks add up... just sayin 
Made my buck fifty donate, lets make this Deano Day.. lol
Confirmation Number: xxx51192VC060413YPlaced on Jul 28, 2013
Purpose>Donation amount to DeanBassett.com$1.50 USD
Thanks for all you do here.
ManOfTeal.COM a Proud UNA site, six years running strong! |
https://www.deanbassett.com |
Dean,
As always, Thank You for your help. I owe you a few cups of coffee so here's $5 spot.
Confirmation number: 1KA58898MB521010S.
An email with your donation details has been sent to Itxxwhiz@hoxxxxx.com
Donations Coordinator Contact Information
Dean Bassett
Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net |
Hi Deano, you have always been there for me. I have donated US$10 all the way from Thailand.
Many thanks mate!
Stuart
There are none so blind as those that will not see. |
https://www.deanbassett.com |
That's what I'm talking about...! Couldn't do it without you guy!! ManOfTeal.COM a Proud UNA site, six years running strong! |
Thanks Deano! No more ugly "Invalid Date" notices on my site. Much appreciated. PayPal Confirmation number: 81A62668AR079271F is from me.
Thanks again.
|
Why not just have it echo a blank since the publish date is not available?
Thats a great idea. Except I don't know how to make it work
echo "<pubDate>".date(DATE_RSS)."</pubDate>\n";
I have tried removing (DATE_RSS) or the entire .date(DATE_RSS). and other things. Seems like anything I change only returns it to the invalid date text again.
|
Why not just have it echo a blank since the publish date is not available?
Thats a great idea. Except I don't know how to make it work
echo "<pubDate>".date(DATE_RSS)."</pubDate>\n";
I have tried removing (DATE_RSS) or the entire .date(DATE_RSS). and other things. Seems like anything I change only returns it to the invalid date text again.
I posted a fix for dolphin that will do that. It's a few posts up. Here is a targeted link to the post. http://www.boonex.com/forums/topic/Remove-Invaild-Date-From-RSS-Output.htm#213797
Just remove the changes to your custom script and use the dolphin patch instead.
EDIT: Or you can try the fix AlexT just posted.
https://www.deanbassett.com |
It looks like the problem is in Firefox only, I've checked in Crome and everything is fine there, thank you for the screenshot.
You did not see a problem. Here is a screen shot of your site with that feed.
Anyway, I hope that this fix will solve both problems:
http://www.boonex.com/trac/dolphin/ticket/3262
http://www.boonex.com/trac/dolphin/changeset/17769
Rules → http://www.boonex.com/terms |
Thank you Deano and AlexT for your continued attention on this issue. As well to everyone else that contributed. Sometimes I feel like I ask to many questions. Thanks for attending to my concerns. Everything works just fine now. Thanks geek_girl for the suggestion to echo a blank date. I've been really thankful and fortunate to the community here. I hope I learn to develop for Dolphin in the future after I get my own personal sites right and force myself to learn the developer side of this. Its on my bucket list anyway. Hopefully I can contribute in the future even a fraction of what you all already have.
Jason
|