Viewing 8 replies - 31 through 38 (of 38 total)
  • I discovered today which plugin is causing my website to break with 404s all over the place when combining Polylang, Yoast SEO, WP e-Commerce, WP Super Cache and a small bunch of other (really great) plugins.

    It’s the WP e-Commerce Predictive Search plugin. It’s not enough to deactivate it or uninstall it. The damage is already done.

    I had to revert to a backup done earlier today and it worked as it was before.

    Just so you all know.

    I’m using Yoast SEO & Polylang, and the strings are not changing when the language changes.
    Apparently, I have to use the language code in pretty permalinks.

    Is there a way to avoid using the language code in pretty permalinks in order to change Yoast SEO strings when the language changes?

    Plugin Author Chouby

    (@chouby)

    WPSEO does not work correctly when you set the language by content. I don’t know if there is a workaround.

    In current stable version, it should work correctly when adding the language code in urls. I did not test but it should also work when using the subdomains or different domains with v1.2beta

    Thread Starter miguelcortereal

    (@miguelcortereal)

    @ Chouby

    I might be pointing something very stupid or clearly ignorant but I’ve stumbled in an option offered by Buddypress plugin that eventually could be a solution for the wpseo strings that doesn’t translate because seo Plugin actuates earlier than Polylang.

    To ease Buddypress customizations and hacks, there’s the option to create a bp-custom.php file and place it at /wp-content/plugins/ folder.

    At this location this file is read earlier than anything. I was thinking that moving or creating aditional Polylang code for this location it could solve the priority issue.

    Plugin Author Chouby

    (@chouby)

    There is such option in Polylang too (in wp-content/polylang/pll-config.php). That’s a good place to add custom code specific to Polylang without adding a new plugin.

    That’s right. When set from content, the language is loaded after WPSEO loaded its options. So we need to reload the options after the language has been set to get the correct translation. The feature is now included in Polylang 1.2 (1.2dev50).

    Thank you Chouby, Polylang is the best multilingual plugin for WordPress.

    I’m not sure if it’s the same situation described above, but after further testing PLL 1.2dev54, I found out why the Yoast’s SEO wpml-config.xml file was not loading into my Polylang’s String Translation tab.

    I have a WordPress multi-site installation, and I install all my plugins from my Network Admin Dashboard and do a site wide network activation.

    If you do this, when you go out of your Network Admin Dashboard into a specific site dashboard and look for plugins, you’re going to find none. This happens unless you deactivate them in your Network Admin Dashboard. Then you are going to find them on a per-site basis and will have the option to activate them for a specific site only.

    For me, this represents that if I do a get_option(‘active_plugins’), I’m going to get no plugin information at all.

    Polylang currently checks for plugins activated on a single site installation or per-site basis only:

    ...polylang/include/wpml-compat.php, line 472
    
                    // plugins
    		foreach (get_option('active_plugins') as $plugin) {
    			if (file_exists($file = dirname(POLYLANG_DIR).'/'.dirname($plugin).'/wpml-config.xml'))
    				$this->xml_parse(file_get_contents($file), dirname($plugin));
    		}

    What I did, is to check for get_site_option(‘active_sitewide_plugins’), and this will pull all the network activated plugins paths, and this will allow Polylang to read and integrate their wpml-config.xml data into the String Translation tab:

    // network activated plugins
    		foreach (get_site_option( 'active_sitewide_plugins') as $plugin => $time ) {
    			if (file_exists($file = dirname(POLYLANG_DIR).'/'.dirname($plugin).'/wpml-config.xml'))
    				$this->xml_parse(file_get_contents($file), dirname($plugin));
    		}

    And now all of Yoast’s SEO metadata is shown to me at the Strings Translation tab ready for me to translate.

    It’s important to keep both code snippets in that file because of what I described in the bold paragraph.

    Chouby, I hope you can add this to the next Polylangs’ dev.

    Thank you, Chouby!

    Plugin Author Chouby

    (@chouby)

    Oh YES!

    1.2dev55 now checks for sitewide active plugins too.

Viewing 8 replies - 31 through 38 (of 38 total)
  • The topic ‘Polylang and Yoast SEO Plugin’ is closed to new replies.