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.

This topic contains 5 replies, has 2 voices.

Last updated by Laura 2 years, 2 months ago.

Assigned support staff: Laura.

Author Posts
August 28, 2018 at 8:03 am #2681106

adamM-28

Hi,

I have recently installed, activated and added my site key to the WPML plugin within a website we're currently developing. We currently use Timber/Twig for our build, however it appears when I activated the WPML plugin, it is having a compatibility issue with Timber. I am receiving the following error:

Fatal error: Uncaught Twig_Error_Syntax: Unknown "set" tag. Did you mean "set"? in /home/torro/public_html/wp-content/plugins/sitepress-multilingual-cms/templates/warnings/plugins-status.twig:1 Stack trace: #0 /home/torro/public_html/wp-content/themes/mw-torro/vendor/twig/twig/lib/Twig/Parser.php(81): Twig_Parser->subparse(NULL, false) #1 /home/torro/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(692): Twig_Parser->parse(Object(Twig_TokenStream)) #2 /home/torro/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(750): Twig_Environment->parse(Object(Twig_TokenStream)) #3 /home/torro/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(447): Twig_Environment->compileSource(Object(Twig_Source)) #4 /home/torro/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(362): Twig_Environment->loadTemplate('plugins-status....') #5 /home/torro in /home/torro/public_html/wp-content/plugins/sitepress-multilingual-cms/templates/warnings/plugins-status.twig on line 1

I am unable to access wp-admin while this error exists so I have had to disable the plugin for the time being.

Is there something I can do resolve this issue? Any help would be most appreciated.

Thanks,
Adam

August 28, 2018 at 9:16 am #2681424

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

since you can't provide me with WPML debug, I'd ask you to check if WordPress and WPML are both updated, and to be sure you meet our minimum requirement, especially MySQL version and WP Memory Limit. See here: https://wpml.org/home/minimum-requirements/

Could you also try to disable all your plugin, switch to a default theme like TwentySeventeen and try to activate WPML again to see if it works? It could be a compatibility issue.

If you can't activate it, I'd ask you a copy of your site.

August 28, 2018 at 4:21 pm #2683518

adamM-28

Hi,

I can confirm that both WPML and WordPress are fully up to date while in development of this new website.

I did change the theme to a default wordpress theme and the problem no longer occurred, this is because in our custom theme we are using Timber. I was wanting to know if there is known issues with WPML and Timber? I noticed within the error I sent earlier, it mentioned twig files. Is it a case that our version of Timber/Twig is conflicting with that of WPML?

Appreciate the help!

Thanks,
Adam

August 28, 2018 at 4:44 pm #2683588

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi, if you are using a custom theme with Timber it's very likely this is the issue, even if Timber should be compatible with WPML
I may set up a testing site where you can upload your theme and see if we can reproduce the issue. What do you think?

August 30, 2018 at 8:39 am #2689065

adamM-28

Hi Laura,

Appreciate the help so far. We are unfortunately unable to provide a copy of the website. This is definitely a twig/timber conflict issue, you can see from the error that the plugin is trying to parse twig data with our theme's twig. It shouldn't have any communication with twig from our theme surely? I am especially convinced for this as when switching to a default theme or attempt to disable twig from our theme, the error no longer exists.

Is it possible that the WPML and our theme's twig versions are different? Could that cause an issue?

Thanks,
Adam

August 30, 2018 at 10:45 am #2689580

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi Adam,

you don't need to provide a copy of the site, I think we just need the theme if the issue is there. We use WPSandbox to create fresh installations of WordPress with WPML enabled. You only need to upload your theme in there (via the upload function or FTP) so we can test it and exclude other causes (like server issues, for example).

Anyway, yes, it could be an incompatibility with your theme's and our Twig version, that's why we need to test it. We use version 1.32.0, which one uses your theme?

The topic ‘[Closed] Timber compatibility issue.’ is closed to new replies.