Posted on 25th July 2019 in Tutorials by Content Team

Lingotek 1.4.3 Type E Parse error

This is a brief post on how to fix type E_PARSE error on Lingotek Version 1.4.3 on WordPress 5.2.2.

We had a call from a client who had been struggling to use the Lingotek plugin (with Polylang) on WordPress and wasn’t making any headway.

We asked for a description of the problem, how to replicate it and their wordpress & server login which they gave.

Lingotek 1.4.3 Type E Parse error

We got the the page on the plugin indicated and clicked the “Connect Your Account” button and were met with the following page:

This caused an error mail to be sent containing the following error:

Error Details
=============
An error of type E_PARSE was caused in line 578 of the file /home/websitename/public_html/wp-content/plugins/lingotek-translation/include/api.php. Error message: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ']'

This immediately pointed out the cause of the error!

We immediately logged into to the file manager and opened the api.php file in /public_html/wp-content/plugins/lingotek-translation/include/

Scrolling down to Line 578 was the following line

$this->log_error_on_response_failure($response, "DeleteTranslation: Error occurred", ['id' -> $id, 'wordpress_id' => $wp_id]);

At the point, 'id' -> $id, we simply changed the code to 'id' => $id, and saved the api.php file.

Going back to the wordpress Admin, we once again tried connecting the plugin and it immediately redirected to the page to create a Lingotek account.

So simply, that’s how to fix type E_PARSE error on Lingotek Version 1.4.3 which would not allow the website owner connect their wordpress website to lingotek.

The current version of Lingotek on the wordpress repository is 1.4.3 which was updated recently and they have been informed of this issue. Hopefully they update soon with a fix.

 

You can always Contact Us with your Website/IT problems and also if you need Web Hosting or Microsoft Licenses and be sure that we would have you covered!

 

Peter (Target ICT).

2 responses to “How to fix type E_PARSE error on Lingotek Version 1.4.3”

  1. Vintage House Restaurant says:

    Heya! I just wanted to ask if you ever have any issues with
    hackers? My last blog (wordpress) was hacked and I ended up losing
    a few months of hard work due to no backup. Do you have any solutions to
    prevent hackers?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.