- Posts: 86
- Thank you received: 5
Problem with multilanguage categories
-- Joomla version -- : 3.10.4
-- PHP version -- : 7.4
Hi, I am having a problem with setting up multilanguage categories in Hikashop starter: when I put a language string (like SHOP_MY_CAT) as the name of a category, the string is translated into the backend language and saved, so it looses the possibility of being translated with the native Joomla language override.
Is it a bug or should I do that differently?
thanks a lot
Giuse
Please Log in or Create an account to join the conversation.
What do you mean exactly by "the string is translated into the backend language and saved" ?
Havign a translation key in the name of a product / category and then using a translation override to provide a different text for each language is what I would recommend doing.
It seems that it is what you're doing so I don't see why you say that "it looses the possibility of being translated with the native Joomla language override"
I guess I'm missing something here to understand your problematic.
Please Log in or Create an account to join the conversation.
thanks a lot!
cheers
Giuse
Please Log in or Create an account to join the conversation.
No, I understood what you wrote, but I'm not able to reproduce the issue.
I suppose that your problem is different. The issue I think is that when you edit a category, the name and description displayed in the input fields are the translated ones instead of the original ones. I was able to reproduce that issue.
I've made a patch for this on our end.
Download the install package of HikaShop on our website and install it on yours and you'll get the patch.
Please Log in or Create an account to join the conversation.
If you need a test site with the case, I have one.
thanks
Giuse
Please Log in or Create an account to join the conversation.
I think that it is probably linked with the alias of the category and not the name.
What did you configure for it ? Did you enter a translation for the alias ? Is the alias different from the name ?
Please Log in or Create an account to join the conversation.
The alias has translations in the various language and infact the URL shows correctly translated but actually clicking on it, you don't enter into the category. Yes, the category alias is different (typically shorter) than the category name.
hi
Giuse
Please Log in or Create an account to join the conversation.
Could you provide a complete example with the generated URLs and screenshots of the settings of the category and the translations so that we can reproduce the issue locally in order to understand the situation and fix it ?
Please Log in or Create an account to join the conversation.
site with 2 languages (no Falang, just vanilla Joomla multilanguage)
Product Category hierarchy: root / Type of Product / Second-hand market
Product Category name for "Second hand market" = SHOP_CAT_USED_NAME
Product Category alias for "Second hand market" = SHOP_CAT_USED_ALIAS
Language overrides:
SHOP_CAT_USED_ALIAS = second-hand
SHOP_CAT_USED_NAME = Second-hand Quality Market
.
Menu items: just one "Shop" as category listing (URL: index.php?option=com_hikashop&view=category&layout=listing)
Problem in the front-end:
-) you go to the Shop and there is a link for "Second-hand market" category with URL "<site>/en/shop/category/second-hand"
-) clicking on that link reloads current page and does not enter into category.
cheers
Please Log in or Create an account to join the conversation.
I'm not able to reproduce the problem on my end. The link is index.php/en/hikashop-menu-for-categories-listing/category/second-hand on my test website and it works fine when I try the same setup.
So there must be something else I'm missing.
I'll need a backend and a FTP access to your test website to check the situation directly there then.
Can you provide this via our contact form ?
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thank you for the access.
I tried to look into it but while I can log on your backend and access some components and Joomla, whenever I try to access HikaShop, I get an error:
i.imgur.com/fcdPjfg.png
And I can't access the frontend at all:
i.imgur.com/lHiLRMR.png
Also, you didn't provide a FTP access so I won't be able to debug the issue even if I can see it there.
Please Log in or Create an account to join the conversation.
I also sent you the ftp access
thanks
Giuse
Please Log in or Create an account to join the conversation.
You would have to check the PHP error log of your server. There, the corresponding "fatal error" message should be logged with the reason of the error and the line number and file path where it happened. That would allow us to understand why this is happening and tell you what to do.
Regarding the FTP access, I got it, however you only provided the username and password, not the host, so I don't know how to connect to it.
Could you provide the host too please ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
[10-Feb-2022 16:04:34] WARNING: [pool www] child 1067 exited on signal 11 (SIGSEGV) after 59917.442426 seconds from start
[10-Feb-2022 16:04:34] NOTICE: [pool www] child 4863 started
so nothing that can help. I'm quite sure that reinstalling again Hika Shop temporary solves the problem, but I've not done yet since I gave you access to the test site for the multilanguage problem, but let me know if you want me to do something. thanks
Giuse
Please Log in or Create an account to join the conversation.
Thanks, I was able to access the FTP.
However, I had again the 500 error, which prevented me from looking into the issue.
So first, it would be great to find a solution to that 500 error.
The log you provided is from the apache server log, not the PHP error log. Could you please look into the PHP error log instead ?
If you don't know how, please check with your hosting support.
Please Log in or Create an account to join the conversation.
The php-fpm/www-error.log indicates the following
i.e. the PHP process is requesting more than 128 MB (even 151 GB!!!). That line is the closing line of hikashop_loadTranslationFile, after
Please Log in or Create an account to join the conversation.
That's the error I needed, thanks !
So the issue is not with the loading of that translation file.
It's just that when that translation file was loaded that one time, it hit the memory limit set in your php.ini
But the error could happen anywhere where things need to be loaded in memory.
While 128MB is a lot, you have a lot of extensions on your website.
Increase the "memory_limit" parameter of your php.ini from 128M to 256M and it should fix the problem.
Now I'm not sure why you say "even 151 GB!!!" ?
If you mean that even if you increase the memory to 256M you still have the same issue with the memory_limit being hit, then it means that there is a loop in the code for some reason. In that case, I might be able to debug it with the FTP access you provided. However, it would be a lot easier if the PHP error could be displayed directly on the page. Maybe the fatal error doesn't always happen in that place pointed by the error message you provided, and I will be adding debug at the wrong place.
Please Log in or Create an account to join the conversation.
thanks and let me know if you need something else
cheers
Giuse
Please Log in or Create an account to join the conversation.