List of errors, warnings, notices

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344571

Hi,

I list here the errors I encounter.
These are not blocking errors, but rather warnings when I activate the debug mode.

I managed to hide them by making some modifications.
So this is to warn you (if it's useful) before it becomes blocking at some point.

If I ever find other errors of this type, I'll add them here, but if you think it's better to give this information elsewhere, don't hesitate to let me know.

Warning: Undefined array key 1 in [...]/administrator/components/com_hikashop/classes/field.php on line 1371
My override :

Warning: Spoiler! [ Click to expand ]


Warning: Undefined array key 2 in [...]/administrator/components/com_hikashop/classes/field.php on line 1375
My override :
Warning: Spoiler! [ Click to expand ]

Last edit: 2 years 2 months ago by FDBI.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344572

Hi,

These warnings indicates that the data stored in the database for the values of your custom field is invalid.
Could you provide a screenshot of the settings of the corresponding custom field ?
Also, if you save the settings of the custom field once, it's likely to fix the warnings as HikaShop will properly process that data and resave it.

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344583

Hi,

I have probably two errors (the 2 lines) for each custom field (not one in particular).

This message contains confidential information

Last edit: 2 years 2 months ago by FDBI.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344584

Hi,

Did you try saving the custom fields once each ?
That should hopefully remove the warnings without having to change the code.
We'll however apply the changes on our end so that even if the value data is invalid, but still sufficient enough, it still works fine without the warnings.

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344621

Hi,

Did you try saving the custom fields once each ?

Yes, thank you, that does solve the problem for the main language (English)

For everything that is translated by Falang, even if you save it again it doesn't change anything.
So the error will be present on the French pages for example.

Do you know what I can do?

This message contains confidential information

Last edit: 2 years 2 months ago by FDBI. Reason: EDIT : I found a new warning

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344624

Hi,

I'm not familiar with Falang's interface. Deleting the translation and redoing it will probably work but it's a bit of work...
Anyways, we'll have these patches in the next version of HikaShop, so you can just keep them on your website and ignore the issue. I think that's the best. When you update your HikaShop, you'll have the patches already included so you won't have to bother with the issue anymore.

Regarding the new warning, I don't have the same code than you on line 347.
However, I suppose that the issue is with the line:

return $brand->category_name;
This means that you had set a brand in some products of the listing and you then deleted the brand without updating the product yet.
You can change it to
return @$brand->category_name;
to remove the warning. We'll look at adding a check there to avoid the warning in the future.

Last edit: 2 years 2 months ago by nicolas.
The following user(s) said Thank You: FDBI

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344635

Ok, it's perfect, thank you.

Concerning the new warning, it's gone with your fix. It's strange that we have different lines because I have never edit this file and I think I have the latest version.
But it's good.

Thanks a lot for your help.

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344767

Hi,

I come back with some warnings (non-blocking, non-urgent and I managed to hide them).
There are all related to Mondial Relay :

Displayed after an order using the shipping 'Mondial relay' and payment 'bank transfer' :

Warning: Undefined property: stdClass::$LgAdr2 in [...]/plugins/hikashopshipping/mondialrelay/mondialrelay.php on line 790
Warning: Undefined property: stdClass::$LgAdr4 in [...]/plugins/hikashopshipping/mondialrelay/mondialrelay.php on line 792

My changes :
Warning: Spoiler! [ Click to expand ]

Last edit: 2 years 2 months ago by FDBI.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344798

Hello,

Thank you for your feedback.
I wanted to add the code and I saw that these warnings were already handled since December 2018.

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.
Last edit: 2 years 2 months ago by Jerome.

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344846

Hi Jerome,

I may not have understood everything, but there are actually two parts of the code that look like this and are different in my version which seems to be dated 11/07/2022 :

l.430

			'addr2' => strtolower(trim(@$res->LgAdr2)),

l.787
			'addr2' => strtolower(trim($res->LgAdr2)),

I don't know if this is on purpose.

Last edit: 2 years 2 months ago by Jerome.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344861

Hello,

Yes, that's the purpose of the "@" in PHP.

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: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344877

Hi,

I'm perhaps not very clear but my error is related to the code in line 787 where the '@' is missing, not line 430 where the '@' is present.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344915

Hello,

Latest version now have the "@" everywhere.

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: FDBI

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
2 years 2 months ago #344926

Hi,

Indeed, it's good.

Thank you.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum