Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m experiencing the same issue on a development site with WP_DEBUG enabled. When selecting the various hiding options in the metabox in the post edit screen, the AJAX function calling save_meta_data silently fails.

    There appears to be an undefined variable on line 353 of class-post-hide-metabox.php. It’s this line:

    $exist = whp_plugin()->get_whp_meta( $post_id, $key,$fallabacke );

    Neither $fallabacke, nor $fallaback (which is referenced elsewhere in the plugin file) is available in the save_meta_data function. Removing the last variable in that function call allows the plugin to save the relevant data to the database:

    $exist = whp_plugin()->get_whp_meta( $post_id, $key );

    • This reply was modified 1 year, 2 months ago by mensch.
    • This reply was modified 1 year, 2 months ago by mensch.
    Thread Starter mensch

    (@mensch)

    Yes, looking at the code there seem to be a lot of hooks in the constructor which will be duplicated this way.

    As the plugin adds a global variable of the Simba_Two_Factor_Authentication_Plugin class instance (which extends Simba_Two_Factor_Authentication_1), the enqueue method can be used directly, which should avoid the potential duplication issues:

    add_filter('do_shortcode_tag', function($output, $tag) {
    if ('pmpro_login' == $tag && class_exists('Simba_Two_Factor_Authentication_1')) {
    global $simba_two_factor_authentication;
    $simba_two_factor_authentication->login_enqueue_scripts();
    }
    return $output;
    }, 10, 2);
    Thread Starter mensch

    (@mensch)

    Just saw other topics with the same issue. Could this perhaps be due a server configuration where the PHP intl module is missing? The module is currently temporarily inactive on the hosting where my websites is running, so it might cause this issue.

    Update: No, this isn’t the case. On my local machine, with all the required modules present the error also occurs. When a donation is added from the cart there is no issue, only when a value is entered in the last checkout screen.

    • This reply was modified 1 year, 5 months ago by mensch.
    Thread Starter mensch

    (@mensch)

    I don’t think requesting official support will be necessary in my case, as supporting the shortcode is enough for me and that can be done by amending the do_shortcode_tag on line 137 of simba-tfa/login-form-integrations.php as mentioned in my initial post.

    As those changes will be overwritten with every update of the plugin, I’ve updated the functions.php file of my theme instead with the following filter which ensures the enqueuing of the relevant assets on the login page:

    /**
    * Add support for the Two Factor Authentication plugin
    */
    add_filter('do_shortcode_tag', function($output, $tag) {
    $tfa = new \Simba_Two_Factor_Authentication_1();
    if ('pmpro_login' == $tag) $tfa->login_enqueue_scripts();
    return $output;
    }, 10, 2);
    • This reply was modified 1 year, 5 months ago by mensch.
    • This reply was modified 1 year, 5 months ago by mensch.
    • This reply was modified 1 year, 5 months ago by mensch.

    This is because of the JSON LD Schema that gets appended to the REST API output. GraphQL should be able to handle JSON LD Schemas, but it seems to choke on something. A quick solution, which seems to work after some quick tests, is disabling the JSON LD output via a filter:

    add_filter('wp_rest_yoast_meta/filter_yoast_json_ld', '__return_false');

    • This reply was modified 5 years, 11 months ago by mensch.
    Thread Starter mensch

    (@mensch)

    Ah, thank you for the context. I inherited The Events Calendar from the previous maintainer of the website and I’m not that happy about it for obvious reasons…

    I think I’ll wait for 4.2, as the mentioned issue seems to have a patch. Otherwise I’ll have to migrate to another plugin. Events Maker seems to be a better WordPress citizen with regards to interoperability with multilingual plugins, I believe?

    Thread Starter mensch

    (@mensch)

    Hi Chouby,

    Thanks for getting back to me. I though I did check with all the plugins disabled, but I neglected to deactivate one plugin, of course it turned out to be the culprit… It’s The Events Calendar by Modern Tribe and from what I’ve read on the forums here so far, it doesn’t integrate all that nicely with Polylang.

    I’m not sure, but it appears that when The Events Calendar is active the save_post hook of Polylang isn’t triggered at all. It seems that Modern Tribe updated their add_action priority, because when I set Polylang’s to a very low number (3) the language starts getting saved again. I’m also using Advanced Custom Fields, so this priority change in admin/admin-filters-post.php is likely going to break something else if I understand the comment on line 34 correctly.

Viewing 7 replies - 1 through 7 (of 7 total)