Catchable fatal error at checkout step1

  • Posts: 79
  • Thank you received: 0
10 years 1 month ago #199491

-- url of the page with the problem -- : www.bapteme.air.tousenvol.com
-- HikaShop version -- : 3.4.1
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.6
-- Error-message(debug-mod must be tuned on) -- : Catchable fatal error: Object of class stdClass could not be converted to string in /homepages/31/d529471058/htdocs/BAPTEME_AIR_TOUSENVOL/administrator/components/com_hikashop/classes/field.php on line 718

Hello

Hikashop returns an error ( Catchable fatal error ) when a customer checks-out ( happens at checkout step1 )
Error comes up when customer submits his address / tries to create an account or attempts to log-in.

Would you please assist me ?
Many thanks,

Last edit: 10 years 1 month ago by lcoulon.

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

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
10 years 1 month ago #199494

Hi,

Could you first confirm that you have that code on the line 718 of the file administrator/components/com_hikashop/classes/field.php :
$value = implode(',',$value);
If so, could you change it to:
try{ $value = implode(',',$value); }catch(Exception $e){ var_dump($type); var_dump($data); var_dump($fields); exit; }

and try again ?
That should display instead debug data which will allow us to understand what's going on.

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

  • Posts: 79
  • Thank you received: 0
10 years 1 month ago #199530

Yes line 718 is :

$value = implode(',',$value);

I did not change anything, i did another checkout try again and it finaly went through without any changes.

I can't explain why it was stuck before, i'm going to perform further tests

Last edit: 10 years 1 month ago by lcoulon.

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

  • Posts: 79
  • Thank you received: 0
10 years 1 month ago #199536

For unknown reasons, checkout works fine now.

However, Hikaserial is no longer able to generate a random serial, it no longer attach by email a generated JPEG file to customer.

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 1 month ago #199538

Hi,

Please let the patch that Nicolas gave you. In case when the issue will re-happen ; it should display useful information about the data HikaShop is trying to process.
Thanks to that, we will be able to understand from where the incorrect data is coming from and so, we will be able to make a good patch.

I made different test but I couldn't reproduce the issue.
I don't know if it is linked to a product ; if you need to login or to create a new account ; if you need to fill a specific custom field or not fill.. (even if it's link to the custom field because the error show up there)

About the HikaSerial issue ; the best will be to create a new thread in the HikaSerial section (or use one of your previous hikaserial thread) so I could get there more details about your current configuration and understand why the serial are no more generated.
An admin access might be required but in the first time, some information about your configuration and a sample order would be a good start.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 59
  • Thank you received: 0
9 years 11 months ago #203128

Hi,

I have the same problem.
I tried to insert your code and this is the error I see:
Parse error: syntax error, unexpected 'catch' (T_CATCH)

If I use original code I see the same error of other user.
By refreshing it does not appear but for first time yes.

If I remove login in checkout step, error does not appear.
I need login on this step (1), how can I solve it?

Thank you

Last edit: 9 years 11 months ago by simonev.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #203132

Hi,

Please add the code:

foreach($value as $c => $v){
	if(!is_numeric($v) || !is_string($v)) $value[$c] = '';
}
Just before the code:
$value = implode(',',$value);

That should fix this issue, this is already present in our code for the next release.

Last edit: 9 years 11 months ago by Mohamed Thelji.
The following user(s) said Thank You: simonev

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

  • Posts: 59
  • Thank you received: 0
9 years 11 months ago #203203

Thank you so much!! ;)

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

  • Posts: 59
  • Thank you received: 0
9 years 11 months ago #203326

Hi,

I see that adding your code the problem of fatal error is solved but it make another kind of problem in my site.
I have some custom fields in product table which appear in product pages.
There are some text fields and one checkbox field.
If I update the value of a text field in product page it's everything ok, but if I update checkbox field (by check/uncheck) it doesn't save the update. (Joomla says successfully saved but is not true!)

My actual solution is to remove your code, update fields and then add it again.
Is there a better way to do it?

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
9 years 11 months ago #203328

Hi,

I'm not able to reproduce the issue but I don't think that I'm performing the same action.
Would it be possible to have some kind of step by step description with maybe a little screenshot ?
It will help us to reproduce the issue and find a better fix for the previous patch.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
9 years 11 months ago #203363

Hi,

On the second though, please use instead:

foreach($value as $c => $v){
	if(is_array($v) || is_object($v)) $value[$c] = '';
}

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: simonev

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

  • Posts: 59
  • Thank you received: 0
9 years 11 months ago #203368

Wonderful, now everything works!
Thanks a lot!

Do you still need description to reproduce my ex issue?

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
9 years 11 months ago #203370

Hi,

It will be good.

Thanks


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 59
  • Thank you received: 0
9 years 11 months ago #203414

In attachement you can find list of product custom fields, the checkbox field settings and the product page setting where I was unable to update checkbox value.
As I said I was unable to update checkbox value going in product page setting and checking or unchecking the box. (with your old code)
Before edited there were no problem and now with new code is everything ok.
So step can be:
1- Create (checkbox) custom field for table product
2- Update product page by checking it and save
3- Put first version of your code in field.php
4- Try to update checkbox value in product page and save (it doesn't save)

If you need more specific information just tell me.
(one custom field, prodotto_testo, is hidden in product page with css)
Regards,

Attachments:

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
9 years 11 months ago #203473

Hi,

Thanks !
We will add it in our test cases :)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.104 seconds
Powered by Kunena Forum