Error: React.cloneElement(…): The argument must be a React element, but you pa
-
Hello,
This morning I am encountering an issue with my WordPress site when attempting to customize some blocks through the Customize link in the top admin bar. Whenever I try to make changes to blocks , such as modifying titles or paragraphs, an error occurs. Yesterday everything was working as usualThe error message I receive is as follows:
Error: React.cloneElement(...): The argument must be a React element, but you passed null. at e.cloneElement (https://bottegatoscanaidaho.com/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=heartbeat,customize-base,customize-controls,customize-widgets,react&ver=6.4.3:18:7964) at https://site.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks-vendors.js?ver=0b6a0d8207806c01caa1:10:45262 at wt (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:47637) at dr (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:54880) at js (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:122633) at wl (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:88659) at bl (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:88587) at yl (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:88450) at il (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:85274) at fl (https://site.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:85661)Additionally, here is the console output when the error occurs:
react-dom.min.js?ver=18.2.0:10 Error: React.cloneElement(...): The argument must be a React element, but you passed null. at e.cloneElement (load-scripts.php?c=1&load%5Bchunk_0%5D=heartbeat,customize-base,customize-controls,customize-widgets,react&ver=6.4.3:18:7964) at wc-blocks-vendors.js?ver=0b6a0d8207806c01caa1:10:45262 at wt (react-dom.min.js?ver=18.2.0:10:47637) at dr (react-dom.min.js?ver=18.2.0:10:54880) at js (react-dom.min.js?ver=18.2.0:10:122633) at wl (react-dom.min.js?ver=18.2.0:10:88659) at bl (react-dom.min.js?ver=18.2.0:10:88587) at yl (react-dom.min.js?ver=18.2.0:10:88450) at il (react-dom.min.js?ver=18.2.0:10:85274) at fl (react-dom.min.js?ver=18.2.0:10:85661)I have taken the following steps to troubleshoot the issue:
- Disabled all plugins except WooCommerce, but the problem persists.
- Verified that WooCommerce is up to date ( and all the rest).
- Checked for any JavaScript errors in the browser console, which revealed the error message mentioned above.
- Cleared browser cache and disabled browser extensions, but the problem remains.
- Ensured that my theme is updated to the latest version and compatible with my WordPress version. I’m using the latest version of GeneratePress.
- Disabling only Woocommerce, and in this case the error disappear and I can use the customizer.
Despite these efforts, the error persists. The only way to modify those blocks, with WooCommerce activated, is to go to /wp-admin/widgets.php and edit them directly without going through the “customize” link.
Do you happen to know if there are any incompatibilities between the latest WooCommerce and GeneratePress?
Could you please assist me in resolving this issue? Any guidance or suggestions would be greatly appreciated.
Thank you for your help.
P.S. I’ve noticed that the issue occurs on blocks with paragraphs and titles. For example, if I try to edit a menu or the ‘store notice’, or the site title and description, the error does not appear
The topic ‘Error: React.cloneElement(…): The argument must be a React element, but you pa’ is closed to new replies.