Error when trying to restore a deleted post

Started by bynw, December 21, 2022, 03:32:26 PM

Previous topic - Next topic

bynw

I recently found the option that we could restore deleted posts and turned it on. It's a great feature, thanks.

As such I tried to restore a recently deleted post and it gave me an error. I'll post that backtrace information below. The user that wrote the post is no longer a member of our community and the account is deleted so I'm wondering if that is the cause and if so what is the work around for it.

Please see the attached files for the error and backtrace details.

You cannot view this attachment.


You cannot view this attachment.


Thanks

shawnb61

What database engine?  Version?

Are you using MariaDB?

The solution is almost certainly to add subject to the GROUP BY line.

Moving to Bug Reports.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

bynw

Quote from: shawnb61 on December 21, 2022, 04:09:10 PMWhat database engine?  Version?

Are you using MariaDB?

The solution is almost certainly to add subject to the GROUP BY line.

Moving to Bug Reports.



Yes it is a MariaDB version 10.3.37


shawnb61

Issue logged:
https://github.com/SimpleMachines/SMF/issues/7656

In the meanwhile, you can try adding the subject to the GROUP BY as a temporary fix. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

bynw

Quote from: shawnb61 on December 21, 2022, 09:58:19 PMIssue logged:
https://github.com/SimpleMachines/SMF/issues/7656

In the meanwhile, you can try adding the subject to the GROUP BY as a temporary fix. 

How would I do that?

shawnb61

Quote from: bynw on December 21, 2022, 10:11:22 PMHow would I do that?

In RemoveTopic.php, ~line 1396:
https://github.com/SimpleMachines/SMF/blob/5be32db86ab8b0152c078d258b946b33fa32fcb0/Sources/RemoveTopic.php#L1396

Change it to:
GROUP BY id_topic, approved, subject
You will have to revert this change when SMF issues a patch, so the patch can be applied properly.  But I think it will get rid of those errors for now.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

bynw


Advertisement: