Error with Section Block Background Videos in Multisite Mode
-
I’ve uncovered an error with the Background videos from YouTube in the Section block. This error only happens when in Multisite Mode.
In Multisite Mode, only users with Super Admin privileges can successfully add YouTube background videos in the Section Block. For all other user roles, you can add the video, but the video will not display on the front end, and when you go back in to try to edit the page, the Section block is corrupted, and you get the Attempt Block Recovery prompt.
When you click Attempt Block Recovery, the Section block recovers everything but the YouTube Link itself.If a Super Admin creates the Section block, everything works as expected. If any other role then tries to edit the page, the video is lost once the changes are Updated and the page is viewed on the front end.
I tested this on a clean install of 6.2.2 running the Twenty Twenty-Three theme and no other plugins in both Multisite and Single Site mode. The issue only happens on Multisite. All default roles can use the Section block as expected on Single Site Mode. It is ONLY in Multisite mode, with the addition of the Super Admin role that the problem occurs.
Steps needed to replicate:
- Clean install of latest release of WP Core
- Activate multisite mode
- Install Getwid
- Create test users with various core roles
- Create page or post as Super Admin
- Add Section block, give it a height, and add YouTube link in background under Style panel
- Update & Publish Post
- View post
All works as expected. Now:
- Log out and log back in as another role
- Create a post
- Add the section block with a youtube background video
- Update & Publish post
- View post
The page should be blank other than the video controls. A quick look at Inspector shows the following errors:
jQuery.Deferred exception: Cannot read properties of undefined (reading 'match') TypeError: Cannot read properties of undefined (reading 'match') at n (https://clean.local/wp-content/plugins/getwid/assets/js/frontend.blocks.js?ver=1.9.1:7:598) at HTMLDivElement.<anonymous> (https://clean.local/wp-content/plugins/getwid/assets/js/frontend.blocks.js?ver=1.9.1:7:3307) at Function.each (https://clean.local/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:3003) at e.<computed>.each (https://clean.local/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:1481) at c (https://clean.local/wp-content/plugins/getwid/assets/js/frontend.blocks.js?ver=1.9.1:7:3252) at HTMLDocument.<anonymous> (https://clean.local/wp-content/plugins/getwid/assets/js/frontend.blocks.js?ver=1.9.1:7:5208) at e (https://clean.local/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:30158) at t (https://clean.local/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:30460) undefined S.Deferred.exceptionHook @ jquery.min.js?ver=3.6.4:2 jquery.min.js?ver=3.6.4:2 Uncaught TypeError: Cannot read properties of undefined (reading 'match') at n (frontend.blocks.js?ver=1.9.1:7:598) at HTMLDivElement.<anonymous> (frontend.blocks.js?ver=1.9.1:7:3307) at Function.each (jquery.min.js?ver=3.6.4:2:3003) at e.<computed>.each (jquery.min.js?ver=3.6.4:2:1481) at c (frontend.blocks.js?ver=1.9.1:7:3252) at HTMLDocument.<anonymous> (frontend.blocks.js?ver=1.9.1:7:5208) at e (jquery.min.js?ver=3.6.4:2:30158) at t (jquery.min.js?ver=3.6.4:2:30460)
These errors do not appear when the block is created and updated by the Super Admin.
I also tested with self-hosted video and the issues are the same.
The page I need help with: [log in to see the link]
- The topic ‘Error with Section Block Background Videos in Multisite Mode’ is closed to new replies.