If this is your first visit, check our documentation. To post, register or login.
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Fatal Error when purchasing Gift Certificate

Fatal Error when purchasing Gift Certificate

Started by mvstudio on 18 Feb 2020, 4:45 PM · Views: 14,801

Results 21 to 30 of 30
19 Feb 2020, 12:29 AM
#21
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Fatal Error when purchasing Gift Certificate

this is a separate problem, and one where an error log would be generated... i do not really deal with GCs; so i am unfamiliar with how they get released.

have you gone to the gift certificate release queue page (gv_queue.php)? what do you see there? and are there any new log files?

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

19 Feb 2020, 3:59 AM
#22
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: Fatal Error when purchasing Gift Certificate

carlwhat:

this is a separate problem, and one where an error log would be generated... i do not really deal with GCs; so i am unfamiliar with how they get released.

have you gone to the gift certificate release queue page (gv_queue.php)? what do you see there? and are there any new log files?

Nothing appears on the gv_queue.php page and no log files for either the admin or the catalog.

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

19 Feb 2020, 4:09 AM
#23
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Fatal Error when purchasing Gift Certificate

Back on the original issue: isn't the issue here that with the product marked as do not collect the shipping address, that when the order is processed that a shipping address is not collected, which means that $shipping_address->EOF is true and then that $this->delivery['format_id'] is not set to 0 but instead is empty and that then when 'delivery_address_format_id' is attempted to be set from an empty value which in turn acts like an empty set of quotes instead of an integer? or is there some other process that has come to generate a 0 valued address_book_id such that $shipping_address actually has/should a record and the integer casting should address the situation? And wasn't there a test against the product/cart being virtual and if so to set some variables to prevent strict notices associated with the operation with that test incorporated into ZC 1.5.7?

Just seems like that all fits together with the database strictness to cause this issue to be seen.

BTW, please forgive me if something technical above is inaccurate, I've gotten distracted and can only seem to get to this on a mini screen at the moment which makes it terribly difficult to piece together a larger concept...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Feb 2020, 4:33 AM
#24
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: Fatal Error when purchasing Gift Certificate

mvstudio:

Nothing appears on the gv_queue.php page and no log files for either the admin or the catalog.

I was able to fix the issue of no gift certificate queue button. In the middle of changing settings I must have changed the settings for the gift certificate.
Queue Purchases and Show Queue in Admin header are now set to true and it finally works with the new patch.
Not that this solves the actual issue of why is misbehaving to start with, but at least it works for the time being until a more permanent fix is found.

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

19 Feb 2020, 4:37 AM
#25
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: Fatal Error when purchasing Gift Certificate

mc12345678:

Back on the original issue: isn't the issue here that with the product marked as do not collect the shipping address, that when the order is processed that a shipping address is not collected, which means that $shipping_address->EOF is true and then that $this->delivery['format_id'] is not set to 0 but instead is empty and that then when 'delivery_address_format_id' is attempted to be set from an empty value which in turn acts like an empty set of quotes instead of an integer? or is there some other process that has come to generate a 0 valued address_book_id such that $shipping_address actually has/should a record and the integer casting should address the situation? And wasn't there a test against the product/cart being virtual and if so to set some variables to prevent strict notices associated with the operation with that test incorporated into ZC 1.5.7?

Just seems like that all fits together with the database strictness to cause this issue to be seen.

BTW, please forgive me if something technical above is inaccurate, I've gotten distracted and can only seem to get to this on a mini screen at the moment which makes it terribly difficult to piece together a larger concept...

It seems that's the actual issue. The strictness of mysql which I have not even the most remote idea why is there, is the root of the problem.

The patch that Cindy provided didn't work, but the version of the patch that carlwhat provided did work in the end at least for now. I'm hoping my hosting provider won't complain about it! =D

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

19 Feb 2020, 12:43 PM
#26
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Fatal Error when purchasing Gift Certificate

mvstudio:

It seems that's the actual issue. The strictness of mysql which I have not even the most remote idea why is there, is the root of the problem.

The patch that Cindy provided didn't work, but the version of the patch that carlwhat provided did work in the end at least for now. I'm hoping my hosting provider won't complain about it! =D
Suggest following the "rabbit trail" at the following github issue which led to a code change incorporated into ZC 1.5.7 that is compatible with ZC 1.5.6:
https://github.com/zencart/zencart/issues/2426

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Feb 2020, 2:30 PM
#27
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: Fatal Error when purchasing Gift Certificate

mc12345678:

Suggest following the "rabbit trail" at the following github issue which led to a code change incorporated into ZC 1.5.7 that is compatible with ZC 1.5.6:
https://github.com/zencart/zencart/issues/2426

That's exactly the log files I've been getting. Thank you looking into it!!! This gives me reassurance it wasn't something I caused.
Before I manage to screw things up, would this be the change required? https://github.com/zencart/zencart/pull/2427/commits/25c9b9ff6035228236c09605a3886837a3572ad9

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

19 Feb 2020, 2:51 PM
#28
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Fatal Error when purchasing Gift Certificate

mvstudio:

That's exactly the log files I've been getting. Thank you looking into it!!! This gives me reassurance it wasn't something I caused.
Before I manage to screw things up, would this be the change required? https://github.com/zencart/zencart/pull/2427/commits/25c9b9ff6035228236c09605a3886837a3572ad9
Yes it would. Then after applying that, you could remove the "patch" applied earlier in this thread (at least for that issue). There may be other things in the code that would "benefit" from not operating in strict mode, but being in strict mode offers tighter control in an effort of maintaining security.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Feb 2020, 3:00 PM
#29
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: Fatal Error when purchasing Gift Certificate

mc12345678:

Yes it would. Then after applying that, you could remove the "patch" applied earlier in this thread (at least for that issue). There may be other things in the code that would "benefit" from not operating in strict mode, but being in strict mode offers tighter control in an effort of maintaining security.

Brilliant!!
I tested it and it works perfectly!
Thank you so, so much!!! Have an awesome day!

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

19 Feb 2020, 3:57 PM
#30
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Fatal Error when purchasing Gift Certificate

mvstudio:

Brilliant!!
I tested it and it works perfectly!
Thank you so, so much!!! Have an awesome day!
Welcome. As noted in the link and change, lat9 identified and suggested a correction for it.

I tested the operation yesterday (without the modification) with strict php but not strict database access and was able to "successfully" process the transaction, but had myDebug related files because of the strict php.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...