Archived topic
Problem With widgets
2 replies · Started by Anastasia on November 29, 2022
Greetings everyone,
I have a quite important issue that occured.
I am trying to add different content elements which work differently for mobile version inside footer column areas.
For Col1 everything goes like a charm.
For Col2 when I add the 2nd block for the mobile menu, Widgets crash and I get the error "Cannot read properties of undefined (reading 'map')"
In order to unstuck this bug I need to to my functions.php this filter add_filter( 'use_widgets_block_editor', '__return_false' ); then I need to delete everything inside the default widget panel, comment the filter code in functions.php and this actually resets the widgets.
Do you have any kind of idea why all this is happening and how can be configured to work properly?
Wp Version: 6.1.1
GeneratePress: 3.2.4
GenerateBlocks Pro: 1.4.0
GP Premium: 2.2.1
Also I took some printsreens in order to check what I've done and triggered the error
Hi there,
if you can Right Click > Inspect the page to open the browser developers tools before the error occurs, when the error occurs you should see some info in the Developers tools console tab, which may give you some pointers on what is causing the error. But the Theme itself has no responsibility here.
May it would be better to use a Block Element to build a custom footer ?
https://docs.generatepress.com/article/block-element-site-footer/
core-data.min.js?ver=d8d458b31912f858bcdf:2 Uncaught TypeError: Cannot read properties of undefined (reading 'blocks')
at core-data.min.js?ver=d8d458b31912f858bcdf:2:14225
at Array.reduce (<anonymous>)
at core-data.min.js?ver=d8d458b31912f858bcdf:2:14200
at data.min.js?ver=d8cf5b24f99c64ae47d6:2:10550
at redux-routine.min.js?ver=c9ea6c0df793258797e6:9:790
at data.min.js?ver=d8cf5b24f99c64ae47d6:2:9384
at Object.dispatch (data.min.js?ver=d8cf5b24f99c64ae47d6:2:10493)
at data.min.js?ver=d8cf5b24f99c64ae47d6:2:14530
at core-data.min.js?ver=d8d458b31912f858bcdf:2:48620
at block-editor.min.js?ver=0c7c9b9a74ceb717d6eb:26:199734
that is the error I get