The problem is that the extension seems pretty complex. Currently I’m not able to help you and the best would be to downgrade the plugin. I can imagine to add some special tags to control the content even better to the core module, but that will took some time (I guess some months). If that’s what you need please create a feature request here: https://github.com/GM-Alex/user-access-manager/issues Please describe as detailed you can what the new feature should do. Thanks.
Thanks Alex, I can understand that it is difficult for you to maintain also plugins, which do not belong to you. Today I had time and I search a little bit for the issue. So I post it here, maybe it is helpful for other users as well (I also will post it in the support forum of the UAMPPE plugin, even if it seem pretty inactive).
UAMPPE will work again if you change in the file user-access-manager-private-public-extension/includes/UserAccessManagerPrivateExtension.php the line:
$uamUserGroups = $uamAccessHandler->getUserGroupsForObject('user', get_current_user_id());
to
$uamUserGroups = $uamAccessHandler->getUserGroupsForObject('_user_', get_current_user_id());
So now everything works as expected?
Hello, I’ve been searching for a fix for UAMPPE also and came across this. However, when I edit the UserAccessManagerPrivateExtension.php file per the above suggestion, I get an error:
Fatal error: Call to undefined method UserAccessManager\UserGroup\UserGroup::getGroupName() in /home/myhome/songiuno.com/wp-content/plugins/user-access-manager-private-public-extension/includes/UserAccessManagerPrivateExtension.php on line 129
Anyone have ideas? there something else to this fix I missed?
Hello!
Did you get the same error before you did the change?
If yes, then it is another issue. If no, then you changed also something else in the code of the UAMPPE plugin.
When you are facing the described issue, the plugin works, but the integration with UAM fails, which means you never see the hidden text, even if you are logged in with correct user rights, you do not get any error messages.
Yes, you only have to change ‘user’ to ‘_user_’. Be careful that you do not change something else and check if you used the correct ‘ and not ´.
No error before the change, just the failure to integrate and hidden text is not seen. After the add the ‘_user_’ the error appears. The ‘ apostrophes are already in the original code and I don’t change/replace it, just add the underscore before and after user. Is that an incorrect approach?