Tagged: ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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.
    #721760

    Hi 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.
    #721841

    Hi 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,
    Rikard

    #721865

    Done. Thanks. :-)

    /Alex

    #721909

    Hi

    I have the same issue!

    Starting new thread

    #722045

    In 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 }

    #722371

    Hi 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?

    #723119

    Hi,

    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,
    Yigit

    #723182

    in the child theme?

    #723190

    Hi!

    Yes, it should work fine in child theme as well :)

    Best regards,
    Yigit

    #723293

    This worked like a charm. Thanks for the help, I’ll be DL the update from earlier today soon.

    Best regards

    /Alex

    #930526

    Hello, 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.
    #931058

    Hi Zum00t,

    Please open a new thread and include admin login details in private so that we can have a closer look.

    Best regards,
    Rikard

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.