[Resolved] Toolset Forms User Edit Link Causes Fatal Error
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user is getting the fatal error.
Fatal error: Uncaught Error: Class 'OTGS\Toolset\CRED\Model\Shortcode\Form\Link\WP_User' not found in /Applications/MAMP/htdocs/stable/wp-content/plugins/cred-frontend-editor/application/models/shortcode/form/link/user.php on line 152 ( ! ) Error: Class 'OTGS\Toolset\CRED\Model\Shortcode\Form\Link\WP_User' not found in /Applications/MAMP/htdocs/stable/wp-content/plugins/cred-frontend-editor/application/models/shortcode/form/link/user.php on line 152
Solution:
This issue was actually resolved in the latest version of our Toolset forms plugin so it should no longer occur.
This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
On my live site I have:
Forms Version 2.1
Types Version 3.0.8
Views Version 2.6.3
(all other plugins are the latest versions)
I upgraded my staging site to
Forms Version 2.1.1
Types Version 3.1
Views Version 2.6.4
With this shortcode in my content type single template:
[toolset-edit-user-link content_template_slug="user-edit"]Edit Basic Profile[/toolset-edit-user-link]
I get the following message when viewing the post
Fatal error: Uncaught Error: Class 'OTGS\Toolset\CRED\Model\Shortcode\Form\Link\WP_User' not found in /home/ibew5366/staging/1/wp-content/plugins/cred-frontend-editor/application/models/shortcode/form/link/user.php:152 Stack trace: #0 /home/ibew5366/staging/1/wp-content/plugins/cred-frontend-editor/application/models/shortcode/base_view.php(31): OTGS\Toolset\CRED\Model\Shortcode\Form\Link\User->get_value(Array, 'Edit Basic Prof...') #1 /home/ibew5366/staging/1/wp-includes/shortcodes.php(319): CRED_Shortcode_Base_View->render(Array, 'Edit Basic Prof...', 'toolset-edit-us...') #2 [internal function]: do_shortcode_tag(Array) #3 /home/ibew5366/staging/1/wp-includes/shortcodes.php(197): preg_replace_callback('/\\[(\\[?)(toolse...', 'do_shortcode_ta...', '<tr>\n<td>[tools...') #4 /home/ibew5366/staging/1/wp-content/plugins/types-access/includes/Helper.php(1916): do_shortcode('<tr>\n<td>[tools...') #5 /home/ibew5366/staging/1/wp-content/plugins/types-access/includes/Helper.php(1870): Access_Helper::wpcf_access_do_shortcode_conte in /home/ibew5366/staging/1/wp-content/plugins/cred-frontend-editor/application/models/shortcode/form/link/user.php on line 152
<div class="form-group">
<label>Password</label><br/>
<small>Leave this blank unless you want to change your password</small>
[cred_field field='user_pass' value='' urlparam='' class='form-control' output='bootstrap']
</div>
[cred_show_group if="($(user_pass) ne '' )" mode='fade-slide']
<div class="form-group">
<label>Repeat Password</label><br/>
<small>Type the password you used in the previous field. This is to ensure that you didn't make a typo</small>
[cred_field field='user_pass2' value='' urlparam='' class='form-control' output='bootstrap']
</div>
[/cred_show_group]
<div class="form-group">
<label>Email</label><br/>
<small>This is required in case the website needs to send you a message or help reset your password.</small>
[cred_field field='user_email' value='' urlparam='' class='form-control' output='bootstrap']
</div>