1
mpatten
MxDirectory-Coupon
  • 2009/2/27 16:44

  • mpatten

  • Just popping in

  • Posts: 13

  • Since: 2009/2/27


Hey Everyone-
I have XOOPS 2.3x and the MxDirectory with the hack changes posted in the forums. For whatever reason, when trying to access the coupons on the admin side, it'll load then forward to a blank page. If you are quick, and hit stop it'll allow you to add a new coupon. However the "current" coupons aren't visible on the front page. Any ideas why it's redirecting to a blank page as soon as it loads?

Errors:
Notice: Undefined variable: tblColors in file /modules/mxdirectory/admin/functions.php line 6

Sql Errors:
SELECT cat.title AS catTitle, l.title AS linkTitle, coup.couponid, coup.heading, coup.counter, l.lid, l.cid, l.address, l.address2, l.city, l.zip, l.state, l.country, l.phone, l.fax, l.email, l.url, l.logourl, coup.description, coup.image, coup.lbr, coup.publish, coup.expire FROM xe90_xdir_coupon coup, xe90_xdir_cat cat, xe90_xdir_links l WHERE cat.cid=l.cid AND coup.lid=l.lid AND
Error number: 1064
Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
Much Appreciated,

Morgan

2
mpatten
Re: MxDirectory-Coupon
  • 2009/3/3 15:45

  • mpatten

  • Just popping in

  • Posts: 13

  • Since: 2009/2/27


bump

3
zyspec
Re: MxDirectory-Coupon
  • 2009/3/3 23:27

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


without digging into it too deeply it looks like lines 191-194:
WHERE cat.cid=l.cid AND coup.lid=l.lid AND ';
if (isset($criteria) && is_subclass_of($criteria, '
criteriaelement')) {
            
    $sql .= ' '.$criteria->render();

there should be 2 single quotes (') separated by a space in the $sql .= line, these forums are eating the 2nd quote for some reason so I can't show you what it's suppose to look like...
should be:
WHERE cat.cid=l.cid AND coup.lid=l.lid ';
if (isset($criteria) && is_subclass_of($criteria, '
criteriaelement')) {
            
    $sql .= '
AND '.$criteria->render();

same thing here - there should be 2 single quotes (') separated by AND and a space in the $sql .= line, the forum ate the 2nd quote here too...

Let me know if this fixes the problem, I'll add it to the list for Tripmon (the module's author)

4
mpatten
Re: MxDirectory-Coupon
  • 2009/3/3 23:43

  • mpatten

  • Just popping in

  • Posts: 13

  • Since: 2009/2/27


Quote:

WHERE cat.cid=l.cid AND coup.lid=l.lid ';

if (isset($criteria) && is_subclass_of

($criteria, 'criteriaelement')) {

$sql .= ' ' AND $criteria->render();




File to edit /class/coupon.php *for those who need the fix*

Fixed it with that code. Thanks a bunch! Had an extra . in front of $criteria. Appreciate the help

5
zyspec
Re: MxDirectory-Coupon
  • 2009/3/4 0:30

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Great, glad this fixed it. Interestingly enough I'd apparently already found this but never reported it. When I went to look at my local copy of 'corrected' files it had already been changed.

Login

Who's Online

227 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 227


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits