Characteristic Error

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #159338

-- url of the page with the problem -- : www.lesswatts.co.za
-- HikaShop version -- : Business 2.3.1
-- Joomla version -- : 2.5.9
-- PHP version -- : 5.4.16
-- Browser(s) name and version -- : Google Chrom
-- Error-message(debug-mod must be tuned on) -- :
When trying to save the product after adding the characteristic I get the following message: Warning: Invalid argument supplied for foreach() in /home/<sitehome>/public_html/administrator/components/com_hikashop/classes/product.php on line 666.

On the front end I get the following error when opening the product that gave the problem: Warning: Creating default object from empty value in /home/<sitehome>/public_html/administrator/components/com_hikashop/classes/product.php on line 1336.

Could you please assist with this.

Regards

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 5 months ago #159380

Hi,

Can you please re-download HikaShop 2.3.1 ?
About the error in the line 666, I don't understand why you got this message regarding the call of the Joomla Array helper which assures that the variable is a good array (so can be used as argument for the foreach).
About the error on line 1336, I don't have the the same code in my local package, there is not object used only a "bracket" so I can't debug if the line you have is different than mine.

If the problem persist, can you please indicate the content of the line which generate you the error ?

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: 52
  • Thank you received: 0
10 years 5 months ago #159393

Hi,

I downloaded the package again, and manually copied the various files into the relevant directories. The problem persists. Included is the "products.php" file that is referred to in the error.

Attachments:

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #159449

Hi Jerome,

Any feedback on this yet?

Regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #159455

Hi,

These are just small warnings, not real errors. You can remove them by just setting the "error reporting" option of the Joomla configuration to "none" (and it is recommended to leave that option like that for live websites, for security reasons).

The warnings will be removed for next version of HikaShop, but you can use HikaShop with them, it's not a problem and as I said, you can hide them if you want.

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #160201

Ok, thanks. Here is now a new problem seemingly related to the problem we had with the characteristics. I decided to not use characteristics for now so that we can at least get the shop up and running.

The option "Display a contact button on the product page" is enabled, and it displays correctly. Yet, when I want to send a message using this button, the captcha is not displayed and when I try to submit the message, I get an error saying that the Captcha was incorrect.

Subsequint to this I enabled the debug mode to see if there were any errors, but now the entire site fails with the following error: 500 - JDatabaseMySQL::query: 1146 - Table 'lesswhkd_jo151.j16_hikashop_variant' doesn't exist SQL=SELECT variant_product_id FROM j16_hikashop_variant WHERE variant_product_id IN (11,426,430,432,434,435,449,451,525,526,528,529,530,531,532,533,534,602,603,604)

Regards

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #160221

Hi,

Progress update: I found that the J16_hikashop_variant table was missing for some reason. I recreated it according to the table definitions under the programming section, and everything is now working again.

Regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #160252

Hi,

Yes, that table should be there, otherwise HikaShop won't work properly.

For the captcha, do you still have the problem ? If the captcha is not displayed but that you get the error, it means that the recaptcha plugin is enabled and configured to display on the contact form, but that the contact form view has been customized with an override and thus the plugin doesn't find the correct HTML on the contact form to add the captcha HTML, but still checks that the captcha was entered before allowing the contact request.

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #160276

Hi Nicolas,

The Captcha is still problematic, but maybe we should move the discussion to another thread since this is regarding the characteristics.

As for the characteristics, it is working now, but whenever I save a product, another complete set of characteristics gets added - see the attached screenshot.

Regards

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #160278

Hi,

It's probably related to the fact that the variant table was missing.
Try again with the debug mode of the Joomla configuration turned on. Do you get some error ?
If you try with a new product, do you also have the problem ?

Yes, for the captcha, you should start a new thread. And pleas check the different points I raised about the issue (modification of the view, settings of the plugin).

The following user(s) said Thank You: icronje

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #160389

Hi,

When I turn Debug mode on I only get warning such as these: Strict Standards: Only variables should be assigned by reference in /home/lesswhkd/public_html/plugins/system/lpd/lpd.php on line 118.

The problem still occurs with a new product.

Regards

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #160826

Hi,

Still having trouble with the variants being added every time a product is saved. Any ideas what could be causing this?

Regards

Last edit: 10 years 5 months ago by icronje.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #160884

Hi,

We're not able to reproduce the problem. Please provide a backend access so that we can look at your settings and the issue.

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #160955

Nicolas,

I sent you the details in a PM.

Regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #161059

Hi,

I got the access. However, I'm not able to access the HikaShop configuration nor the joomla configuration. Could you make it a super admin in order to be able to heck on that ?

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #161206

Hi,

I granted you the access as requested.

Regards

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #161412

Hi,

I provided you the access as requested. Any feedback on this yet?

Regards

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #161466

Is there anybody here. I paid for this product and now there is no support!!!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #161472

Hi,

Please understand that our support team doesn't work on the weekend.
We're humans and answering as fast as we possibly can.

I checked your website backend queries and from what I can see, the problem is that the primary key on the columns variant_characteristic_id and variant_product_id has been removed from the table hikashop_variant in your database.
Because of that, the "replace" query that is done on that table duplicates the entries instead of replacing them when a product data is saved.
So it's not a bug but apparently that table has been tampered with in your database.

The best will be to drop the hikashop_variant table completely from the database via your phpmyadmin and add it back with that query that you can execute via your phpmyadmin too:

CREATE TABLE IF NOT EXISTS `j16_hikashop_variant` (
	`variant_characteristic_id` int(10) unsigned NOT NULL,
	`variant_product_id` int(10) unsigned NOT NULL,
	`ordering` int(10) unsigned NOT NULL DEFAULT '0',
	PRIMARY KEY (`variant_characteristic_id`,`variant_product_id`),
	KEY `variant_product_id` (`variant_product_id`)
) ENGINE=MyISAM
Then, you should not have that problem when adding characteristics to your products.

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

  • Posts: 52
  • Thank you received: 0
10 years 5 months ago #161518

Hi Nicolas,

Thanks for the reply. I do understand the constraints that there might be, but you need to realise that you are working with an international audience covering various time zones and that the reply on which I did not receive feedback was posted before the weekend (local time).

In any event. I will look at the table and follow your instructions. I will feedback soon.

Regards

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

Time to create page: 0.093 seconds
Powered by Kunena Forum