Forum Replies Created

Viewing 15 replies - 1 through 15 (of 51 total)
  • If you have access to edit the plugin, go to tablepress > controllers > controller-frontend.php find

    public function enqueue_css(): void {
    /*
    * Bail early if the function is called from some action hook outside of the normal rendering process.
    * These are often used by e.g. SEO plugins that render the content in additional contexts, e.g. to get an excerpt via an output buffer.
    * In these cases, we don't want to enqueue the CSS, as it would likely not be printed on the page.
    */
    if ( doing_action( 'wp_head' ) || doing_action( 'wp_footer' ) ) {
    return;
    }

    // Prevent repeated execution via a static variable.
    static $css_enqueued = false;
    if ( $css_enqueued && ! doing_action( 'enqueue_block_assets' ) ) {
    return;
    }
    $css_enqueued = true;

    /**
    * Filters whether the TablePress Default CSS code shall be loaded.
    *
    * @since 1.0.0
    *
    * @param bool $use Whether the Default CSS shall be loaded. Default true.
    */
    $use_default_css = apply_filters( 'tablepress_use_default_css', true );
    $use_custom_css = TablePress::$model_options->get( 'use_custom_css' );

    if ( ! $use_default_css && ! $use_custom_css ) {
    // Register a placeholder dependency, so that the handle is known for other styles.
    wp_register_style( 'tablepress-default', false ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
    return;
    }

    $custom_css = TablePress::$model_options->get( 'custom_css' );
    $use_custom_css = $use_custom_css && '' !== $custom_css;
    $use_custom_css_file = $use_custom_css && TablePress::$model_options->get( 'use_custom_css_file' );
    /**
    * Filters the "Custom CSS" version number that is appended to the enqueued CSS files
    *
    * @since 1.0.0
    *
    * @param int $version The "Custom CSS" version.
    */
    $custom_css_version = (string) apply_filters( 'tablepress_custom_css_version', TablePress::$model_options->get( 'custom_css_version' ) );

    $tablepress_css = TablePress::load_class( 'TablePress_CSS', 'class-css.php', 'classes' );

    // Determine Default CSS URL.
    $rtl = ( is_rtl() ) ? '-rtl' : '';
    $unfiltered_default_css_url = plugins_url( "css/build/default{$rtl}.css", TABLEPRESS__FILE__ );
    /**
    * Filters the URL from which the TablePress Default CSS file is loaded.
    *
    * @since 1.0.0
    *
    * @param string $unfiltered_default_css_url URL of the TablePress Default CSS file.
    */
    $default_css_url = apply_filters( 'tablepress_default_css_url', $unfiltered_default_css_url );

    $use_custom_css_combined_file = ( $use_default_css && $use_custom_css_file && ! SCRIPT_DEBUG && ! is_rtl() && $unfiltered_default_css_url === $default_css_url && $tablepress_css->load_custom_css_from_file( 'combined' ) );
    if ( $use_custom_css_combined_file ) {
    $custom_css_combined_url = $tablepress_css->get_custom_css_location( 'combined', 'url' );
    // Need to use 'tablepress-default' instead of 'tablepress-combined' to not break existing TablePress Extensions.
    wp_enqueue_style( 'tablepress-default', $custom_css_combined_url, array(), $custom_css_version );
    if ( did_action( 'wp_print_styles' ) ) {
    wp_print_styles( 'tablepress-default' );
    }
    return;
    }

    if ( $use_default_css ) {
    wp_enqueue_style( 'tablepress-default', $default_css_url, array(), TablePress::version );
    } else {
    // Register a placeholder dependency, so that the handle is known for other styles.
    wp_register_style( 'tablepress-default', false ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
    }

    $use_custom_css_minified_file = ( $use_custom_css_file && ! SCRIPT_DEBUG && $tablepress_css->load_custom_css_from_file( 'minified' ) );
    if ( $use_custom_css_minified_file ) {
    $custom_css_minified_url = $tablepress_css->get_custom_css_location( 'minified', 'url' );
    wp_enqueue_style( 'tablepress-custom', $custom_css_minified_url, array( 'tablepress-default' ), $custom_css_version );
    if ( did_action( 'wp_print_styles' ) ) {
    wp_print_styles( 'tablepress-custom' );
    }
    return;
    }

    $use_custom_css_normal_file = ( $use_custom_css_file && $tablepress_css->load_custom_css_from_file( 'normal' ) );
    if ( $use_custom_css_normal_file ) {
    $custom_css_normal_url = $tablepress_css->get_custom_css_location( 'normal', 'url' );
    wp_enqueue_style( 'tablepress-custom', $custom_css_normal_url, array( 'tablepress-default' ), $custom_css_version );
    if ( did_action( 'wp_print_styles' ) ) {
    wp_print_styles( 'tablepress-custom' );
    }
    return;
    }

    if ( $use_custom_css ) {
    // Get "Custom CSS" from options, try minified Custom CSS first.
    $custom_css_minified = TablePress::$model_options->get( 'custom_css_minified' );
    if ( ! empty( $custom_css_minified ) ) {
    $custom_css = $custom_css_minified;
    }
    /**
    * Filters the "Custom CSS" code that is to be loaded as inline CSS.
    *
    * @since 1.0.0
    *
    * @param string $custom_css The "Custom CSS" code.
    */
    $custom_css = apply_filters( 'tablepress_custom_css', $custom_css );
    if ( ! empty( $custom_css ) ) {
    wp_add_inline_style( 'tablepress-default', $custom_css );
    if ( did_action( 'wp_print_styles' ) ) {
    wp_print_styles( 'tablepress-default' );
    }
    return;
    }
    }
    }

    replace with

    public function enqueue_css(): void {
    /** This filter is documented in controllers/controller-frontend.php */
    $use_default_css = apply_filters( 'tablepress_use_default_css', true );
    $custom_css = TablePress::$model_options->get( 'custom_css' );
    $use_custom_css = ( TablePress::$model_options->get( 'use_custom_css' ) && '' !== $custom_css );
    $use_custom_css_file = ( $use_custom_css && TablePress::$model_options->get( 'use_custom_css_file' ) );
    /**
    * Filters the "Custom CSS" version number that is appended to the enqueued CSS files
    *
    * @since 1.0.0
    *
    * @param int $version The "Custom CSS" version.
    */
    $custom_css_version = (string) apply_filters( 'tablepress_custom_css_version', TablePress::$model_options->get( 'custom_css_version' ) );

    $tablepress_css = TablePress::load_class( 'TablePress_CSS', 'class-css.php', 'classes' );

    // Determine Default CSS URL.
    $rtl = ( is_rtl() ) ? '-rtl' : '';
    $unfiltered_default_css_url = plugins_url( "css/build/default{$rtl}.css", TABLEPRESS__FILE__ );
    /**
    * Filters the URL from which the TablePress Default CSS file is loaded.
    *
    * @since 1.0.0
    *
    * @param string $unfiltered_default_css_url URL of the TablePress Default CSS file.
    */
    $default_css_url = apply_filters( 'tablepress_default_css_url', $unfiltered_default_css_url );

    $use_custom_css_combined_file = ( $use_default_css && $use_custom_css_file && ! SCRIPT_DEBUG && ! is_rtl() && $unfiltered_default_css_url === $default_css_url && $tablepress_css->load_custom_css_from_file( 'combined' ) );

    if ( $use_custom_css_combined_file ) {
    $custom_css_combined_url = $tablepress_css->get_custom_css_location( 'combined', 'url' );
    // Need to use 'tablepress-default' instead of 'tablepress-combined' to not break existing TablePress Extensions.
    wp_enqueue_style( 'tablepress-default', $custom_css_combined_url, array(), $custom_css_version );
    } else {
    $custom_css_dependencies = array();
    if ( $use_default_css ) {
    wp_enqueue_style( 'tablepress-default', $default_css_url, array(), TablePress::version );
    // Add dependency to make sure that Custom CSS is printed after Default CSS.
    $custom_css_dependencies[] = 'tablepress-default';
    }

    $use_custom_css_minified_file = ( $use_custom_css_file && ! SCRIPT_DEBUG && $tablepress_css->load_custom_css_from_file( 'minified' ) );
    if ( $use_custom_css_minified_file ) {
    $custom_css_minified_url = $tablepress_css->get_custom_css_location( 'minified', 'url' );
    wp_enqueue_style( 'tablepress-custom', $custom_css_minified_url, $custom_css_dependencies, $custom_css_version );
    return;
    }

    $use_custom_css_normal_file = ( $use_custom_css_file && $tablepress_css->load_custom_css_from_file( 'normal' ) );
    if ( $use_custom_css_normal_file ) {
    $custom_css_normal_url = $tablepress_css->get_custom_css_location( 'normal', 'url' );
    wp_enqueue_style( 'tablepress-custom', $custom_css_normal_url, $custom_css_dependencies, $custom_css_version );
    return;
    }

    if ( $use_custom_css ) {
    // Get "Custom CSS" from options, try minified Custom CSS first.
    $custom_css_minified = TablePress::$model_options->get( 'custom_css_minified' );
    if ( ! empty( $custom_css_minified ) ) {
    $custom_css = $custom_css_minified;
    }
    /**
    * Filters the "Custom CSS" code that is to be loaded as inline CSS.
    *
    * @since 1.0.0
    *
    * @param string $custom_css The "Custom CSS" code.
    */
    $custom_css = apply_filters( 'tablepress_custom_css', $custom_css );
    if ( ! empty( $custom_css ) ) {
    // wp_add_inline_style() requires a loaded CSS file, so we have to work around that if "Default CSS" is disabled.
    if ( $use_default_css ) {
    // Handle of the file to which the <style> shall be appended.
    wp_add_inline_style( 'tablepress-default', $custom_css );
    } else {
    add_action( 'wp_head', array( $this, '_print_custom_css' ), 8 ); // Priority 8 to hook in right after WP_Styles has been processed.
    }
    }
    }
    }
    }

    i have the same issue, and it works for me. you can test it and hope Tobias will mod. the file

    • This reply was modified 3 days, 20 hours ago by spielo.
    Thread Starter spielo

    (@spielo)

    hi Tobias, i find out the issue comes from this code in controller-frontend.php, if i use the the code from 2.4 version it works well, no header issue and also customer css works well

    public function enqueue_css(): void {
        /*
         * Bail early if the function is called from some action hook outside of the normal rendering process.
         * These are often used by e.g. SEO plugins that render the content in additional contexts, e.g. to get an excerpt via an output buffer.
         * In these cases, we don't want to enqueue the CSS, as it would likely not be printed on the page.
         */
        if ( doing_action( 'wp_head' ) || doing_action( 'wp_footer' ) ) {
            return;
        }
    
        // Prevent repeated execution via a static variable.
        static $css_enqueued = false;
        if ( $css_enqueued && ! doing_action( 'enqueue_block_assets' ) ) {
            return;
        }
        $css_enqueued = true;
    
        /**
         * Filters whether the TablePress Default CSS code shall be loaded.
         *
         * @since 1.0.0
         *
         * @param bool $use Whether the Default CSS shall be loaded. Default true.
         */
        $use_default_css = apply_filters( 'tablepress_use_default_css', true );
        $use_custom_css = TablePress::$model_options->get( 'use_custom_css' );
    
        if ( ! $use_default_css && ! $use_custom_css ) {
            // Register a placeholder dependency, so that the handle is known for other styles.
            wp_register_style( 'tablepress-default', false ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
            return;
        }
    
        $custom_css = TablePress::$model_options->get( 'custom_css' );
        $use_custom_css = $use_custom_css && '' !== $custom_css;
        $use_custom_css_file = $use_custom_css && TablePress::$model_options->get( 'use_custom_css_file' );
        /**
         * Filters the "Custom CSS" version number that is appended to the enqueued CSS files
         *
         * @since 1.0.0
         *
         * @param int $version The "Custom CSS" version.
         */
        $custom_css_version = (string) apply_filters( 'tablepress_custom_css_version', TablePress::$model_options->get( 'custom_css_version' ) );
    
        $tablepress_css = TablePress::load_class( 'TablePress_CSS', 'class-css.php', 'classes' );
    
            // Determine Default CSS URL.
        $rtl = ( is_rtl() ) ? '-rtl' : '';
        $unfiltered_default_css_url = plugins_url( "css/build/default{$rtl}.css", TABLEPRESS__FILE__ );
        /**
         * Filters the URL from which the TablePress Default CSS file is loaded.
         *
         * @since 1.0.0
         *
         * @param string $unfiltered_default_css_url URL of the TablePress Default CSS file.
         */
        $default_css_url = apply_filters( 'tablepress_default_css_url', $unfiltered_default_css_url );
    
        $use_custom_css_combined_file = ( $use_default_css && $use_custom_css_file && ! SCRIPT_DEBUG && ! is_rtl() && $unfiltered_default_css_url === $default_css_url && $tablepress_css->load_custom_css_from_file( 'combined' ) );
        if ( $use_custom_css_combined_file ) {
            $custom_css_combined_url = $tablepress_css->get_custom_css_location( 'combined', 'url' );
            // Need to use 'tablepress-default' instead of 'tablepress-combined' to not break existing TablePress Extensions.
            wp_enqueue_style( 'tablepress-default', $custom_css_combined_url, array(), $custom_css_version );
            if ( did_action( 'wp_print_styles' ) ) {
                wp_print_styles( 'tablepress-default' );
            }
            return;
        }
    
        if ( $use_default_css ) {
            wp_enqueue_style( 'tablepress-default', $default_css_url, array(), TablePress::version );
        } else {
            // Register a placeholder dependency, so that the handle is known for other styles.
            wp_register_style( 'tablepress-default', false ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
        }
    
        $use_custom_css_minified_file = ( $use_custom_css_file && ! SCRIPT_DEBUG && $tablepress_css->load_custom_css_from_file( 'minified' ) );
        if ( $use_custom_css_minified_file ) {
            $custom_css_minified_url = $tablepress_css->get_custom_css_location( 'minified', 'url' );
            wp_enqueue_style( 'tablepress-custom', $custom_css_minified_url, array( 'tablepress-default' ), $custom_css_version );
            if ( did_action( 'wp_print_styles' ) ) {
                wp_print_styles( 'tablepress-custom' );
            }
            return;
        }
    
        $use_custom_css_normal_file = ( $use_custom_css_file && $tablepress_css->load_custom_css_from_file( 'normal' ) );
        if ( $use_custom_css_normal_file ) {
            $custom_css_normal_url = $tablepress_css->get_custom_css_location( 'normal', 'url' );
            wp_enqueue_style( 'tablepress-custom', $custom_css_normal_url, array( 'tablepress-default' ), $custom_css_version );
            if ( did_action( 'wp_print_styles' ) ) {
                wp_print_styles( 'tablepress-custom' );
            }
            return;
        }
    
        if ( $use_custom_css ) {
            // Get "Custom CSS" from options, try minified Custom CSS first.
            $custom_css_minified = TablePress::$model_options->get( 'custom_css_minified' );
            if ( ! empty( $custom_css_minified ) ) {
                $custom_css = $custom_css_minified;
            }
            /**
             * Filters the "Custom CSS" code that is to be loaded as inline CSS.
             *
             * @since 1.0.0
             *
             * @param string $custom_css The "Custom CSS" code.
             */
            $custom_css = apply_filters( 'tablepress_custom_css', $custom_css );
            if ( ! empty( $custom_css ) ) {
                wp_add_inline_style( 'tablepress-default', $custom_css );
                if ( did_action( 'wp_print_styles' ) ) {
                    wp_print_styles( 'tablepress-default' );
                }
                return;
            }
        }
    }
    Thread Starter spielo

    (@spielo)

    done, send you mail

    thanks

    Thread Starter spielo

    (@spielo)

    can i send you link and login for staging site private?

    Thread Starter spielo

    (@spielo)

    Hi,

    Thanks for your feedback, but we’ve also noticed that the complete CSS we had implemented is no longer working, which basically means the entire plugin has likely been updated. Unfortunately, we’ll never understand why developers make such changes when everything was running perfectly fine! Anyway, we’ve now reverted to the old version and will keep it running until it no longer works, or until you reach version 5.0, which we’ve now assigned to the plugin. Still, thanks for wanting to investigate it, but at the moment, it doesn’t make sense for us since we’d have to change everything.

    Thread Starter spielo

    (@spielo)

    Hi,

    if i put a tablepress shortcode in the Full width sections in my editor, then i get the massage in the top of my website, ok is only for admin or logged in users to see. but it is since the version 3.0. at the moment i rollback and all works fine

    regards

    spielo

    (@spielo)

    Welcome back after another update with online user

    https://ibb.co/Kh2VZvC

    • This reply was modified 3 weeks ago by spielo.
    Thread Starter spielo

    (@spielo)

    Hi, i saw you add in new Version now paramenters, is it possible now add parameter like $1? I found no infos about parameters.

    Thread Starter spielo

    (@spielo)

    Thanks, look like works now.

    Thread Starter spielo

    (@spielo)

    Thanks works

    right code, think was a mistake from you not $$post…

    Rate_My_Post_Public::get_visual_rating( $post->ID );

    Thread Starter spielo

    (@spielo)

    Hi Amir, sure we saw it, but unfortunately it is not like before it was absolutely compact!

    For us is important to see the ip without hover, use it for GEO Tracking ips automatically, with hover not possible.

    Regards

    • This reply was modified 2 months, 4 weeks ago by spielo.
    • This reply was modified 2 months, 4 weeks ago by spielo.
    Thread Starter spielo

    (@spielo)

    Thanks found it, but is to compact for me. Version 14.9 is all in one without any click, can you change it back?

    https://ibb.co/wLWQ5Hc

    • This reply was modified 2 months, 4 weeks ago by spielo.
    Thread Starter spielo

    (@spielo)

    Hi, is it possible to clear the Geolocation Sessions Log Analysis? Or is the only way to clear the logs per ftp in plugin logs?

    • This reply was modified 3 months, 1 week ago by spielo.
    Thread Starter spielo

    (@spielo)

    You are sure look on the right domain, only the main domain works with wp-rocket, because tests only on sub domain at the moment (will be show only with german ip otherwise redirected to the main domain), because site is life working.

    for up to date sites, clear cache sometimes, i do not now at the moment how often nginx cache clearing, but with new content people see old content, until cache is reload.

    i disbale now exclude cookies by ifso geo ip, let see how it works, in my tests not all pages was redirected. have todo more tests for all!

    PS: Redirect IP from sub Domain is now off, you will see the test site. https://tinyurl.com/2bhwt8rb

    Thanks

    • This reply was modified 3 months, 2 weeks ago by spielo.
    • This reply was modified 3 months, 2 weeks ago by spielo.
    Thread Starter spielo

    (@spielo)

    A couple of comments: if you delete the cache, it completely drags the page down and takes ages to load, which is already suboptimal. We also entered nginx migt in the settings, but it doesn’t change anything if the cache is completely deleted. In order for GEO IP to work reasonably well, you can only regulate it via exclude cookies, which also slows things down. Otherwise the plugin actually works well, but as mentioned, it drags everything down as soon as you delete the entire cache, which can’t be the problem with our powerful server. We currently have the plugin running under the subdomain https://tinyurl.com/2bhwt8rb so you can take a look for yourself. Settings are up to date as mentioned, nginx cache entered, cookies exclude for geo ip set and geo location entered. We may have rong settings, we can also give you access. Please note that you must have a VPN from Germany activated on the domain, otherwise the IP detection always redirects you to the international site!!!

    • This reply was modified 3 months, 2 weeks ago by spielo.
Viewing 15 replies - 1 through 15 (of 51 total)