reduxframework / redux-framework-4

Redux v4
https://redux.io/redux-4/
Other
96 stars 32 forks source link

WPVIP FileSystem #190

Open lazardanlucian opened 3 years ago

lazardanlucian commented 3 years ago

Hello, we are using wordpress vip hosting (hosted by automattic) We are preparing to move to php74 and we were testing latest stable version of redux, 4.1.24

This version breaks compatibility with wpvips f.s. but redux 3.x works

In our local development this works ( because we have a normal file system )

if any of you intend to try to fix this, here is some documentation: https://docs.wpvip.com/technical-references/vip-go-files-system/media-uploads/

E_COMPILE_ERROR: require_once(): Failed opening required 'vip://wp-content/uploads/sites/39/redux/version' (include_path='.') in Redux_Filesystem::get_local_file_contents called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-filesystem.php (648) in Redux_Filesystem::get_contents called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-filesystem.php (316) in Redux_Filesystem::generate_default_files called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-filesystem.php (176) in Redux_Filesystem::maybe_init_wp_filesystem called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-filesystem.php (107) in Redux_Filesystem::construct called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-filesystem.php (130) in Redux_Filesystem::get_instance called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-filesystem.php (1050) in require_once called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-autoloader.php (84) in Redux_Autoloader::load called at ? (?) in spl_autoload_call called at /var/www/wp-content/plugins/redux-framework/redux-core/framework.php (443) in ReduxFramework::construct called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-api.php (379) in Redux::load_redux called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-api.php (298) in Redux::loadRedux called at /var/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-api.php (403) in Redux::create_redux called at /var/www/wp-includes/class-wp-hook.php (287) in WP_Hook::apply_filters called at /var/www/wp-includes/class-wp-hook.php (311) in WP_Hook::do_action called at /var/www/wp-includes/plugin.php (484) in do_action called at /var/www/wp-settings.php (535) in require_once called at /var/www/wp-config.php (16) in require_once called at /var/www/wp-load.php (37) in require_once called at /var/www/wp-admin/admin.php (34) in require_once called at /var/www/wp-admin/index.php (10)

lazardanlucian commented 3 years ago

From their documentation.

Because communication with the VIP File System happens over HTTP, high number of function calls (e.g. lots of file_exists checks) can result in a performance hit and should be used with caution.

file_exists will always return true for extension-free values (e.g. directory names).

This sounds like directories under wp-content will return true even if they don't exist.

I'm still playing with it in my fork but nothing yet.

kprovance commented 3 years ago

ANy update on this @lazardanlucian? If so, I would need to know specifically what block of code is giving you an issue. We have no way to test on the VIP filesystem, so it's all guesswork here.