0 Call to a member function getFieldName() on null

  • Posts: 54
  • Thank you received: 0
7 years 5 months ago #270494

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 3.1.0
-- Joomla version -- : 3.7.2
-- PHP version -- : 7.0.13
-- Browser(s) name and version -- : firefox 53
-- Error-message(debug-mod must be tuned on) -- : 0 Call to a member function getFieldName() on null

Hi.
I downloaded the last version of hikashop and installed it with default sample data on a clean joomla. After clicking add to cart I receive an error message and the entire order form takes up the whole screen. In version 3.0.1 I had no such problems.

Attachments:
Last edit: 7 years 5 months ago by Wrosch.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #270498

Hello,

Can you please activate your debug mode in order to get the call stack ?
Thanks to that, we will be able to know from where the problem is coming from ; like that we can't know which file is incriminated and that function is used in a lot of views !
If you can also provide us your checkout workflow, it will be useful.

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: 54
  • Thank you received: 0
7 years 5 months ago #270522

Screens from debug mode.
Checkout workflow is also default.

Attachments:
Last edit: 7 years 5 months ago by Wrosch.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #270525

Hello,

In the file "administrator/components/com_hikashop/classes/field.php" please replace

		if(!class_exists($classType))
			return false;
By
		if(!class_exists($classType))
			return new hikashopFieldItem($this);
It should avoid the error when you're using a custom field which do not have a dedicated class.

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

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

  • Posts: 54
  • Thank you received: 0
7 years 5 months ago #270577

Hi.
Maybe i'm blind B), but in which line should be this code, because after searching the file 3 times I did not find such code.

Last edit: 7 years 5 months ago by Jerome.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 5 months ago #270579

Hi,

Right. The code to replace is:

if(!class_exists($classType))
			return $value;
You can find it on line 1579 of your file.

Let us know how it goes so that we can include the modification on our end.

The following user(s) said Thank You: Wrosch

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

  • Posts: 54
  • Thank you received: 0
7 years 5 months ago #270583

Yes. Now works perfectly. Thanks a lot.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 5 months ago #270584

Thanks. We'll include the fix on our end.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum