Page 1 of 1
Database/Banner problem
Posted: Fri Dec 01, 2006 5:35 pm
by Prohest
Hi,
My Server is a: 4.0.24_Debian-10sarge2-log with MySQL 4.0.24
I added a catagori (nmap) to the banner menu uploaded 4 pics, and inserted this line in the page = {cms_module module='Banners' category="nmap"}. When i execute the page i get a: ERROR: Could not find category (no rows) Error: Database Error!
Can anybody help me here ?
Thanx in advance
Prohest
Re: Database/Banner problem
Posted: Fri Dec 01, 2006 9:00 pm
by Dr.CSS
(no rows) sounds like it never got installed, to make tables, have you installed other modules, how did you install this one...
Re: Database/Banner problem
Posted: Tue Jun 12, 2007 4:34 pm
by kevin360
I'm getting the same error, did you solve it?
I installed the module through the module manager, went into "Manage Banners" and created a category called Ads, then uploaded a test image through the file manager into the directory 'banners'. Created a banner in the "Banners" tab pointing to this image file and added
{cms_module module='Banners' category="Ads"}
to the content of one of my pages. The result is I get:
ERROR: Could not find category (no rows) Error: Database Error!
I can see the category in "Manage Banners" and the test banner is placed into this category (only one category). I'm running CMSMS 1.1rc2 and Banners 2.1.0
Re: Database/Banner problem
Posted: Tue Jun 12, 2007 9:42 pm
by kevin360
Well I've tracked the problem down to line 58 in action.default.php. It normally reads:
Code: Select all
$dbresult = $db->Execute( $q2, array( $params['category'] ) );
If I change that line to:
Code: Select all
$dbresult = $db->Execute( $q2, array('Ads') );
where I hardcode in the category name, then it pulls in the banner ad correctly.
[Solved] Re: Database/Banner problem
Posted: Tue Jun 12, 2007 11:52 pm
by kevin360
Ok I finally figured out what the problem was. When I first installed the module I went to it's help screen to learn how to use it. The portion you are supposed to put into your page I highlighted and copied (with FF). Then I went to the page where I wanted the module and pasted it in. The problem is it's pasted in and looks like this:
Code: Select all
{cms_module module='Banners' category=""}
But, what you don't realize unless you click on the source button is what you actually pasted in is:
Code: Select all
{cms_module module='Banners' category="<category>"}
For some reason that portion is in the help screen and gets copied over. When I typed in the name of my category (Ads) I actually ended up with:
Code: Select all
{cms_module module='Banners' category="Ads<category>"}
Thus when it tried to search the database it couldn't find anything matching "Ads". After removing out the extra bit it's working fine now.