Remove "Invaild Date" From RSS Output

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?

 

Quote · 18 Nov 2012

Old topic here I know but I have the same problem.. No idea how to get rid of this.

Quote · 26 Jul 2013

Attached is a screen shot.

invalid_date.jpg · 12.2K · 174 views
Quote · 26 Jul 2013

Please could you provide problematic RSS URL ? so we can investigate the problem

Rules → http://www.boonex.com/terms
Quote · 27 Jul 2013

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
Quote · 27 Jul 2013

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.

Quote · 27 Jul 2013

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
Quote · 28 Jul 2013

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
Quote · 28 Jul 2013

 

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.

 

7-27-2013 9-13-31 PM.png · 905K · 433 views
https://www.deanbassett.com
Quote · 28 Jul 2013

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?

Quote · 28 Jul 2013

Attached is my php file that generates my rss feed.

scores_mlb.php · 1.8K · 236 downloads
Quote · 28 Jul 2013

 

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
Quote · 28 Jul 2013

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.

Quote · 28 Jul 2013

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
Quote · 28 Jul 2013

 

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!
Quote · 28 Jul 2013

Why not just have it echo a blank since the publish date is not available?

Geeks, making the world a better place
Quote · 28 Jul 2013

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!

myrssfeed8.php · 10.9K · 251 downloads
Quote · 28 Jul 2013

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
Quote · 28 Jul 2013

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
Quote · 28 Jul 2013

 

Try this instead.

 You need a donate button on your site...

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 28 Jul 2013

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
Quote · 28 Jul 2013

 

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 Wink

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!
Quote · 28 Jul 2013

Thanks :)

https://www.deanbassett.com
Quote · 28 Jul 2013

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
Quote · 28 Jul 2013

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.
Quote · 28 Jul 2013

Thanks guys.

https://www.deanbassett.com
Quote · 28 Jul 2013

That's what I'm talking about...! Couldn't do it without you guy!!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 29 Jul 2013

Thanks Deano! No more ugly "Invalid Date" notices on my site. Much appreciated. PayPal Confirmation number: 81A62668AR079271F is from me.

 

Thanks again.

Quote · 29 Jul 2013

 

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.

Quote · 29 Jul 2013

 

 

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
Quote · 29 Jul 2013

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
Quote · 29 Jul 2013

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

Quote · 29 Jul 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.