-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Uncaught Error: Call to undefined method WP_Error::addThemeDir() #492
Comments
Hi @oneuniverseappz thanks for reporting the error. In order to export a theme zip, the site needs to have access to the Zip extension for PHP, to be able to create .zip files. My guess would be that your site doesn't currently have that extension enabled. Maybe you can check with your web host? This does reveal that we need better error handling here, both in the code (we shouldn't be trying to call |
Note that another user encountered this problem in #534. It seems that it's common for local dev environments that use xampp, mamp, and similar to not have the PHP zip extension enabled by default. |
Should we display some kind of error message when the |
Yes, that seems appropriate! |
ERROR on Creating a Child Theme, OR, Cloning a Theme. Help !
Wordpress Version 6.4.2
Installed Theme - Twenty Twenty-Four Version: 1.0
Fatal error: Uncaught Error: Call to undefined method WP_Error::addThemeDir() in D:\ThemeBuilder\wp-content\plugins\create-block-theme\admin\create-theme\theme-zip.php:103 Stack trace: #0 D:\ThemeBuilder\wp-content\plugins\create-block-theme\admin\class-create-theme.php(266): Theme_Zip::add_templates_to_zip(Object(WP_Error), 'user', 'sample2024new...') #1 D:\ThemeBuilder\wp-content\plugins\create-block-theme\admin\class-create-theme.php(470): Create_Block_Theme_Admin->create_child_theme(Array, Array) #2 D:\ThemeBuilder\wp-includes\class-wp-hook.php(324): Create_Block_Theme_Admin->blockbase_save_theme('') #3 D:\ThemeBuilder\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 D:\ThemeBuilder\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #5 D:\ThemeBuilder\wp-admin\admin.php(175): do_action('admin_init') #6 D:\ThemeBuilder\wp-admin\themes.php(10): require_once('D:\Programs\Xam...') #7 {main} thrown in D:\ThemeBuilder\wp-content\plugins\create-block-theme\admin\create-theme\theme-zip.php on line 103
The text was updated successfully, but these errors were encountered: