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 7 replies, has 2 voices.

Last updated by Pascal 2 years, 1 month ago.

Assigned support staff: Noman.

Author Posts
September 26, 2017 at 7:14 am #1383070

Pascal

Greetings:

After upgrading to Multilingual CMS 3.8.1, I see a white screen instead of the admin dashboard. After some experimenting, if I disable the NextGEN Gallery plugin (via FTP), I get the following error message:

Fatal error: Uncaught TypeError: Argument 1 passed to Twig_Environment::compile() must be an instance of Twig_NodeInterface, instance of Twig_Node_Module given, called in /home/clients/zzz/web/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php on line 750 and defined in /home/clients/zzz/web/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php:723 Stack trace: #0 /home/clients/zzz/web/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(750): Twig_Environment->compile(Object(Twig_Node_Module)) #1 /home/clients/zzz/web/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(447): Twig_Environment->compileSource(Object(Twig_Source)) #2 /home/clients/zzz/web/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(3 in /home/clients/zzz/web/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php on line 723

The public site (i.e. not logged in) appears to be working fine.

Thanks in advance,

Jim

September 26, 2017 at 9:53 am #1383314

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Pascal

Thank you for contacting WPML Support. We have another user who was able to solve the same issue like this (Summary at top):
https://wpml.org/forums/topic/configuration-of-wpml-isnt-possible-blank-screen/

If issue still persists, please add the debug report in the Debug Information box and not paste it in the message box directly. I have also enabled debug info box for your next reply: https://toolset.com/faq/provide-debug-information-faster-support/

Please also make sure that your site meets with minimum requirements for WPML: https://wpml.org/home/minimum-requirements/

Thank you

September 26, 2017 at 5:06 pm #1383990

Pascal

Hi Noman:

Thanks for your reply. The problem you refer to is not the problem I am having.

- Our server is running PHP7.
- As soon as I press the "Log In" button I only get a white screen; I never see the admin dashboard so I cannot give you debug info.
- We meet the minimum requirements. We have been using WPML for years. The problem started with 3.8.1.

I have just found 3.8.2 and installed that, but the problem remains on the live site.

Strangely, when I upgrade to 3.8.2 on my development server, I can see the admin dashboard, but when I go to the WPML > Support page I see this error at the bottom:

Fatal error: Uncaught Twig_Error_Syntax: Unknown "for" tag. Did you mean "for"? in /var/www/html/wp/lads3/wp-content/plugins/sitepress-multilingual-cms/templates/support/info/main.twig:4 Stack trace: #0 /var/www/html/wp/lads3/wp-content/themes/lads/vendor/twig/twig/lib/Twig/Parser.php(79): Twig_Parser->subparse(NULL, false) #1 /var/www/html/wp/lads3/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(692): Twig_Parser->parse(Object(Twig_TokenStream)) #2 /var/www/html/wp/lads3/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(750): Twig_Environment->parse(Object(Twig_TokenStream)) #3 /var/www/html/wp/lads3/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(447): Twig_Environment->compileSource(Object(Twig_Source)) #4 /var/www/html/wp/lads3/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(362): Twig_Environment->loadTemplate('main.twig') #5 /var/www/html/wp/lads3/wp-content/pl in /var/www/html/wp/lads3/wp-content/plugins/sitepress-multilingual-cms/templates/support/info/main.twig on line 4

I don't understand how I could be causing Twig errors.

Thanks in advance,

Jim

September 27, 2017 at 11:35 am #1384796

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Pascal,

Okay, can you please provide temporary access (WP-Admin & FTP) to your site (preferably to a test site) so that I can translate logo images and explain you with screenshots that how I would be achieving this – in order to be of better help and check if some configurations might need to be changed.

Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please add the debug report in the Debug Information box and not paste it in the message box directly. I have also enabled debug info box for your next reply: https://toolset.com/faq/provide-debug-information-faster-support/

Thank you

September 28, 2017 at 7:11 am #1385698

Pascal

Hi Noman:

After some more research, I have discovered the following: Our custom theme also uses Twig, and that is causing a conflict with WPML. Is there a "best practices" page that describes how other themes & plugins can use Twig without interfering with WPML?

Thanks,

Jim

September 28, 2017 at 7:51 am #1385750

Pascal

An update: I just found this related forum article:

https://wpml.org/forums/topic/twig-update/

I also prefer to use version 2 of Twig, so my question more specifically would be if there is a page describing best practices for themes or plugins that want to use their own copy of Twig.

Thanks,

Jim

September 28, 2017 at 4:43 pm #1386546

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Jim,

I don't think we have any doc related to Twig updates or updating it. Also for white screen issue we really don't need to update these. There must be some error or conflict happening.

We released WPML v3.8.2 so I recommend trying this one: https://wpml.org/account/downloads/

1. Please enable WordPress Debug mode and looks for any code related errors shown on the page or in debug.log file - How to enable Debug mode: https://wpml.org/documentation/support/debugging-wpml/

2. Please disable WPML plugin by renaming the plugin folder. In your hosting cpanel >> if you have File Manager >> in /wp-content/plugins folders >> Look for the plugin folder “sitepress-multilingual-cms” >> and rename it like “sitepress-multilingual-cms - OFF”. (or you can do this using FTP as well).

- After that please check for a possible theme and plugin conflict. To do that you can switch back to any default theme (e.g. Twenty Sixteen theme), Disable all plugins except WPML (remove current one and install new fresh WPML v3.8.2) and see if this issue goes away with default theme and only WPML activated? See if activating only WPML with default theme and all plugins disabled also shows this issue.

Please share with me the results of above tests and let me know if you would like to share your temporary site login access with me so I can debug further. Thank you

September 29, 2017 at 3:31 pm #1387444

Pascal

Hi Noman:

My custom theme uses Twig. My theme worked fine with 3.8.0, but something changed in WPML version 3.8.1 to cause errors in WPML's copy of Twig. (See my previous entries.) The problem still exists in 3.8.2.

It appears I have to remove my copy of Twig and use the old version installed by WPML. This is unfortunate but I can live with it.

Thanks,

Jim