Skip to main content

Language issue and Check database issue

2 weeks 6 days ago - 2 weeks 6 days ago #100000710 by Lumiga
-- HikaShop version -- : 6.8.2
-- Joomla version -- : 6.2.1
-- PHP version -- : 8.4
-- Browser(s) name and version -- :  Chrome 156.0
-- Error-message(debug-mod must be tuned on) -- : Language issues

Dear HikaShop team,

I have a language problem on one of our client websites that I unfortunately can't solve myself.
Also the "Check database" function also doesn't work on this website (it times out after 3–4 minutes). 
"Check database" times out on this site (9,817 customers, 11,995 orders), probably because the last step "Customer totals rebuilt" runs one query per customer (at least 20 ms each, so several minutes in total), and I can't set max_execution_time higher than 300 seconds on this hosting, so could this step please be done in batches?

What I have already tried for the language issue:

1. Compared the site with working HikaShop installations of other clients (same HikaShop build, same Joomla version).

2. Checked the en-GB 6.8.2 language file with PHP's ini parser: it loads without errors (5,176 strings).

3. Copied the language files from a working client site.

4. Reinstalled HikaShop 6.8.2 over the existing installation and reloaded the English language via Configuration > Languages.

5. Enabled Joomla language debug and compared both sites. On the working site, com_hikashop is loaded from /language/nl-NL/nl-NL.com_hikashop.ini. On this site the backend only looks in the four /administrator/ paths and never tries /language/, so all HikaShop texts show as ??KEYS??.

6. As a workaround I copied en-GB.com_hikashop.ini into /administrator/language/en-GB/. The backend is now in English again, but this is not a real solution: when the language file is updated, only /language/en-GB/en-GB.com_hikashop.ini is updated, not the copy in /administrator/language/en-GB/.

On another site with the same HikaShop and Joomla version, the backend works fine without /administrator/language/en-GB/en-GB.com_hikashop.ini, because it loads the file from /language/en-GB/. On this site the backend only looks in the /administrator/ paths (according to Joomla's language debug), so I don't know why these two sites behave differently.

7. The cron report still shows the raw key CRON_TRIGGERED instead of a translated text.



Also with the Dutch language I have the same issue on this webshop.

I really have no idea what else to try. Could you please take a look at this? I will send the login details by email.

Kind regards,
Lumiga

Kind regards,
Lumiga
Last edit: 2 weeks 6 days ago by Lumiga.

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

2 weeks 6 days ago #100000714 by nicolas
Hi,

The keys come from the way Joomla 4 and later start a request: they load the system plugins first and create the language of the request only afterwards. On your client's site, one of the installed system plugins loads HikaShop's helper as soon as it is created, so HikaShop loaded its language file into a language object that Joomla then replaced. The file was not loaded again after that, which is why Joomla's language debug only shows the four /administrator/ paths (the ones Joomla itself tries for the component) and why the cron report shows CRON_TRIGGERED (the cron runs at that early stage too). It affects every language, which is why Dutch shows the same thing. Your other client sites do not have that plugin, so they behave normally.

HikaShop now waits for Joomla's language before loading its texts, whatever plugin loads it early. This is fixed in the latest build of HikaShop 6.8.2: download it from your account on our website and install it over your current HikaShop (it has the same version number, so Joomla's updater will not offer it; your settings are kept).

After installing it, delete the copy you made, /administrator/language/en-GB/en-GB.com_hikashop.ini (and an nl-NL one if you made it too), so that the backend reads the file from /language/ again and follows its updates.

For Check database, you were right about the cause: the customer totals were calculated with one query per customer, and on some database servers each of those queries goes through all the order lines of the shop, so 20 to 30 ms per customer. The same build now calculates them for 500 customers at a time. On a test shop of the same size as yours (about 9,800 customers, 12,000 orders, 36,000 order lines), with the database set up to behave like yours, the calculation went from about 230 seconds to under a second, with the same totals for every customer. Changing an order's status, which updates its customer's totals, also uses the faster query.
The following user(s) said Thank You: Lumiga

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

Time to create page: 0.043 seconds
Powered by Kunena Forum