-
AuthorPosts
-
December 7, 2016 at 7:02 pm #721657
Hi guys,
I’ve encountered a problem with a multilingual website, that I’ve setup with Enfold. When prewieving a page before updating it, the top of the screen displays a warning, that goes like this:
Warning: illegal string offset ‘language_code’ in /var/www/mysite.com/public_html/wp-content/themes/enfold/config-wpml/config.php on line 488.
This message is displayed twice at the top of the screen, when the page is prewieved. It does’nt appear on the live pages at the moment, which is why I am now reluctant to update the pages, since I don’t want this error to be displayed at the top of the live pages.
I wish a knew when this problem appeared, but unfortunately I don’t. :-( I tried updating the WooCommerce Multilingual plugin and all plugins required for it to function, which hasn’t solved the problem. Based on the error message, it appears to me, that this problem occurs from the config.php in the Enfold-theme. I have not upgraded to WordPress 4.7 yet, and I have the latest release of the Enfold-theme installed on the site (from mid-September).
If anyone can help me solve this problem, I will greatly appreciate it.
Best regards,
Alex
- This topic was modified 7 years, 11 months ago by RedRaphDK.
December 8, 2016 at 2:47 am #721760Hi there,
I’ve just encountered the very same issue, after installing and setting up the WPML plugin. What triggered the issue for me was that I enabled the “Copy content from English”.
Up to this point, I’ve followed all the steps for setting up the WPML plugin from Kriesi’s tutorial ,so I can’t figure out what I did wrong.
In the Avia Layout Builder it looked all right, so I updated my site and the above mentioned error message appeared on the live site under the menu.I’ve just tried to see what happens if I delete the copied page (language option 2), and it worked, the error message has disappeared. Would love to know as well what the solution is…
Thanks for your suggestions in advance
István- This reply was modified 7 years, 11 months ago by Formaliseit.
December 8, 2016 at 7:14 am #721841Hi Alex,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
@Formaliseit, we would need access to your site as well. Please start a new thread and include admin login details in private.Best regards,
RikardDecember 8, 2016 at 8:54 am #721865Done. Thanks. :-)
/Alex
December 8, 2016 at 12:33 pm #721909Hi
I have the same issue!
Starting new thread
December 8, 2016 at 4:24 pm #722045In the meantime, try to add the following lines in the functions.php file inside your theme folder
1 /**
2 * This fixes the issue with truncated links in Enfold theme with WPML 3.6.1
3 * WARNING: ILLEGAL STRING OFFSET ‘LANGUAGE_CODE’ IN \WP-CONTENT\THEMES\ENFOLD\CONFIG-WPML\CONFIG.PHP ON LINE 489
4 */
5 add_action( ‘init’, ‘wpmlcore_3776_temporary_fix’ );
6 function WPMLcore_3776_temporary_fix() {
7 remove_filter( ‘WPML_filter_link’,’avia_change_wpml_home_link’, 10 );
8 }December 9, 2016 at 10:51 am #722371Hi Bborsi,
Thanks, I’ll give it a try and see how it works out. Is this code-string copy-paste ready? And should it be entered anywhere specific in the functions.php?
December 12, 2016 at 2:21 pm #723119Hi,
Please add following code to Functions.php file in Appearance > Editor
/** * This fixes the issue with truncated links in Enfold theme with WPML 3.6.0 * WARNING: ILLEGAL STRING OFFSET 'LANGUAGE_CODE' IN …\WP-CONTENT\THEMES\ENFOLD\CONFIG-WPML\CONFIG.PHP ON LINE (number of line) */ add_action( 'init', 'wpmlcore_3776_temporary_fix' ); function WPMLcore_3776_temporary_fix() { remove_filter( 'WPML_filter_link','avia_change_wpml_home_link', 10 ); }
Fix will be included in Enfold update.
Best regards,
YigitDecember 12, 2016 at 3:32 pm #723182in the child theme?
December 12, 2016 at 3:39 pm #723190December 12, 2016 at 6:42 pm #723293This worked like a charm. Thanks for the help, I’ll be DL the update from earlier today soon.
Best regards
/Alex
March 21, 2018 at 12:26 pm #930526Hello, i have this problem
Trying to get property of non-object in /home/webfoxes/mysite.com/www/wp-content/themes/enfold/config-wpml/config.php on line 681
ading
/**
* This fixes the issue with truncated links in Enfold theme with WPML 3.6.0
* WARNING: ILLEGAL STRING OFFSET ‘LANGUAGE_CODE’ IN …\WP-CONTENT\THEMES\ENFOLD\CONFIG-WPML\CONFIG.PHP ON LINE (number of line)
*/
add_action( ‘init’, ‘wpmlcore_3776_temporary_fix’ );
function WPMLcore_3776_temporary_fix() {
remove_filter( ‘WPML_filter_link’,’avia_change_wpml_home_link’, 10 );
}
It does not help. Can anyone handle it?- This reply was modified 6 years, 8 months ago by Zum00t.
March 22, 2018 at 6:47 am #931058 -
AuthorPosts
- You must be logged in to reply to this topic.