Forum Replies Created

Viewing 15 replies - 1 through 15 (of 58 total)
  • Thread Starter julianoe

    (@julianoe)

    I want to add that Jetpack confirmed to me the reason I don’t want it on my website (outside of this test): the second I installed it I received an email, which is unnecessary and an intrusive use of my admin email address.

    I’ll be watching this thread for response and give further information if needed to debug. Thanks again.

    Thread Starter julianoe

    (@julianoe)

    Hello back!

    I’ve updated the website, disabled Wp Super Cache (and all plugins that could be causing issues) and enabled Jetpack Boost… but the issue persists. You can view it on the website.
    Thanks for you insights.

    Thread Starter julianoe

    (@julianoe)

    As you can see on the website it did not solve the problem and caused other issues to change the CSP like this. I’m running out of options here.

    Thread Starter julianoe

    (@julianoe)

    Hi! I disabled several times to confirm the issue persisted and it did. Actually I had disabled the plugin to prevent problems. Previous to post this issue I re-enabled the caching plugin to show you how it causes problems.

    I will explore the solutions you suggest and come back. Thanks

    Thread Starter julianoe

    (@julianoe)

    I’m not sure I understand your answer: of course I’m using a Caching plugin, we are discussing an issue about WP Super Cache.
    Also I don’t have Jetpack installed because I don’t need its features but it is not a requirement for Wp Super Cache to work so it should not be an issue.

    The security plugins I have are : Disable XML-RPC and WPS Hide Login to prevent spam requests on the server and Akismet, which I doubt causes troubles with this.
    Just for good measures I disabled the two plugins mentioned, wiped the cache. The issue persists. As I said I tested with 0 plugins and I have the issue anyway with WP Super Cache.

    I had a special .htaccess config so I disabled this too and moved back to the default WordPress one, which I reproduced below:

    # BEGIN WordPress
    # Les directives (lignes) entre ??BEGIN WordPress?? et ??END WordPress?? sont générées
    # dynamiquement, et doivent être modifiées uniquement via les filtres WordPress.
    # Toute modification des directives situées entre ces marqueurs sera surchargée.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    I don’t know what else to investigate. I don’t see what could mess up the CSP ou could control it other than the caching plugin. Or a setting inside WOrdpress I don’t know of (this is a very old website even though it is fully updated). Any idea?

    Thread Starter julianoe

    (@julianoe)

    I’m having the issue on this blog https://www.geeks-curiosity.net/jadis-looking-backward/ This is an example post but all others that contain a youtube embed have the same issue. For example https://www.geeks-curiosity.net/rymdreglage/

    When I disable the plugin, the issue disappears. I’ve turned this around but can’t understand where it comes from. I’ve tried with default theme and no plugins and the issue seems to persist.

    Thread Starter julianoe

    (@julianoe)

    Thanks for considering it. And for providing the link to the readme with instructions to use the filter. Thanks !

    Thread Starter julianoe

    (@julianoe)

    Not very surprised about the numbers. The ratio of websites using WordPress to admins with skill to understand what happened and time to come open this discussion is huge. That’s the same thing for every general public oriented plugins.

    Thanks for adding the filter, but giving a on/off setting in the settings of the plugin would be better, because it would allow for non-developers to customize it.

    A lot of plugins with more settings and option pages than this one have a single menu line under Settings, I don’t think that’s a very good reason. Going to the main menu for a plugin that is not a daily use one is a bit overkill and not really a good practice.

    hcaptcha is typically the kind of plugin you want to setup once and forget about it. No need to take room in the main menu for that…

    I hope you see my point and take it for what it is: a feedback from a user caring for end users, especially not dev ones, who end up with a WordPress admin looking like a sad Christmas tree. If it was just for myself I could code a plugin to hide the menu item i don’t want in 1 minute.

    Thread Starter julianoe

    (@julianoe)

    Out the top of my head I can cite Easy WP SMTP that allows to hide their “main settings” button under the default “Settings” button, and Responsive Lightbox & Gallery also has several features you can disable to unbloat the experience of using it.

    Thread Starter julianoe

    (@julianoe)

    Could you add an option to disable that feature for people who only want to use the block part of the plugin like before and not bloat the user interface?

    Many good plugins allow the admin to disable UI interface elements they don’t use. That’d be a very good improvement.

    Thread Starter julianoe

    (@julianoe)

    I could have of course removed it entirely by commenting out the class call in functions.php in the parent theme but that’s not good practice and would want to know how to do it the proper way.

    Thanks in advance.

    Thread Starter julianoe

    (@julianoe)

    LearnPress will not be the tool for us then. I think we will look into other alternatives like Materiyo that allows to create more complex tests with ordering and matching exercises, video and audio questions, free written expression, etc

    Thread Starter julianoe

    (@julianoe)

    Any news about this? I’d be happy to have some more info as I’m trying to implement some programmatic actions related to subscribing to posts.
    Thanks.

    Thread Starter julianoe

    (@julianoe)

    For further reference if someone needs to do the same :

    function increment_view_AJAX_script() {
        $ajax_nonce = wp_create_nonce('increment_post_view_nonce');
        ?>
        <script type="text/javascript">
            jQuery(document).ready(function($) {
    
                // Trigger action only when ajax loads page use PJAX or any other triggers your system uses to load page without browser reload
                $(document).on('pjax:complete', function() {
    
    
    // find the ID in the template. Here it is in <main id="main"><article id="post-123">...</article></main>
                    var mainElement = document.getElementById('main');
                    var articleElement = mainElement.querySelector('article');
    
                    if (articleElement) {
                        var postIDFull = articleElement.getAttribute('id');
                        if (postIDFull && postIDFull.startsWith('post-')) {
    // Extract post ID from ID attribute (ex: post-643)
                            var postIDNumber = postIDFull.substring('post-'.length);
                            var postID = parseInt(postIDNumber, 10);
                            
    // Call AJAX action to increase post views
                            $.ajax({
                                url: <?php echo json_encode(admin_url('admin-ajax.php')); ?>,
                                type: 'POST',
                                data: {
                                    action: 'increment_post_view',
                                    post_id: postID,
                                    nonce: '<?php echo $ajax_nonce; ?>',
    
                                },
                                success: function(response) {
                                    
                                }
                            });
                        }
                    }
                });
            });
        </script>
        <?php
    }
    add_action('wp_footer', 'increment_view_AJAX_script', 500);
    
    /**
     * Ajax action callback that increases view on a post
     */
    function litt_increment_post_view_callback() {
        if ( isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'increment_post_view_nonce') ) {
            if (isset($_POST['post_id'])) {
                $post_id = intval($_POST['post_id']);
                pvc_view_post( $post_id );
            }
        }
        die();
    }
    add_action('wp_ajax_increment_post_view', 'litt_increment_post_view_callback');
    add_action('wp_ajax_nopriv_increment_post_view', 'litt_increment_post_view_callback'); 
    • This reply was modified 1 year, 3 months ago by julianoe.
    Thread Starter julianoe

    (@julianoe)

    That’s very clear. Thank you for your answer! ????

Viewing 15 replies - 1 through 15 (of 58 total)