Problems with News module

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Elpoca

Problems with News module

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Problems with News module

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

Problems with News module

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

Problems with News module

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Problems with News module

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Problems with News module

Post 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.
its me

Re: Problems with News module

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Problems with News module

Post 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.
its me

Re: Problems with News module

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Problems with News module

Post 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.
its me

Re: Problems with News module

Post 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' :)
vdjuric

Re: Problems with News module

Post 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), "'"), "'"));
Locked

Return to “[locked] Installation, Setup and Upgrade”