Falang - Error 500 on translate.over Topic is solved

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
WolfMario
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Feb 16, 2019 8:03 pm

Falang - Error 500 on translate.over

Post by WolfMario » Sat Feb 16, 2019 9:09 pm

Hello, first of all let me explain this error.

I have a website on Joomla! 3.9.3 that uses Falang 3.0.2 for the translations.
The website has no issue when you switch languages at all, actually it works very fine.
The issue is when you are in the Administrator part, when you go to Components\FaLang\Translations and try to create a translation for an article it returns an error that the request cannot be processed HTTP ERROR 500.

I tried to catch the error on the logs and it says that the POST fails when trying to return the result for the translate.over

I also tried to reply this on my local environment but here works all fine and you can do any translation you want.

I want to know if anyone had the same trouble and can give me a hint on this.

Thank you!

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30934
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Falang - Error 500 on translate.over

Post by Per Yngve Berg » Sun Feb 17, 2019 8:45 am

Mod. Note: Relocated the topic to the Extensions Forum.

Enable Debug and Error Reporting in Global Configuration. See if you can catch the php error.

WolfMario
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Feb 16, 2019 8:03 pm

Re: Falang - Error 500 on translate.over

Post by WolfMario » Sun Feb 17, 2019 6:24 pm

I did what you tell me and I could find the exact error and fix it.
Now it's working well

Thank you very much!

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Falang - Error 500 on translate.over

Post by infograf768 » Mon Feb 18, 2019 2:56 pm

It may be useful for other users to explain what you did to solve the issue...
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

WolfMario
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Feb 16, 2019 8:03 pm

Re: Falang - Error 500 on translate.over

Post by WolfMario » Mon Feb 18, 2019 8:15 pm

Ok, after enabling Error Report and Debug on the administrator. When I tried to do the translation I got the following error message:

Fatal error: Can't use method return value in write context in /var/www/vhosts/mysite/httpdocs/administrator/components/com_falang/views/translate/tmpl/edit.php on line 28

The line in the code was the next one:

Code: Select all

if (!empty($params->get('translator')) && (!empty($params->get('translator_bingkey')) || !empty($params->get('translator_yandexkey')) ) ){
After doing some research about this it seems that the PHP version that we had on the host server is not fully compatible with some instructions that the file had at that moment, the way I solved it was creating new variables for the params like this:

Code: Select all

$translator = $params->get('translator');
$translator_bingkey = $params->get('translator_bingkey');
$translator_yandexkey = $params->get('translator_yandexkey');
if (!empty($translator) && (!empty($translator_bingkey) || !empty($translator_yandexkey) ) ){
After saving the file it worked without anny issue on the server.

For the record, the reason I couldn´t get this error on my local environment was that my oldest PHP version is above the one the server has.

Hope this can help someone one day.


Locked

Return to “Extensions for Joomla! 3.x”