Resolved
Reported for: WPML Multilingual CMS 3.6.1
Resolved in: 3.6.2
Overview of the issue
On some server configurations, WPML is not allowed to create a cache directory even though the permissions should allow to. This issue has been reported for IIS/8.5 server so far.
Workaround
We are still investigating this issue. In the meantime, we can suggest two alternatives:
- Make sure the web server is allowed to write in the wp-content directory.
- Define a specific “cache” directory in the wp-config.php file like the following:
define( 'WPML_CACHE_PATH_ROOT', '/absolute/path/to/cache/folder/' );
Where ‘/absolute/path/to/cache/folder/’ is the absolute path to your cache directory which should be writable by the web server.
I can confirm I am having this same issue on Wp Engine hosting.
Hello @jhanten and thanks for the feedback.
We are currently trying to reproduce the problem and we will update this page as soon as possible.
If you need some more specific assistance, could you please open a ticket on the support forum?
Similar issue here. Error message is below. Our hosting provider does not allow writing files with PHP extension to cache directory for security reasons.
Failed to write cache file
….wp-content/cache/wpml/twig/22/22a0b4e76c9d5699160a979893341298d3f501b940621405963d6c09b723f5ce.php”.’ in /nas/content/live/softactivity/wp-content/plugins/wpml-translation-management/vendor/twig/twig/lib/Twig/Cache/Filesystem.php:84\nStack trace:\n#0 /nas/content/live/softactivity/wp-content/plugins/wpml-translation-management/vendor/twig/twig/lib/Twig/Environment.php(448): Twig_Cache_Filesystem->write(‘/nas/content/li…’, ‘loadTemplate(‘template.twig’)\n#2 /nas/content/live/softactivity/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-templates-factory.php(38): Twig_Environment->render(‘template.twig’, Array)\n#3 /nas/content/live/softactivity/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-w in ….wp-content/plugins/wpml-translation-management/vendor/twig/twig/lib/Twig/Cache/Filesystem.php on line 84
Thank you @yuriyM, we are looking at possible alternatives and we’ll keep you posted in short. Please feel free to open a ticket on the support forum if you need a customized assistance.
I have a specific error that relates to the Buddy Press integration plugin. I updated the WordPress core and WPML at the same time, would this be the issue?
Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘Argument ID must be numeric and greater than 0.’ in /home/sionltdc/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28 Stack trace: #0 /home/sionltdc/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/canonicals/class-wpml-canonicals.php(78): WPML_Translation_Element->__construct(0, Object(SitePress)) #1 /home/sionltdc/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/compatibility/wpseo/class-wpml-wpseo-filters.php(71): WPML_Canonicals->get_canonical_url(false, Object(WP_Post)) #2 [internal function]: WPML_WPSEO_Filters->canonical_filter(false) #3 /home/sionltdc/public_html/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array) #4 /home/sionltdc/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(false, Array) #5 /home/sionltdc/public_html/wp-content/plugins/wordpress-seo/frontend/class-frontend.php(1001): apply_filters(‘wpseo_ in /home/sionltdc/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28
We released just now a beta for WPML that allows it to work with WPEngine restrictions. We’ll update the texts in this errata in a few minutes. You should go to your WPML account, click on Downloads and get the Beta package. Unzip it and use the WPML components from there. This will go out as the production version on Monday.
We are also experiencing this issue on a WP Engine install. We can not recreate this issue as of yet but to be sure, we have been resetting the file permissions from the Utilities menu item underneath the install name.
We have also contacted WP Engine support and they said:
“Our Security App Amour is there so that a binary php cannot create another binary php. That is an exploit within itself.”
They are essentially saying that another PHP file can’t create another PHP file which is what the plugin is attempting to do.
Contrary to that however, is the fact that the twig file is actually being created as I’ve FTP’d the server and can browse to it. I am unable to download the file due to a Read permission…
It’s fine. We are not asking WPEngine to make any change in their system. We released just now a beta for WPML that allows it to work with WPEngine restrictions. We’ll update the texts in this errata in a few minutes. You should go to your WPML account, click on Downloads and get the Beta package. Unzip it and use the WPML components from there. This will go out as the production version on Monday.
Same for me. Sites been down for 4 days. Just back online this morning.
Sorry for this hassle. We didn’t anticipate the access restriction and we did our very best to release an update as soon as we could. WPML 3.6.2 was just released. It should fix the problem for you. Can you update and see?
Thanks for your quick reply. The update not come thru yet. Hopefully soon 🙂