Support » Plugin: Polylang » With WP 4.6 post/pages loses connection between them in different languages

  • Hi,

    Iā€™m having some weird problems after I did the updated to WP 4.6.
    In one of the sites I use your plugin I’m having the following problem as follow. I have 5 languages in it and even when I use the “+” button to add a new translation associated to that first post/page, after I publish this second new post/page associate the previous one, “something” happens breaking this connection between the previous page and the new one I just published, letting the new one as “a completely new post/page without any other associated post/page to it”.
    What should I do to solve it? Or what should I check to confirm if there is any conflict with any other plugin?
    Last week was working perfectly fine, but yesterday and today isnn’t.
    Thanks.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi
    Maybe a conflict with your theme or another plugin.
    Could you deactivate all your plugins. Then switch on Twenty Sixteen.
    After that activate Polylang. Then check if you have still this issue. If the issue has disappeared switch on your theme.
    If all work with your theme you must activate your plugins one by one to find which one is causing the conflict.

    I have the similar problem but with ACF.
    https://wordpress.org/support/topic/polylang-from-2-0-and-later-acf-4-4-8-problem/

    It’s not a conflict with others plugins. I tested it on clean copy of WP with only Polylang & ACF inside. I think it’s not a fault of same WP. I tested it on WP from 4.5.4 to 4.6.1.

    Hello Chrystl (@chrystl),
    First of all, thanks for the support.
    I took some time to answer because I did some exhaustive tests to be sure if was a conflict with other plugin, with the theme or with the WP release. And I still have this problem, but now focused only in the “Post” area, pages returned to work just fine again.
    Just to you know, I did tests with Twenty Sixteen theme only Poplylang plugin activated, I did test with Twenty Sixteen theme and all previous plugins activated, did test with my theme (which is Nirvana – Version: 1.2.7) only with Poplylang plugin activated, and than with all my plugins activated. The results in all cases were:
    – Pages: work fine without any problem in all cases
    – Posts: didn’t work in any situation listed above

    As I mentioned before, I start to notice this problem after the WP 4.6 release and keeps in the 4.6.1 version. So, I need to agree with @msolowski that might isn’t a conflict with other plugins and/or WP versions.
    Could you please check that once again and return us?
    Thanks.

    • This reply was modified 1 year, 2 months ago by  luisclub.

    Dear Chrystl (@chrystl),

    I really would like to apology myself with you, because in the tests I did I left one window open with “all” my plugins at sight, but “Murphy” was around here and left one plugin out of my sight. And guess what, was this last plugin that was causing this error.
    everything is working just fine now with pages and posts for me, in all sites I manage.
    Just to register, the plugin that was causing this error was WP to Twitter Versione 3.2.13, the previous version was working just fine, I say that because I used it many times without any problem, but now it isn’t.
    If you want to let this open until solve @msolowski problem I really don’t mind.
    Thanks once again for all support.

    Hi! I’m the author of WP to Twitter, and that certainly sounds like a curious issue for it to cause. You’re confident that this was working fine in version 3.2.12 of WP to Twitter? The changes between those versions aren’t extensive, so they would be fairly easy to look through and try and spot.

    Hello @joedolson,
    Yes, I’m 100% sure.
    I say that because I installed the plugin “Twitter Auto Publish” from xyzscripts.com and I haven’t any problem like that. I already re-posted all post with that problem and worked just fine now.
    Sorry to say that, but for some reason your plugin simple “breaks” the connections between different language versions in the same post.
    Thanks for the support and interest.

    Sorry, I may not have been clear – I wasn’t doubting that the issue was with WP to Twitter, I was just trying to confirm which version of WP to Twitter this *did* work with, so that I can track the changes and try and see what broke.

    Yes, until the previous version was working fine, I didn’t have any problem like this.
    Only after this last update I started to have this weird problem.
    Later if you would like my help to test it, just let me know.

    I can confirm that there is a conflict between the PolyLang plugin and the WP to Twitter plugin.
    https://wordpress.org/plugins/wp-to-twitter/

    In version 3.2.12 and 3.2.13 the problem with associating languages occurs. In version 3.2.11 everything works fine.

    Thanks for the confirmation – I’ll investigate this!

    There are a couple of changes I’ve made that *maybe* could have this impact; although I’m not sure why they would. I made a change to the WP to Twitter primary save_post action to self-remove its own action before performing its function, to prevent re-firing the action; and I changed the check on publishing Tweets on future post to use wp_is_post_autosave( $post_ID ) instead of checking whether DOING_AUTOSAVE was defined & true.

    These seem very low probability as causing a problem, but I can’t see anything else. If you install John Blackbourne’s “Query Monitor”, does it throw any errors that give a clue for the problem?

    Thanks for the help investigating this. I’ll try to check some possibilities tomorrow, after a good night sleep šŸ™‚

    Ok found the change of code that is causing the problem. But don’t know why yet. File wp-to-twitter.php line 1815 and 1817. Those were added between 3.2.11 and 3.2.122. If I comment those out, the problem with Polylang disappears.

    
    function wpt_twit( $id ) {
    	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE || wp_is_post_revision( $id ) || ! wpt_in_post_type( $id ) ) {
    		return;
    	}
    	$post = get_post( $id );	
    	if ( $post->post_status != 'publish' ) {
    		return;
    	} // is there any reason to accept any other status?
    	
    	//remove_action( 'save_post', 'wpt_twit', 15 );
    	wpt_twit_instant( $id );
    	//add_action( 'save_post', 'wpt_twit', 15 );
    }
    

    That’s very strange. That is one of the things I was pointing to as a possibility, but it’s hard to see why removing the ‘wpt_twit’ action would break anything in Polylang. I’ll investigate this further, as well. Thanks for following up!

    I don’t know enough about the way wordpress actions work to be able to help. It’s not clear to me what
    remove_action( ‘save_post’, ‘wpt_twit’, 15 );
    wpt_twit_instant( $id );
    add_action( ‘save_post’, ‘wpt_twit’, 15 );
    from within the function wpt_twit itself does exactly. So wp_twit is called from outside somewhere, and then it removes itself from save_post? And after that adds itself again.

    The problem with polylang occurs when you fill in a meta box field. Those meta box fields are for the other languages. In that meta box field you type and an ajax search is done to see if a post in that other language exists with the title you are typing.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘With WP 4.6 post/pages loses connection between them in different languages’ is closed to new replies.