Permissions issue

oceanblue

New member
Jan 17, 2025
9
1
3
Hi Julian,

I am having an issue with the wiki edit permissions.

My registered users are in a regular "Registered" group and then get promoted after x days of membership and y number of posts to a "Verified" group.

The regular Registered group has no edit perms, I gave the Verified wiki edit permissions. The secondary usergroup permissions don't appear to overwrite the primary group permissions, even though the Registered group edit permissions are set to No and not Never.

Can you please check into this? Thanks!
 
I also just noticed that the wikipost banner stopped showing for everyone else other than admins. This example shows that, despite being enabled for wikipost.

Thanks!
Hello oceanblue. This one is tricky to reproduce, however this hint gives me something to start working on it. The banner should only be displayed if you have permissions to edit a WikiPost, so what it means is that there is something with the permissions that is preventing your normal users to to edit.

Do you know if you have any permissions set to Never in your Registered group?
 
Hello oceanblue. This one is tricky to reproduce, however this hint gives me something to start working on it. The banner should only be displayed if you have permissions to edit a WikiPost, so what it means is that there is something with the permissions that is preventing your normal users to to edit.

Do you know if you have any permissions set to Never in your Registered group?

I double-checked this, as it was my first thought, too. Nothing is set to Never in the postwiki permissions.
 
Hi,

We have updated to XF 2.3 and now I am faced with these errors when someone tries to edit the Wiki post:

Server error log
  • InvalidArgumentException: Attempted to convert NULL to string/binary [message]
  • src/XF/Mvc/Entity/Entity.php:808
  • Generated by:
  • Mar 24, 2025 at 12:55 PM

Stack trace​

#0 src/XF/Mvc/Entity/Entity.php(682): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'message', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(612): XF\Mvc\Entity\Entity->set('message', NULL)
#2 src/addons/Laneros/WikiPost/XF/Entity/Post.php(138): XF\Mvc\Entity\Entity->__set('message', NULL)
#3 src/addons/Laneros/WikiPost/XF/Entity/Post.php(84): Laneros\WikiPost\XF\Entity\Post->processWikiArea()
#4 src/XF/Mvc/Entity/Entity.php(1415): Laneros\WikiPost\XF\Entity\Post->_preSave()
#5 src/XF/Service/Post/EditorService.php(175): XF\Mvc\Entity\Entity->preSave()
#6 src/addons/SV/UserEssentials/Service/Content/SimplifiedPreviewTrait.php(64): XF\Service\Post\EditorService->_validate()
#7 src/XF/Service/ValidateAndSavableTrait.php(19): SV\UserEssentials\XF\Service\Post\Editor->_validate()
#8 src/XF/Pub/Controller/PostController.php(170): XF\Service\Post\EditorService->validate(NULL)
#9 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\PostController->actionEdit(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:post', 'Edit', Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#11 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#12 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#14 src/XF.php(806): XF\App->run()
#15 index.php(23): XF::runApp('XF\\Pub\\App')
#16 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to string/binary - src/XF/Mvc/Entity/ValueFormatter.php:141
#0 src/XF/Mvc/Entity/Entity.php(804): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(682): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'message', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(612): XF\Mvc\Entity\Entity->set('message', NULL)
#3 src/addons/Laneros/WikiPost/XF/Entity/Post.php(138): XF\Mvc\Entity\Entity->__set('message', NULL)
#4 src/addons/Laneros/WikiPost/XF/Entity/Post.php(84): Laneros\WikiPost\XF\Entity\Post->processWikiArea()
#5 src/XF/Mvc/Entity/Entity.php(1415): Laneros\WikiPost\XF\Entity\Post->_preSave()
#6 src/XF/Service/Post/EditorService.php(175): XF\Mvc\Entity\Entity->preSave()
#7 src/addons/SV/UserEssentials/Service/Content/SimplifiedPreviewTrait.php(64): XF\Service\Post\EditorService->_validate()
#8 src/XF/Service/ValidateAndSavableTrait.php(19): SV\UserEssentials\XF\Service\Post\Editor->_validate()
#9 src/XF/Pub/Controller/PostController.php(170): XF\Service\Post\EditorService->validate(NULL)
#10 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\PostController->actionEdit(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:post', 'Edit', Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#12 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#13 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}

Request state​

array(4) {
["url"] => string(20) "/posts/36216744/edit"
["referrer"] => string(67) "https://forum.purseblog.com/threads/2025-hermes-bag-prices.1073148/"
["_GET"] => array(0) {
}
["_POST"] => array(9) {
["_xfToken"] => string(8) "********"
["_xfInlineEdit"] => string(1) "1"
["wikipost_summary"] => string(0) ""
["message_html"] => string(22514) "..."
["attachment_hash"] => string(32) "17641d22f6453ddeed26e3199c876990"
["attachment_hash_combined"] => string(88) "{"type":"post","context":{"post_id":36216744},"hash":"17641d22f6453ddeed26e3199c876990"}"
["_xfResponseType"] => string(4) "json"
["_xfWithData"] => string(1) "1"
["_xfRequestUri"] => string(40) "/threads/2025-hermes-bag-prices.1073148/"
}
}

I pruned the message_html for this quote to make the error shorter, just FYI. Thanks!