• Resolved Vjekoslav Vu?i?

    (@vjekoslavvucic)


    I have a problem with the “Month” view when I install the MDTF plugin.
    Tooltips are not displayed, and the “Calendar” control in the “Event Bar” cannot be opened, an error occurs in the client browser console:
    “Uncaught TypeError: this.options.theme.replace is not a function at new o (jquery.tooltipster.min.js?ver=6.4.3:2:497)…

    Through Debugging I found the source of the problem.
    MDTF v1.3.3.2 plugin loads the Tooltipster in the file:
    \wp-content\plugins\wp-meta-data-filter-and-taxonomy-filter\core.php (lines 238-244)
    next way:

    //tooltipster
    wp_enqueue_style('tooltipster', self::get_application_uri() . 'js/tooltipster/css/tooltipster.css');
    $tooltip_theme = self::get_setting('tooltip_theme');
    if ($tooltip_theme != 'default') {
    	wp_enqueue_style('tooltipster_theme', self::get_application_uri() . 'js/tooltipster/css/themes/tooltipster-' . $tooltip_theme . '.css');
    }
    wp_enqueue_script('tooltipster', self::get_application_uri() . 'js/tooltipster/js/jquery.tooltipster.min.js', array('jquery'));

    TEC v6.3.5 loads the Tooltipster in the file:
    \wp-content\plugins\the-events-calendar\common\src\Tribe\Main.php (lines 236-237)
    next way:

    [ 'tribe-tooltipster', 'vendor/tooltipster/tooltipster.bundle.js', [ 'jquery' ] ],
    [ 'tribe-tooltipster-css', 'vendor/tooltipster/tooltipster.bundle.css' ],

    I solved the problem the dirty way by commenting out lines 238-244 in the MDTF plugin.

    Questions?
    How do I solve the problem in the long term considering that I have two plugins from different developers here?
    Is there a more elegant way than this dirty workaround I used?

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Vjekoslav Vu?i?

    (@vjekoslavvucic)

    Hi

    Commenting code directly in the plugin is one of my old bad habits.
    I use it as the fastest solution when something gets stuck. It is not sustainable in the long term because it is ugly and dirty.
    Meanwhile, I found a better solution.
    I dequeue and deregister the scripts and styles that are causing me problems.
    In this case, the script and style ‘tooltipster’ are enqueued in the MDTF plugin.
    It should be added to functions.php:

    
     * Dequeue JavaScript or Stylesheet.
     */
    function mdtf_dequeue_tooltipster()
    {
    	// Scripts
    	wp_dequeue_script( 'tooltipster' );
    	wp_deregister_script( 'tooltipster' );
    
    	// Styles
    	wp_dequeue_style( 'tooltipster' );
    	wp_deregister_style( 'tooltipster' );
    }
    add_action( 'wp_enqueue_scripts', 'mdtf_dequeue_tooltipster', 100 );

    By the way, the TEC plugin has a data filtering addon.
    Considering that I work as a volunteer on the ‘in memoriam’ project, I am looking for free solutions for all the victims who died in the war in Bosnia and Herzegovina from 1991 to 1995.
    I am volunteering to digitize some historical books, which is my contribution to peace as a war veteran, “Five for the Future” on my way.
    Otherwise, for a commercial project, I would pay for the PRO version of the TEC plugin and the filter addon and thus support the developers of this great plugin.
    I will mark this topic as solved. Maybe it was more appropriate to ask for help elsewhere. I apologize for that.

    Regards

    Hi @vjekoslavvucic,

    Thank you for following up with how you resolved the issue. We really do appreciate this.

    Have agreat week!
    Chad

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin conflict in the “Month” view, TEC and Meta Data and Taxonomies Filter’ is closed to new replies.