Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 6 replies, has 3 voices.

Last updated by Riffaz 1 year, 3 months ago.

Assigned support staff: Riffaz.

Author Posts
April 16, 2019 at 8:25 am #3619689

Nicolas Junod

Hello, I have a conflict that appears since yesterday when trying to log to Shield Pro dashboard.

Their plugin support replied :

---

This looks like a problem with the "sitepress multilingual" plugin. They appear to include their Twig library without checking that the classes already exist or have already been declared.

There are 2 points to note here that you will need to relay to them:

1) Check for the existence of a pre-existing twig library before including the library themselves. - hint to check for php 5.3+ and use an autoloader.
2) Don't try to include the library on all WP admin pages or when it's not actually used or required. Include as and when it's necessary.

Sorry for the trouble here with this. Shield doesn't have this problem because it includes the library in a careful manner, but that doesn't mean that other plugins will be as careful.

---

Is there any setting that I can apply to avoid this conflict ? Any solution ?

Looking forward to your reply,

Best regards,
Nick

April 16, 2019 at 10:03 am #3620803

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

I escalated this to 2nd tier support.
Please be patient till we get back to you.

Regards,
Riffaz.

April 18, 2019 at 10:24 am #3638253

Pieter

Any idea on how long this is going to take?

Basically any site that uses Twig (in another place than WPML) AND has included the library in the proper way is punished now, because of the way that WPML declares it (by not checking whether it already exists).

It would be very disappointing if this matter is not handled with some urgency!

April 18, 2019 at 11:13 am #3638693

Pieter

In the meantime the developer of the Shield plugin also looked into the matter and he has made the following information available:

I managed to get hold of a copy of WPML from another client and I’ve investigated their code. So it turns out WPML is not including their code badly, even though the error suggests this. So that’s my bad, so firstly I apologise for saying such when it turns out they weren’t. The problem is a bug with TWIG in this old version:

1. This is a bug with an older version of TWIG. They’re using v1.32.0 dating back to 2017-02

2. Bug reference:
hidden link

3. This is fixed in 1.34.4+. If they update their Twig library to this version, it’ll fix the problem.

Thanks!

April 19, 2019 at 7:18 am #3643801

Nicolas Junod

Thanks for supporting my ticket Pieter. 3 days after escalating to 2nd tier support, 24 hours since the solution was given and still no update from WPML ? The fix seems easy enough for WPML to at least acknowledge it and give us an estimate on an updated release ....

April 19, 2019 at 12:11 pm #3645609

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

We are quite loaded here with some latest updates.

Our senior developers are looking into this.
Most probably you will get an update gain regarding this after Monday.

Regards,

May 5, 2019 at 6:16 am #3741809

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

We are going to update twig soon.
We keep this version of Twig because of backward compatibility with older PHP versions.
This will probably happen in WPML 4.3.0 and we do not have a ETA yet for this.

The plugin you are using 'Shield pro' that uses twig ver 1.34 or above.
That version does not support PHP 5.2 and WPML still support that as noted above.
So for the users who sre using still older version of PHP still can use the WPML.

I'll update to you again when we have anther update regarding this.

Regards,
Riffaz.