Categorie description empty when backend language is not English

  • Posts: 290
  • Thank you received: 22
1 year 2 months ago #348496

-- HikaShop version -- : 4.7.0
-- Joomla version -- : 4.2.6
-- PHP version -- : 8.1

Hi,
I noticed today that a client could not edit the category description of a multi lingual site.
When he clicked the country flag (Dutch in my case) the editor contained no data. That is strange because when I edited the same category for the same language it had data in it.

After some testing and experimenting I found that changing the backend language from default Dutch to English it suddenly worked again.

I hope you can verify this and tell me if it's a bug or a feature :)

Thanks,
Nico

Last edit: 1 year 2 months ago by nico.van.leeuwen. Reason: solved

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

  • Posts: 81478
  • Thank you received: 13061
  • MODERATOR
1 year 2 months ago #348501

Hi,

We can't reproduce the problem. So we're probably missing some information on the specifics of the situation.
Are you able to reproduce the problem with several categories or only one ?
Do you have text in the main description editor of the category ? And it displays fine in the editor ? It's the english text ?
And then, you have the text translated in dutch in the dutch popup right ?
It displays fine in both languages on the frontend ?

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

  • Posts: 290
  • Thank you received: 22
1 year 2 months ago #348813

Hi,
Sorry about the delay.

Yes I reproduce it in different categories.

I start by adding a short description in the main part of the editor. Then Save the article before I add a description in the fields via the flag icons.
After coming back in the categorie and going to the popup again the field is empty.

I noticed this error message in the console :
Uncaught TypeError: can't access property "children", headerItemsArea is null
<anonymous> xx.yy.nl/media/templates/administrator/a...bc2b53f469db8b6ff4:1

Not sure if this has anything todo with the strange behaviour.

And it's on a dev site so no problem if you want to have a look.

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

  • Posts: 81478
  • Thank you received: 13061
  • MODERATOR
1 year 2 months ago #348817

Hi,

Yes, please provide an access so that we can check things out. If you could also provide a FTP access, that would be great.
And, you confirm that you only have the issue when the current language of the backend is not English ?

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

  • Posts: 290
  • Thank you received: 22
1 year 2 months ago #348826

Hi,

I've send the credentials by mail.

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

  • Posts: 81478
  • Thank you received: 13061
  • MODERATOR
1 year 2 months ago #348836

Hi,

Thank you for the accesses. I was able to do some debugging and found the problem.
It came from a double translation. The translation for the category's main description was done both while the category data was loaded in the popup, and when the translation mechanism run, while it should only be when the translation mechanism run.
So I've made a patch which fixes that problem.
The fix is actually quite simple. You just need to change the line:

$element = $class->get($category_id);
to:
$element = $class->get($category_id, false, false);
in the file administrator/components/com_hikashop/views/category/view.html.php
I've added the patch on our end too so to get the patch automatically, you can just update to HikaShop 4.7.1.

The following user(s) said Thank You: nico.van.leeuwen

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

Time to create page: 0.060 seconds
Powered by Kunena Forum