Invalid argument supplied: translation.php on 118

  • Posts: 39
  • Thank you received: 0
12 years 1 month ago #42115

I had the basic version of Hikashop installed and then bought the business edition. I uninstalled the old version and installed the business edition. When i go to the Add A Product page or on an existing product page (maybe others, i Haven't cheked everything yet) I get an error warning saying "Warning: Invalid argument supplied for foreach() in C:\wamp\www\fashion\administrator\components\com_hikashop\helpers\translation.php on line 118"

I also have Joomfish installed. Just thought I'd tell you in case you think it might be related to that since it's a translations file error.

Attachments:

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
12 years 1 month ago #42118

Hi,

That's a warning because you didn't configure any languages in JoomFish.
You can remove that by changing that line in that file to:
foreach(@$languages as $lg){

or by changing the "error reporting" option of joomla to production in the configuration of joomla if you're on 2.5.

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

  • Posts: 39
  • Thank you received: 0
12 years 1 month ago #42258

Forgive me if I'm just being stupid and missing something but I've gone over everything and as far as i can tell everything is set up correctly. I've attached 4 images to this which, as far as I'm aware, should cover everthing needed to make translations work but they don't.

You'll notice on the first image that I'm not even shown the language tabs at the top right of the add a product page that allow me to make a translation.

The second image shows that I have French installed on Joomfish.

The third shows the Hikashop content elements within Joomfish.

The fourth shows my language config within Hikashop.

I really don't know where I'm going wrong here. Have i missed a step?

Attachments:

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
12 years 1 month ago #42260

Which version of JoomFish and Joomla are you using ?

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

  • Posts: 39
  • Thank you received: 0
12 years 1 month ago #42261

Joomla 1.5.25 and Joomfish 2.2.3

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
12 years 1 month ago #42263

Is the joomfish database plugin published ?

When you say that it doesn't work, what do you mean by that ? Do you have an error message ? The front end does not display any translations ? Or you can't enter the translations ?

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

  • Posts: 39
  • Thank you received: 0
12 years 1 month ago #42265

If you mean jfdatabase, yes that it enabled.

What i mean is what you see in the image eglan1.jpg a few posts ago. There is no option (i.e. a tab with the French flag) on the "Add A Product" page to translate any content (like the ones seen in this image on your own documentation pages> http://www.hikashop.com/media/doc/product_form_main.png ) and also the orange error you can see above where the tabs should be.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
12 years 1 month ago #42279

We found that there were some differencies in the database structure with the new version of Joomfish that you're using.
Please replace the file administrator/components/com_hikashop/helpers/translation.php by the one in the archive enclosed and it should work better.

We'll include these modifications in next release of HikaShop.

Attachments:

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

  • Posts: 39
  • Thank you received: 0
12 years 1 month ago #42283

I've replaced the file however no language tabs are showing still and there are error messages on many more pages now (see attached, all errors point to the same fault)

Attachments:

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
12 years 1 month ago #42284

These new warnings are not really a problem. Here is a new version which fixes the warnings.

Also, please note that the tabs will appear only once you saved your product (or when you edit an existing one).

Attachments:

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

  • Posts: 39
  • Thank you received: 0
12 years 1 month ago #42285

Excellent. It's working now. Thanks very much for the support! :)

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

Time to create page: 0.084 seconds
Powered by Kunena Forum