Problems with News module
Problems with News module
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.
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
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.

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
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.
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
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
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.
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
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.

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
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
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
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
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: as opposed to:
But I'm not quite positive if that was it or not. Might be worth trying.
Code: Select all
array_push($params, rtrim(ltrim($db->DBTimeStamp($end_date), "'"), "'"));
Code: Select all
array_push($params, $db->DBTimeStamp($end_date));
Re: Problems with News module
mate, it worked! i bow in front of you! you helped me a loo..oot 
keep up the good work and keep rockin'

keep up the good work and keep rockin'

Re: Problems with News module
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), "'"), "'"));
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), "'"), "'"));