[resolved] Latest Polylang update makes my website look garbled (3 posts)

  1. janpeeters
    Posted 3 years ago #

    Hi Chouby,

    we spoke a while back about translating Pagelines Framework with Polylang. I'm using a custom plugin that you wrote for translating two additional strings.
    Everything was working fine but with update 0.9.5 my website got messed up.
    I haven't updated any other plugins when and since updating Polylang.
    This is how it should look:
    This is how it looks after updating:
    I've tried to deactivate the custom plugin but that didn't help.
    I've also uploaded the latest version manually because I thought maybe the automated update mechanism made an error.

    Hopefully you have some ideas.
    In the past I've seen Polylang mess up my website like this before but that was when I activated one of the options in the last tab. But sorry to say that I don't recall which one that was.

    Thanks for helping out, Jan


  2. Chouby
    Plugin Author

    Posted 3 years ago #

    In Pagelines code, there is an attempt to be compatible with Polylang :) However, it does not seem to work as expected.

    In file includes/class.render.css.php (line 349 in 3.7.9):

    if ( defined( 'PLL_INC') ) {
    	global $post;
    	$lang = Polylang_Base::get_post_language( $post->ID );
    	return sprintf( '%s/%s/', get_home_url(), $lang->slug );

    should be replaced by:

    if (function_exists('pll_home_url'))
    	return pll_home_url();

    or even completely removed (Polylang supports the equivalent function of WPML 'icl_get_home_url' since 0.9.4)

    Changing this may solve the issue.

  3. janpeeters
    Posted 3 years ago #

    It did. I deleted the whole part and things worked again. Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic