Fixed Errors with "Batch update media"

Urfe

Member
Affected version
2.0.5
I'm running and XenForo v2.0.12 with Media Gallery 2.0.5. When I try to hard delete soft deleted user media I encounter errors.
  1. Admin > Batch update > Media
  2. Search for everything in the "Deleted" state
  3. Under "Delete items" select "Confirm deletion of 325 items" and continue
  4. 190786
  5. Now my admin control panel complains too!
    190787
  6. Running it from the admin panel home also produces an error.
I'm a little worried that this is blocking other cron from running. I would also like to either abort this whole process or finish it. Help!
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.13).

Change log:
Allow moderator log and warning content titles to be truncated if needed.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Thanks for reporting this. I suspect you have some media titles which are longer than 150 characters and therefore when we add the action to the moderator log, the length of the title is problematic.

So we've fixed that in the next release, as per the above.

If you wanted to fix it now, you can do so by editing the file src/XF/Entity/ModeratorLog.php and finding:
PHP:
'content_title' => ['type' => self::STR, 'maxLength' => 150, 'default' => ''],
And changing that to:
PHP:
'content_title' => ['type' => self::STR, 'maxLength' => 150, 'forced' => true, 'default' => ''],
 
Back
Top Bottom