Skip Navigation

[Resolved] REST API for Views is missing the required permission_callback argument

This support ticket is created 4 years, 4 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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by kelvinL-2 4 years, 4 months ago.

Author
Posts
#1817225
Screenshot 2020-10-20 at 3.50.24 PM.png
Screenshot 2020-10-20 at 3.42.03 PM.png

Dear Sir/Madam,

I have a site which was built several years ago. Recently I upgrade the WP to latest version and PHP at 7.4.11. When I visit the dashboard Toolset > Setting, I got REST API error message, although it looks not affecting the frontend, I am not sure whether it is a potential problem that I can foresee. I do update all the Toolset plugins to the latest version but Layouts and Views have been installed. There are a lot of Views on this site, do I need to replace it with the blocks? Can all the Views be kept if I install the blocks instead?

Please advise what I should do to fix this issue.

Best regards,

Kelvin.

#1817415

Not sure whether this error message can help

Fatal error: Uncaught Error: Call to undefined function get_home_path() in /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-content/themes/toolset-starter-child/functions.php:35 Stack trace: 
#0 /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-includes/shortcodes.php(343): func_car_gallery() 
#1 [internal function]: do_shortcode_tag() #2 /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-includes/shortcodes.php(218): preg_replace_callback() 
#3 /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-includes/class-wp-hook.php(287): do_shortcode() 
#4 /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-includes/plugin.php(206): WP_Hook->apply_filters() 
#5 /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-content/plugins/wp-views/embedded/inc/wpv-api.php(316): apply_filters() 
#6 /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-content/plugins/layouts/inc/cell_types/wpddl.cell_views_content_template.class.php(57): render_vie in /var/www/vhosts/hkmig.net/public_html/hosting/hicar.com.hk/www/wp-content/themes/toolset-starter-child/functions.php on line 35
#1817511

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I expect that REST error message is because you are not using the latest version of Views. Layouts and Views have been temporarily removed from the automatic installer and need to be updated manually from the downloads page: toolset.com/account/downloads

You can switch Views to Blocks if you like (Blocks is included in the custom Toolset installer). They are basically the same plugin, but expose different interfaces by default for creating Views, templates etc. If you install Blocks instead of Views (they cannot both be active), then go to Toolset > Settings and from there you can specify that it should use the legacy Views interface, in which case the plugin should function the same as Views.

There is a minor update for Layouts available which you will need to manually install.

As for the fatal error you shared, first update the plugins to see if it is resolved. If not, it is coming from some custom code added to your child theme's functions.php file (line 35). Please share that section of code, we may be able to spot the problem.

#1819057

My issue is resolved now. Thank you!