Bug : Wrong way to get plugin path generating fatal error

Posted in: Newspaper
Post count: 2

In /includes/wp_booster/wp-admin/panel/td_view_theme_plugins.php lin 98 :
$plugins_path = ABSPATH . 'wp-content/plugins';

As WordPress allow to define a custom plugin path, the theme should use WP_PLUGIN_DIR to get the correct plugin path
Fix :
$plugins_path : WP_PLUGIN_DIR;

If not, and if user use custom plugin path (with define(‘WP_PLUGIN_DIR’, ‘/app/plugin’)), it will not work and causing trouble to manage bundled plugins with the theme :

Warning: fopen(......./wp-content/plugins/td-composer/td-composer.php): failed to open stream: No such file or directory

  • This topic was modified 8 years by patrice. Reason: change category theme of the topic
Post count: 2

This problem still occur after the last update.
Could you fix it ?? it will take you only 3 seconds …. I have to edit the theme file each update ….
With the new plugin update, it’s only necessery to replace a few occurrences, like :

$plugin_data = get_plugin_data(ABSPATH . ‘wp-content/plugins/’ . $plugin);
replace in td_wp_booster_function.php by
$plugin_data = get_plugin_data(WP_PLUGIN_DIR .’/’. $plugin);
etc…

  • This reply was modified 8 years by patrice.
Post count: 22421

Hello,

Thank you for pointing this out. I will pass this message onto our developers and we will consider it.

Thanks for understanding.

Post count: 780

Hi and sorry for the delay,
I’ve looked at your suggestion, unfortunately, as you can see here https://codex.wordpress.org/Determining_Plugin_and_Content_Directories It is not recommended for themes and plugins to use that constant. https://www.screencast.com/t/SQ4qC1prrha0

Can you give me more details… for example how WordPress allows changing the plugin path?

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.