Forum Replies Created

Viewing 15 replies - 16 through 30 (of 38 total)
  • Thread Starter mathse

    (@mathse)

    I have to make a little update – I just tried again to update from 2.0.26 to 2.1.6 (same error as above), but the plugin is shown as installed afterwards. Doing a

    wp redis update-dropin

    afterwards results in a working plugin (version 2.1.6) and site. Nevertheless I assume that such an error should not occur.

    Thread Starter mathse

    (@mathse)

    And sorry to disturb again – seems that just an uninstall and a clean install worked for me.
    So in my test before I uninstalled 2.0.26 manually and installed 2.1.0 afterwards manually. When updating from 2.0.26 to 2.1.0 I get:

    
    Installing Redis Object Cache (2.1.0)
    Herunterladen des Installationspakets von https://downloads.wordpress.org/plugin/redis-cache.2.1.0.zip ...
    Entpacken des Pakets ...
    Das Plugin wird installiert ...
    Die alte Version des Plugins wird entfernt...
    Das Plugin wurde erfolgreich aktualisiert.
    [18-Jul-2022 21:13:00 UTC] PHP Fatal error:  Uncaught Error: Class "Predis\Command\KeyDelete" not found in /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Profile/RedisProfile.php:92
    Stack trace:
    #0 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Client.php(323): Predis\Profile\RedisProfile->createCommand('DEL', Array)
    #1 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Client.php(314): Predis\Client->createCommand('del', Array)
    #2 /var/www/html/wp-content/object-cache.php(1289): Predis\Client->__call('del', Array)
    #3 /var/www/html/wp-content/object-cache.php(96): WP_Object_Cache->delete('update_plugins', 'site-transient', 0)
    #4 /var/www/html/wp-includes/option.php(1865): wp_cache_delete('update_plugins', 'site-transient')
    #5 /var/www/html/wp-admin/includes/plugin.php(2294): delete_site_transient('update_plugins')
    #6 /var/www/html/wp-includes/class-wp-hook.php(305): wp_clean_plugins_cache()
    #7 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #8 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #9 /var/www/html/wp-admin/includes/class-wp-upgrader.php(858): do_action('upgrader_proces...', Object(WP_CLI\DestructivePluginUpgrader), Array)
    #10 /var/www/html/wp-admin/includes/class-plugin-upgrader.php(137): WP_Upgrader->run(Array)
    #11 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(552): Plugin_Upgrader->install('https://downloa...')
    #12 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php(209): Plugin_Command->install_from_repo('redis-cache', Array)
    #13 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(809): WP_CLI\CommandWithUpgrade->install(Array, Array)
    #14 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(658): Plugin_Command->install(Array, Array)
    #15 [internal function]: Plugin_Command->update(Array, Array)
    #16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
    #17 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
    #18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
    #19 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(417): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
    #20 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(440): WP_CLI\Runner->run_command(Array, Array)
    #21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): WP_CLI\Runner->run_command_and_exit()
    #22 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #23 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
    #24 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #25 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
    #26 /usr/local/bin/wp(4): include('phar:///usr/loc...')
    #27 {main}
      thrown in /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Profile/RedisProfile.php on line 92
    Fatal error: Uncaught Error: Class "Predis\Command\KeyDelete" not found in /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Profile/RedisProfile.php:92
    Stack trace:
    #0 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Client.php(323): Predis\Profile\RedisProfile->createCommand('DEL', Array)
    #1 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Client.php(314): Predis\Client->createCommand('del', Array)
    #2 /var/www/html/wp-content/object-cache.php(1289): Predis\Client->__call('del', Array)
    #3 /var/www/html/wp-content/object-cache.php(96): WP_Object_Cache->delete('update_plugins', 'site-transient', 0)
    #4 /var/www/html/wp-includes/option.php(1865): wp_cache_delete('update_plugins', 'site-transient')
    #5 /var/www/html/wp-admin/includes/plugin.php(2294): delete_site_transient('update_plugins')
    #6 /var/www/html/wp-includes/class-wp-hook.php(305): wp_clean_plugins_cache()
    #7 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #8 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #9 /var/www/html/wp-admin/includes/class-wp-upgrader.php(858): do_action('upgrader_proces...', Object(WP_CLI\DestructivePluginUpgrader), Array)
    #10 /var/www/html/wp-admin/includes/class-plugin-upgrader.php(137): WP_Upgrader->run(Array)
    #11 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(552): Plugin_Upgrader->install('https://downloa...')
    #12 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php(209): Plugin_Command->install_from_repo('redis-cache', Array)
    #13 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(809): WP_CLI\CommandWithUpgrade->install(Array, Array)
    #14 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(658): Plugin_Command->install(Array, Array)
    #15 [internal function]: Plugin_Command->update(Array, Array)
    #16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
    #17 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
    #18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
    #19 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(417): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
    #20 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(440): WP_CLI\Runner->run_command(Array, Array)
    #21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): WP_CLI\Runner->run_command_and_exit()
    #22 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #23 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
    #24 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #25 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
    #26 /usr/local/bin/wp(4): include('phar:///usr/loc...')
    #27 {main}
      thrown in /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Profile/RedisProfile.php on line 92
    • This reply was modified 3 years, 10 months ago by mathse.
    • This reply was modified 3 years, 10 months ago by Jan Dembowski.
    Thread Starter mathse

    (@mathse)

    @tillkruess and updating then from 2.1.0 to 2.1.1 worked flawlessly… no errors anymore.

    Thread Starter mathse

    (@mathse)

    @tillkruess Yes, just tried upgrading to 2.1.0 (from 2.0.26) and this worked without issues.

    Thread Starter mathse

    (@mathse)

    I just wanted to confirm that rolling back with wp-cli to 2.0.26 “fixes” the issue.
    With wp-cli it’s just a:

    
    wp plugin deactivate redis-cache
    wp plugin uninstall redis-cache
    wp plugin install --version=2.0.26 redis-cache
    wp plugin activate redis-cache
    wp redis update-dropin
    

    Afterwards my site worked again.
    Note: on the first step (deactivating the plugin) I got the following error:

    
    Predis\Connection\ConnectionException: Error while reading line from the server. [tcp://redis:6379] in /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Connection/AbstractConnection.php:132
    Stack trace:
    #0 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Connection/StreamConnection.php(286): Predis\Connection\AbstractConnection->onConnectionError('Error while rea...')
    #1 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Connection/AbstractConnection.php(120): Predis\Connection\StreamConnection->read()
    #2 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Connection/AbstractConnection.php(112): Predis\Connection\AbstractConnection->readResponse(Object(Predis\Command\Redis\FLUSHDB))
    #3 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Client.php(316): Predis\Connection\AbstractConnection->executeCommand(Object(Predis\Command\Redis\FLUSHDB))
    #4 /var/www/html/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Client.php(299): Predis\Client->executeCommand(Object(Predis\Command\Redis\FLUSHDB))
    #5 /var/www/html/wp-content/object-cache.php(1644): Predis\Client->__call('flushdb', Array)
    #6 /var/www/html/wp-content/object-cache.php(125): WP_Object_Cache->flush(0)
    #7 /var/www/html/wp-content/plugins/redis-cache/includes/class-plugin.php(1127): wp_cache_flush()
    #8 /var/www/html/wp-includes/class-wp-hook.php(309): Rhubarb\RedisCache\Plugin->on_deactivation('redis-cache/red...')
    #9 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #10 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #11 /var/www/html/wp-admin/includes/plugin.php(775): do_action('deactivate_plug...', 'redis-cache/red...', false)
    #12 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(413): deactivate_plugins('redis-cache/red...', false, NULL)
    #13 [internal function]: Plugin_Command->deactivate(Array, Array)
    #14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
    #15 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
    #16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
    #17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(417): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
    #18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(440): WP_CLI\Runner->run_command(Array, Array)
    #19 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): WP_CLI\Runner->run_command_and_exit()
    #20 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
    #22 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #23 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
    #24 /usr/local/bin/wp(4): include('phar:///usr/loc...')
    #25 {main}

    `

    • This reply was modified 3 years, 10 months ago by mathse.
    • This reply was modified 3 years, 10 months ago by mathse.
    • This reply was modified 3 years, 10 months ago by mathse.
    • This reply was modified 3 years, 10 months ago by mathse.
    Thread Starter mathse

    (@mathse)

    Wow! Thanks for the fast reply and the quick fix!
    Great work and great Plugin!

    Greetings

    mathse

    Thread Starter mathse

    (@mathse)

    Thanks again for your reply!
    I found the cause of the issue. Mails are only sent, if I enable:

    E-Mail-Benachrichtigung senden, wenn der Kommentar genehmigt wurde

    Strange is: Intuitively I thought, that the plugin sends mails when I allow replies to someones comment without this checkbox enabled. But it just sends mails, if I enable this checkbox.
    So, when enabling this checkbox, everything works as expected. Is this intended?

    Greetings

    mathse

    Thread Starter mathse

    (@mathse)

    Hello,

    I host my own mailserver and I see that no Mail goes out (is sent).
    I can use wp_mail with
    https://wordpress.org/plugins/check-email/

    so this should be not the issue.
    Any things, that I could do to debug this further?
    The last mail was sent on June 29 – since I update plugins regularly, maybe this was the date of an update of the plugin?

    Thanks for the quick reply and greetings

    mathse

    Thread Starter mathse

    (@mathse)

    Hello @psykro,

    thank you so much for your review of the code and hints to improve it.
    I just applied all your proposals and everything works fine!

    So thanks again for all the help here – I will mark now the topic as solved.

    Greetings

    mathse

    Thread Starter mathse

    (@mathse)

    @psykro Today I found some time to dig deeper into WP and integration of JS and I think I could integrate your code – it works as expected and I don’t get auto embeds anymore, as expected but still have the embed blocks available: so all in all great!

    Could you please have a look at my code, because I’m not quite sure if I need wp_enqueue_script of if this could be implemented easier?
    Here is the main plugins php file:

    <?php
    /* plugin name: disable auto embed
     * Description: Remove auto embedding on pasting links
     */
    
    function disable_scripts() {
    
      $scriptPath = '/js/disabler.js';
    
      // Enqueue frontend and editor JS
      wp_enqueue_script(
        'disable-auto-embed-js',
        plugins_url( $scriptPath, __FILE__ )
      );
    
    }
    
    add_filter('enqueue_block_editor_assets', 'disable_scripts');
    
    ?>

    And in the /js/disabler.js file is your code.
    Just because you didn’t mention wp_enqueue_script() I’m not quite sure, whether I need it and it would be great to get some feedback here.

    Thanks so much again and greetings

    mathse

    • This reply was modified 4 years ago by mathse.
    Thread Starter mathse

    (@mathse)

    Hi @psykro,

    thanks for the explanation. I will read into the topic and give your code a try in a few days, since I’m pretty busy at the moment.
    I will give you a feedback in some days – I just wanted to say thanks for the great help.

    Greetings

    mathse

    Thread Starter mathse

    (@mathse)

    @psykro Thanks for your detailled reply!
    I have a small question (since I’m pretty new to WP developing).
    Up to now I only wrote some small “must use plugins”, which I put under /wp-content/mu-plugins/

    I would prefer such an approach with your code, too, since I don’t want to change a theme, but I have problems getting your code to work.
    My naive approach was:

    
    <?php
    /* plugin name: remove auto embed
     * Description: Remove auto embedding on pasting links
     */
    
    add_filter('enqueue_block_editor_assets', 'filterEmbedBlock');
    
    function filterEmbedBlock( settings, name ) {
    	if ( name !== 'core/embed' ) {
    		return settings;
    	}
    	settings = lodash.omit(settings, 'transforms.from');
    	return settings;
    }
    
    ?>

    `

    This leads directly to an error:

    PHP message: PHP Parse error: syntax error, unexpected token “,”, expecting variable in /var/www/html/wp-content/mu-plugins/disable_embed.php on line 9

    Could you give me another hint here, how I can achieve what I want?
    Thanks and greetings!

    • This reply was modified 4 years ago by mathse.
    Thread Starter mathse

    (@mathse)

    Hi @akirk,

    unfortunately I don’t have control over what is pasted.
    The problem is: all the blogger don’t want an embedded link (and therefore I block all “output” connections in my firewall).
    Unfortunately, many blogger just paste stuff with links, therefore my firewall blocks many “output” connections and I’m getting an E-Mail on each block.
    Since nobody of the blogger wants an embed – but just a clickable link – I think it would be best, if I could disable this feature. Unfortunately many want to embed e.g. youtube (which is also whitelisted in the firewall), so this block should work as it is.

    Thread Starter mathse

    (@mathse)

    Hello again @justinwyllie,

    yes, I get into line 7452 and afterwards, if I step through, I end in line 37 (which is very long) and starts with:

    
    */!function(){"use strict";var n={}.hasOwnProperty;function o(){f

    afterwards I reach line 32, which is even longer and barely unreadable and it goes

    The HTML inspector doesn’t show an added element.
    I really don’t know, why this element is not added in my case?!

    Also WordPress doesn’t give any suspicious output – everything looks normal.

    Any further ideas, what I could do now?

    Thread Starter mathse

    (@mathse)

    Hello,

    thanks @justinwyllie for the detailed instructions!
    I tried it and the function gets called (chrome pauses executing with the breakpoint).
    But no new elemfent gets added.

    Here is a screenshot of the breakpoint “in action”:
    https://paste.pics/ecd98adc34bd1ec46cd0f9f9aa12b6b1

    Strange, that I have this problem here?!

    Greetings
    mathse

Viewing 15 replies - 16 through 30 (of 38 total)