Redis Cache plugin causing unnecessary redirects
-
Hello,
In the at least two latest plugin versions there is an issue with admin.css file causing unnecessary redirects each time when WordPress dashboard is opened.
The issue is pretty simple. In file:
/redis-cache/includes/class-plugin.phpon the line 336 there is an extra trailing slash:
wp_enqueue_style( 'redis-cache', WP_REDIS_PLUGIN_DIR . '/assets/css/admin.css', [], WP_REDIS_VERSION );While the constant WP_REDIS_PLUGIN_DIR already has it added by the plugin_dir_url function:
define( 'WP_REDIS_PLUGIN_DIR', plugin_dir_url( WP_REDIS_FILE ) );In result this creates a path of:
/wp-content/plugins/redis-cache//assets/css/admin.css?ver=2.5.3which then redirects to:
/wp-content/plugins/redis-cache/assets/css/admin.css?ver=2.5.3The redirect could be caused also by my .htaccess file configuration (haven’t checked it), but either way – a semantic way is to use one trailing slash instead of two.
I hope I helped you with this little bug report. 🙂
Regards,
Edgars from Media 24
The topic ‘Redis Cache plugin causing unnecessary redirects’ is closed to new replies.