Page 1 of 1

News Extension and full Adodb

Posted: Tue Apr 25, 2006 9:32 am
by pluk77
I have started to use the full adodb library instead of the lite version because of the G2Mod extension. It seems that the News extension is no longer working and is causing a fatal error. All the other pages are working fine.

Fatal error: Call to a member function on a non-object in /home/berteler/public_html/cmsmadesimple/modules/News/action.default.php on line 104

(by the way, if you get 'referal' errors after installing the full adodb lib than you might need to upgrade your Zend optimizer, but that is covered in an other topic..http://forum.cmsmadesimple.org/index.ph ... 976.0.html.)

Any clue waht could be the problem?

Marcel

Re: News Extension and full Adodb

Posted: Tue Apr 25, 2006 10:02 am
by Ted
Firstly, change line 104 to

Code: Select all

while ($dbresult && $row = $dbresult->FetchRow())
The other problem is that adodb has this weird date inconsistency that I've been struggling with since I started using it.  You can't use date it execute methods, which makes no sense.  So, I modify the drivers to get rid of the '' around the date.

So, say you're using the mysql driver.  Open up lib/adodb/drivers/adodb-mysql.inc and look for

Code: Select all

var $fmtTimeStamp = "'Y-m-d H:i:s'";
  Change it to

Code: Select all

var $fmtTimeStamp = "Y-m-d H:i:s";

Re: News Extension and full Adodb

Posted: Tue Apr 25, 2006 10:16 am
by pluk77
That fixes the problem  :) :)

Thanks. I posted a bug report as well under the CMSMS core. Will you update that bug report and/or port your fix?

Will this single changed line make it into the production version? Does it change the functionality of the news module when ado_lite is used?

Marcel

Re: News Extension and full Adodb

Posted: Tue Apr 25, 2006 10:34 am
by Ted
I'll update the bugs later on today.  The line 104 fix is in svn and will make it into 0.13.

Glad it's working!