Page 1 of 1

Problems with News module

Posted: Tue Dec 14, 2004 2:10 am
by Elpoca
Hi:

I'm having a couple small problems with the News module. I'd appreciate any suggestions/fixes you can offer!

1. Whenever I edit an existing news item, the post date is changed to 0000-00-00 00:00:00. I can't get it to stay on the date that I enter.
2. In IE, on the home page, the news items don't appear. Only little boxes do.

The second problem has already appeared on this forum, but to be honest, I didn't understand the fix.....

By the way, I just have to say that CMS Made Simple absolutely rocks. Now I only regret spending 3 days trying out about 15 other CMSs...

Thanks.

Problems with News module

Posted: Tue Dec 14, 2004 2:33 am
by Ted
I'm glad you like it. We try. :)

1. What database are you using? If mysql, what version? The database date checking code is almost entirely database driver related, so it's raising a red flag.

2. The items in news have a tag around them. This was part of a bunch of patches submitted by a user, and since I use Firefox almost exclusively, I didn't notice it to be a problem. This will be fixed in the next release, or you can easily find and replace out the and tags from modules/News/modulefunctions.php.

Problems with News module

Posted: Tue Jan 18, 2005 11:37 pm
by lisalisa
I am having the same issue (#1). When I edit an existing news item, the post date and end date both get changed to 0000-00-00 00:00:00. I've tried to manually modify the dates back to what they were, but the change doesn't stay. Also, the "Expiry" drop down box becomes grayed out.

After editing the news item (and losing the dates), the edited item no longer shows up on my content page (other news items that I haven't edited still show up). The only way I've been able to get it to show up again is to delete the edited item and recreate it new.

I have experienced this problem using Firefox 1.0, IE 6.0 and Safari 1.2. I am using mysql 4.1.8a. However, since I am not using mysqli, when I did the initial configuration of CMS Made Simple, I selected 4.0 as the mysql version.

Thanks for any help you can offer.

Problems with News module

Posted: Fri Jan 21, 2005 1:42 pm
by lisalisa
Thanks for the advice. Unfortunately, I have some non-technical users, so having them edit the database directly isn't really an option for me.

Problems with News module

Posted: Fri Jan 21, 2005 1:55 pm
by Ted
Pat,

When you get home, can we do some debugging on this? I want to compare database schemas and see what's different between a new install and an upgraded one.

Thanks.

Problems with News module

Posted: Fri Jan 21, 2005 3:37 pm
by Ted
Sure, I'll be up that early on a Saturday. Just wait for me. ;)

I'll catch up with you over the weekend. They're forecasting a lot of snow here, so I'm not planning on leaving the house anyway. :)

Thanks.

Re: Problems with News module

Posted: Fri Mar 04, 2005 3:46 pm
by its me
so, are there any results for the bug fix? i'm still using 0.8.2 version, and the editing of a news content results me a 0000-00-00 00:00:00.

Re: Problems with News module

Posted: Fri Mar 04, 2005 4:15 pm
by Ted
There were no fixes done to the old News module after 0.8.2 came out.  This bug was corrected after the News module was rewritten for 0.9 and above.

Re: Problems with News module

Posted: Fri Mar 04, 2005 4:21 pm
by its me
have you at least found out what was causing the problem? mysql version, apache version, linux? i know it's time to upgrade to 0.9+ but there are still some good modules absent in the new version.

Re: Problems with News module

Posted: Fri Mar 04, 2005 4:41 pm
by Ted
I believe it was something to do with it trying to quote (or unquote) timestamps at the wrong point.  I believe the fix for that was something along the lines of:

Code: Select all

array_push($params, rtrim(ltrim($db->DBTimeStamp($end_date), "'"), "'"));
as opposed to:

Code: Select all

array_push($params, $db->DBTimeStamp($end_date));
But I'm not quite positive if that was it or not.  Might be worth trying.

Re: Problems with News module

Posted: Fri Mar 04, 2005 4:53 pm
by its me
mate, it worked!  i bow in front of you! you helped me a loo..oot :)

keep up the good work and keep rockin' :)

Re: Problems with News module

Posted: Tue Sep 05, 2006 5:09 pm
by vdjuric
Details about " 0000-00-00 news edit problem" in versions 0.8.2  and lower

In directory modules/news/ find file adminform.php

Find in whole file
array_push($params, $db->DBTimeStamp($end_date));
and replace with
array_push($params, rtrim(ltrim($db->DBTimeStamp($end_date), "'"), "'"));

then find
array_push($params, $db->DBTimeStamp($start_date));
and replace with
array_push($params, rtrim(ltrim($db->DBTimeStamp($start_date), "'"), "'"));

then find
array_push($params, $db->DBTimeStamp($post_date));
and replace with
array_push($params, rtrim(ltrim($db->DBTimeStamp($post_date), "'"), "'"));