Coupon code lost unless checked out immediately

More
7 years 2 months ago #37105 by loppis
Hi, thanks :). I tested and it still gives me error 404 due to modsecurity... I'll check with my server guy if we can disable modsecurity for now.

The coupon is created correctly it seems and if I go back after the 404 error and enter the coupon again everything works fine.

I'll try to test without modsecurity and I'll get back to you with the results :)

Cheers

Peter

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #37111 by loppis
OK, I figured since the coupon actually is created properly, perhaps there is an issue "further down" that causes modsecurity to go bananas... :)

and yep, once I removed this code (line 239 - 245)
Code:
$coupon_id = $db->insertid(); $q ="INSERT INTO #__awocoupon_user ( coupon_id, user_id ) VALUES ( '".$coupon_id."' , '".JFactory::getUser()->id."' "; $db->setQuery($q); $db->execute();

Still don't know what it's there that modsecurity doesn't like and I suppose by removing it the coupon will no longer be personal but I can live with that for right now :).

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #37115 by nordmograph
Very Weird.
I'd be curious to know if the 1st line
$coupon_id = $db->insertid();
is responsible or the other followng query.
If you're at trying, let me kow :)

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

Time to create page: 0.332 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.