Problem with translations on my french website

  • Posts: 57
  • Thank you received: 6
  • Hikashop Business
5 days 1 hour ago #373150

-- url of the page with the problem -- : www.noelieceyralartstudio.com
-- HikaShop version -- : 6.5.2
-- Joomla version -- : 5.4.6
-- PHP version -- : 8.2
-- Browser(s) name and version -- : Firefox

Hello,

I was trying to add a salemethod entry for one of my page, and there was a problem while trying to save the translation. Now, my whole french website has lost all the translation and is in English (for the hikashop pages: oeuvres originales, tirages d'art, cartes cadeaux, évènements).

When I go to the products, the french translation is missing and some of the buttons for which I had changed the text is now only showing the translation key rather than the translation:

www.noelieceyralartstudio.com/index.php/...ose-the-exact-amount

www.noelieceyralartstudio.com/index.php/fr/noelie/evenements

Do you know what might have happened and if there may be a way to get the translation back? or do I need to use a backup to do that?

I am attaching an image of the message I'm getting when i'm trying to enter a translation

When I do language debug I get 5 errors with the /language/overrides/fr-FR.override.ini but I'm not sure what this is due to... Thank you![attachment=63399]

When I do language debug I get 5 errors with the /language/overrides/fr-FR.override.ini but I'm not sure what this is due to...

Thank you!

Attachments:
Last edit: 4 days 21 hours ago by Noe.

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

  • Posts: 57
  • Thank you received: 6
  • Hikashop Business
4 days 20 hours ago #373152

I've just sorted the issue. It seems that all translations are back now.
I removed the last translation from the french override document in hikashop/ configuration/ languages. This is the translation I was saving when the problem happened.
Just leaving this here in case this might help somebody in the future. I was about to use a back up to restore my site back to how it was before that manipulation, but that's a much easier solution...

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

  • Posts: 57
  • Thank you received: 6
  • Hikashop Business
4 days 20 hours ago #373153

Hello again,

I'm actually still having an issue with the salemethod fields in custom fields. I had created different fields to allow me to change the text from "each" to something else, but now it's showing "each"/ "l'unité" everywhere, even on the products where I had specified something else. I have tried to change the translation with the english or french flag, but it gives me the same message as in my previous message (the screen capture) . Do you know what can be done about it?

for example, on this page, it should say "par personne":

www.noelieceyralartstudio.com/index.php/...date-a-venir-bientot

Thank you!

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

  • Posts: 86081
  • Thank you received: 14189
  • MODERATOR
4 days 12 hours ago #373156

Hello,

Thank you for coming back with what you did to recover, it explains the shape of the problem.

Translations are stored as Joomla language override files, and those are ini files. If a single line in one of them cannot be read by PHP, the whole file is rejected, not just that line, so every translation it holds stops being applied at once. That is why your site went back to English in one go rather than losing a single string, and why removing the line you had just added brought everything back.

Your en-GB override file is still in that state, which is why you keep getting the message when you save a translation. To find the line: set Error Reporting to Development and activate the Debug language setting in the Joomla global configuration, then trigger the message again. PHP will name the line number of the file it cannot read. Also, at the bottom of pages, the debug system should provide information about problems in language files. Remove the line(s) with issues and saving translations should work again. Everything else in the file can stay, and nothing has to be translated again.

On our end, we've investigated potential culprits and made some changes in HikaShop to better handle edge cases. So I would recommend you to download the install package of the latest version of HikaShop on our website and installing it again on your website. It will add the patches for this and it might help.

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

  • Posts: 57
  • Thank you received: 6
  • Hikashop Business
2 days 23 hours ago #373162

Thank you! Though I'm still having problems with 2 custom fields:

1/ salemethod column (to change the text from "each" to something different) - No matter what is set on the product page, now it only shows "each"/ "l'unité" rather than the sale method chosen on the product page


As an example, this one should say "par personne" but says "l'unité": www.noelieceyralartstudio.com/index.php/...date-a-venir-bientot

2/ amount column (so that the customer can enter the amount they choose) - It is still possible to enter a different amount from the minimum amount, but when adding the product to the cart, it shows the minimum price and not the amount entered. Same on the checkout page.

www.noelieceyralartstudio.com/index.php/...ose-the-exact-amount

These 2 custom fields were working just fine before. I had also created another custom field for the
product_addtocart_message column (in order to change the add to cart message) and this one is working fine, so I'm not sure what is the problem with the 2 custom fields that are currently disfunctioning.

The problem with the translation appeared as I was entering and saving a translation for the salemethod column.

Do you konw what may be causing the problem with the custom fields and how to fix it? I haven't uploaded the new hikahsop version yet as I wasn't sure it was a good idea to do that until this current issue is sorted out.

Thank you!

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

  • Posts: 86081
  • Thank you received: 14189
  • MODERATOR
2 days 19 hours ago #373163

Hello,

These two are separate from the translation file problem.

For the sale method: on the page you linked, the price ends with

<span class="hikashop_product_price_per_unit"> l'unité</span>

and that is exactly what HikaShop's own listing_price.php outputs, we compared it with a clean 6.5.2. The modification from our FAQ replaces that whole span, so the file being used on your website does not carry the modification anymore. Please check it via the menu Display > Views: select the template of your website at the top of the page, then open the file product / listing_price.php. If the modification is gone from it, putting it back should bring your sale methods back.

Note that the next version adds a "Price unit label" setting directly on the product edit page. It replaces the " each" text for that product without touching any file, and you can enter the name of a translation there so that the label follows the language of the visitor. So you will be able to drop the custom field and the view modification entirely.

For the amount: we set up an item custom field with the column name "amount" on a clean HikaShop 6.5.2 and the amount entered is indeed the price used in the cart, so the mechanism still works in your version. Two things to check on your side:

- the plugin "System - Custom price" is enabled in the Joomla plugins manager
- its "Column name of the field" option still says amount

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

Time to create page: 0.215 seconds
Powered by Kunena Forum