Support » Plugin: Polylang » SportsPress Conflict: unable to save CPT’s in selected language

  • I’m working with SportsPress and have Polylang installed. But whenever I try to add or edit a Match, Calendar, League Table or other custom post types, they are saved under a new language with a number (in my case 86, but that may be different with others).

    Others have encountered the same issue like here and here is the same issue reported in the sportspress support where the plugin author suggested it was probably caused by Polylang.

    But there never was a solution, strangely enough. In the ‘Details’ section of matches, calendars etc. there’s a heading called ‘Language’ but with 2 inputs: the first one displays the ‘normal’ languages, the second one displays choices like ‘pll_603e01f6a8c42’. Could this be the problem?

    One more thing: I noticed one of the others reporting this was working with a non-latin language (Arabic) just as I am (Khmer). Not sure if this is related to the problem, but thought it wouldn’t hurt to mention this.

    • This topic was modified 1 month, 2 weeks ago by cambofrizz. Reason: more detail added
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter cambofrizz

    (@cambofrizz)

    In addition to the above and maybe helpful: in the example of a ‘Calendar’ post type, in the ‘Details’ section (with dates, league, season, etc.) Polylang adds a section called ‘Language’ (sp_calendar-language-field). Underneath is a select input to choose a language. I wonder why that is needed, when the main setting of the post is already set to a language.

    Furthermore under the Language section is another – without a heading – called ‘sp_calendar-post_translations-field’ with initially a link “+ Add New Tag”. I also wonder why that is there.

    Can someone please look into this very annoying problem which makes Polylang unusable with SportsPress. I’m about to give up and switch over to WPML.

    Thread Starter cambofrizz

    (@cambofrizz)

    OK, one more additional clarification, which I think might be the reason it goes wrong and is maybe not related to this plug-in but to SportsPress.

    The ‘Details’ section has a php function to include CPT-depending input fields, they are called with

    
    <?php
    	foreach ( $taxonomies as $taxonomy ) {
    	sp_taxonomy_field( $taxonomy, $post, true );
    	}
    ?>
    

    When I remove this, the ‘Language’ heading and inputs disappear, along with of course all the other (needed) inputs like ‘League’, ‘Season’, etc. But I can edit and save now normally, without a strange language number added.

    Right, found the culprit but I’m not sure whether Polylang should prevent being included with the above ‘foreach’ or whether SportsPress should change the call for taxonomies to exclude Polylang’s. I will post this problem on their support thread, too.

    Thread Starter cambofrizz

    (@cambofrizz)

    I have posted this problem on the SportsPress support, too. And I seem to have found a solution which is not related to Polylang but indeed to SportsPress. Unless when you check my solution and think: “Oh wait, we can prevent that from happening”. If that’s the case, please let me know.

    Thread Starter cambofrizz

    (@cambofrizz)

    On the SportsPress support forum linked above, they are not sure whether the conflict is caused by their plug-in or by Polylang.

    Is anyone on the dev team here ( @chouby @manooweb @raaaahman ) even interested in this problem?

    Thread Starter cambofrizz

    (@cambofrizz)

    The latest version brings no solution. Instead, it’s even worse. When now trying to Update I get:

    
    Warning: array_flip(): Can only flip STRING and INTEGER values! in **********\wp-content\plugins\polylang\include\translated-object.php on line 258
    

    and:

    
    Warning: Cannot modify header information - headers already sent by (output started at **********\wp-content\plugins\polylang\include\translated-object.php:258)
    

    When going to ‘Languages’ the same warning as above is displayed. A new language is now added without any value (so empty) and I’m unable to delete it.

    Right, on top of getting no support here whatsoever, it’s getting worse and worse which makes me now switching to WPML and saying goodbye to Polylang forever.

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