Fixed Revert Message Edit Error

M@rc

Well-known member
Admin Panel -> Find User -> Revert Message Edit

When I try to get the full 60 days, I get the following error:

LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: Please enter a message with no more than 10000 characters.) in src/XF/Service/ValidateAndSavableTrait.php at line 34
  1. XF\Service\Post\Editor->save() in src/XF/EditHistory/Post.php at line 84
  2. XF\EditHistory\Post->revertToVersion() in src/XF/Repository/EditHistory.php at line 99
  3. XF\Repository\EditHistory->revertToHistory() in src/XF/Job/UserRevertMessageEdit.php at line 71
  4. XF\Job\UserRevertMessageEdit->run() in src/XF/Job/Manager.php at line 253
  5. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 195
  6. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 111
  7. XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
  8. XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 321
  9. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  10. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  13. XF\App->run() in src/XF.php at line 390
  14. XF::runApp() in admin.php at line 13
 

Brogan

XenForo moderator
Staff member
The issue appears to be the message which is being reverted to has more characters than the maximum allowed value set in the ACP (10,000).

I'll move this to bugs to see if it can be handled better.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.5).

Change log:
Disable validation when reverting to a previous revision of content
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top