Error with User Profile Shortcode
Support › MB User Profile › Error with User Profile ShortcodeResolved
- This topic has 1 reply, 2 voices, and was last updated 4 years, 9 months ago by
Long Nguyen.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
July 28, 2020 at 5:57 AM #20980
SL
ParticipantWhether I paste the shortcode provided in the docs or I used do_shortcode() myself on the php template, I get these errors when trying to use the frontend User Profile. (I replaced my website name with 'mywebsite', and I hosting this project locally)
Warning: Creating default object from empty value in C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Shortcodes\Info.php on line 62 Fatal error: Uncaught Error: Call to undefined method stdClass::enqueue() in C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Base.php:59 Stack trace: #0 C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Info.php(43): MBUP\Forms\Base->render() #1 C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Shortcodes\Base.php(42): MBUP\Forms\Info->render() #2 C:\xampp\htdocs\www.mywebsite.com\wp-includes\shortcodes.php(343): MBUP\Shortcodes\Base->shortcode(Array, '', 'mb_user_profile...') #3 [internal function]: do_shortcode_tag(Array) #4 C:\xampp\htdocs\www.mywebsite.com\wp-includes\shortcodes.php(218): preg_replace_callback('/\\[(\\[?)(mb_use...', 'do_shortcode_ta...', '\n[mb_user_profi...') #5 C:\xampp\htdocs\www.mywebsite.com\wp-includes\class-wp-hook.php(287): do_shortcode('\n[mb_user_profi...') #6 C:\xampp\htdocs\www.mywebsite.com\wp-includ in C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Base.php on line 59
Warning: Creating default object from empty value in C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Shortcodes\Info.php on line 62 Fatal error: Uncaught Error: Call to undefined method stdClass::enqueue() in C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Base.php:59 Stack trace: #0 C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Info.php(43): MBUP\Forms\Base->render() #1 C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Shortcodes\Base.php(42): MBUP\Forms\Info->render() #2 C:\xampp\htdocs\www.mywebsite.com\wp-includes\shortcodes.php(343): MBUP\Shortcodes\Base->shortcode(Array, '', 'mb_user_profile...') #3 [internal function]: do_shortcode_tag(Array) #4 C:\xampp\htdocs\www.mywebsite.com\wp-includes\shortcodes.php(218): preg_replace_callback('/\\[(\\[?)(mb_use...', 'do_shortcode_ta...', '[mb_user_profil...') #5 C:\xampp\htdocs\www.mywebsite.com\wp-content\themes\mywiki-child\full-width-template-profile.php(20): do_shortcode('[mb_user_profil...') #6 C:\xampp\htdocs\ in C:\xampp\htdocs\www.mywebsite.com\wp-content\plugins\meta-box-aio\vendor\meta-box\mb-user-profile\src\Forms\Base.php on line 59
July 28, 2020 at 9:43 AM #20987Long Nguyen
ModeratorHi there,
Please make sure that you pass the correct meta box ID to the shortcode.
[mb_user_profile_info id="meta-box-id"]
You can get the meta box ID with the Builder https://share.getcloudapp.com/Blu57Xd8
or add to the codeadd_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $meta_boxes[] = array( 'title' => 'Contact Info', 'type' => 'user', 'id' => 'user-meta-box', // meta box ID 'fields' => array( ... ), ); return $meta_boxes; } );
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.