Home › Toolset Professional Support › [Resolved] When activating acces control im getting maximum function nesting
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
Related documentation:
This topic contains 14 replies, has 2 voices.
Last updated by Minesh 6 years, 8 months ago.
Assisted by: Minesh.
I am trying to:
Giving access to a custom group to a custom posttype, i can do this with the members plugin. But for future use i want them to have also WPML translate access thats why i use this plugin.
Link to a page where the issue can be seen:
I got this on my own development enviroment so not really a link, i do got a screenshot of the error attached
I expected to see:
At least that i can login with this user, the problem only excist when i log in with a user of the custom group.
Instead, I got:
The seen error message
Hello. Thank you for contacting the Toolset support.
Well - can we start with basic debug step:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
Also, Could you please try following solution:
=> https://stackoverflow.com/questions/8656089/solution-for-fatal-error-maximum-function-nesting-level-of-100-reached-abor
Hi,
I disabled and reenabled all the plugins and when i enable the WPML translation manager plugin it has the nesting.
So everything else can run as needed but only the translation manager makes it crash somehow.
As for your solution this is about disabling the error message, but on production i don't really want a function thats nesting above 100 times. So clearly the function it self has an issue with the plugin or a setting in this plugin.
Well - I need more details now - Do you see this error when ALL Toolset plugins deactivated? OR this is a case when all plugins deactivated but just WPML plugins active?
Hi,
The error is when i only have the Toolset access plugin activated and WPML translation manager activated.
The error occurs only on the following situation:
- I have a custom group called "FH-Customers"
- I have a custom posttype called "Boats"
When i give FH-Customers access to their own "Boats" posts and i login as a FH-Customer the error occurs.
So i don't see the error as admin.
Great - thanks for sharing all these valuable information.
I need duplicator package of your site to debug this issue further and I will try to reproduce on my local test install. Could you please send me copy of your site:
More info:
https://toolset.com/faq/provide-supporters-copy-site/
I have set the next reply to private which means only you and I have access to it.
Thanks but I see you shared duplicator package with 1.5 GB. I think you can remove the images and tmp folders thats not needed and send me duplicator package.
I have set the next reply to private which means only you and I have access to it.
Hi there,
I uploaded a second Duplicator packages without the uploads folder.
But i can only post a private message with WP login and FTP access.
The new file is Archief2.zip same link but just other file name.
Well - I do not able to see the custom field group you stated: - I have a custom group called "FH-Customers" - with the shared duplicator package - do I need to create new custom field group?
How many fields you have added to this custom fields group?
Hi,
I don't have a custom field group, i have a custom user group FH-Customer.
This custom user group needs to have access to create, edit, delete and translate their own boats.
(Boats is a custom post type).
I dont able to see the custom user field group at Toolset => User fields when I logged in as administrator user.
Am I missing something here?
Hi Minesh,
Sorry for the late response, had some other stuff to do.
I don't have custom user fields for the toolset plugin. What i did was as followed.
Downloaded Toolset access control
Go to Toolset => Access Control
Open Boten as Post Type, click Managed by Access
Under the user group 'FH Customer' i checked: Publish, Delete own, Edit own, Read
I did this to make it possible for FH Customers to edit their own "Boten" (boats) and translate them.
Ok - I checked the issue further and I see that the post type "Boat" is registered using the third party plugin and you created custom role using access and set the permission to this role for post type "Boat".
I can see that there is issue when WPML plugins and we have separate forum for that.
When I created a fresh install and installed Toolset plugins + WPML plugin and "Friesland Holland boten" and created few posts and set the permissions using access plugin - I do not able to reproduce the issue BUT I can see the issue with the duplicator package you shared.
I've escalated the issue for further debug to our next level support. Please hold on for further updates.
Hi there,
Yea i created a fh-boten plugin which is custom work and added some capabilities here.
Is it possible that those capabilities are messing with the toolset functions? If so i could be able to remove those capabilities and manage access pure with the toolset plugin.
I know that we have kinda tried a lot and maybe because of that the issue is started. So thanks for the escalation and i hope one of your devs can find a solid solution.
Well - I got news that the plugin you are using is badly coded and there is no evidence found that Toolset plugin is causing the issue.
Please check following stack trace:
#0 /Applications/MAMP/htdocs/duplicator/wp-includes/meta.php(461): is_numeric(22) #1 /Applications/MAMP/htdocs/duplicator/wp-includes/user.php(804): get_metadata('user', 22, 'VQ1AV5kb_capabi...', true) #2 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-user.php(833): get_user_meta(22, 'VQ1AV5kb_capabi...', true) #3 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-user.php(809): WP_User->get_caps_data() #4 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-user.php(174): WP_User->for_site('') #5 /Applications/MAMP/htdocs/duplicator/wp-includes/pluggable.php(105): WP_User->init(Object(stdClass)) #6 /Applications/MAMP/htdocs/duplicator/wp-includes/pluggable.php(83): get_user_by('id', 22) #7 /Applications/MAMP/htdocs/duplicator/wp-includes/capabilities.php(669): get_userdata(22) #8 /Applications/MAMP/htdocs/duplicator/wp-content/plugins/ in /Applications/MAMP/htdocs/duplicator/wp-includes/meta.php on line 461 PHP Warning: Invalid argument supplied for foreach() in .../wp-admin/includes/plugin.php on line 1432 Stack trace: [24-Apr-2018 12:00:37 UTC] PHP 1. {main}() /Applications/MAMP/htdocs/duplicator/wp-admin/admin-ajax.php:0 [24-Apr-2018 12:00:37 UTC] PHP 2. do_action() /Applications/MAMP/htdocs/duplicator/wp-admin/admin-ajax.php:44 [24-Apr-2018 12:00:37 UTC] PHP 3. WP_Hook->do_action() /Applications/MAMP/htdocs/duplicator/wp-includes/plugin.php:453 [24-Apr-2018 12:00:37 UTC] PHP 4. WP_Hook->apply_filters() /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-hook.php:310 [24-Apr-2018 12:00:37 UTC] PHP 5. Fh_Boten_Users->remove_vc_for_non_admin() /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-hook.php:286 [24-Apr-2018 12:00:37 UTC] PHP 6. remove_menu_page() /Applications/MAMP/htdocs/duplicator/wp-content/plugins/fh-boten/classes/fh-boten-users.php:53
As you can see error is from your plugin from the last error line above.
However, the issue happens only if you have xDebug active, as PHP itself has no maximum nesting limit.
Hence you need to either disable xdebug OR increase it’s maximum nesting level it’ll work
When you disable all WPML but keep his plugin and Access, then you get:
PHP Fatal error: Uncaught Error: Call to undefined function get_field() in .../plugins/fh-boten/classes/fh-boten-firms.php:131
Stack trace:
#0 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-hook.php(286): Fh_Boten_Firms->add_firms_rewrite_rules(Array) #1 /Applications/MAMP/htdocs/duplicator/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #2 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-rewrite.php(1406): apply_filters('rewrite_rules_a...', Array) #3 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp-rewrite.php(1427): WP_Rewrite->rewrite_rules() #4 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp.php(158): WP_Rewrite->wp_rewrite_rules() #5 /Applications/MAMP/htdocs/duplicator/wp-includes/class-wp.php(713): WP->parse_request(Array) #6 /Applications/MAMP/htdocs/duplicator/wp-includes/functions.php(960): WP->main(Array) #7 /Applications/MAMP/htdocs/duplicator/wp-admin/includes/post.php(1073): wp(Array) #8 /Applications/MAMP/htdoc in /Applications/MAMP/htdocs/duplicator/wp-content/plugins/fh-boten/classes/fh-boten-firms.php on line 131
Disable Toolset completely now and still see the same errors.
Reactivate WPML but not toolset, exactly same issue.
We do not see error related to Toolset plugins, we see only errors related to your plugin "fh-boten"
So - in final words, we do not debug third party plugins that throw a row of errors where Toolset is not once in the stack trace. You need to find the issue here and fix it. I've added error stack that may help you.