Bug in Version 2.1.6 - ban trigger are not displayed and cannot be edited or add

Started by Ottokar, July 03, 2025, 09:24:07 AM

Previous topic - Next topic

Ottokar

After add a new ban, ban trigger was not displayed and cannot be edited or added.

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Ottokar

I go back to Version 2.1.5, same issue. Its a bug in version 2.1.5.
So i went back to 2.1.4.

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SleePy

Identified the change that caused it and asked the author of the change to identify why it was changed, but I think the fix will end up being updating the change in the template to use 'ban_items' instead of 'ban_list'.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Aleksi "Lex" Kilpinen

Find in ManageBans.template.php
if (!$context['ban']['is_new'] && empty($context['ban_suggestions']) && !empty($context['ban_list']))

Replace with
if (!$context['ban']['is_new'] && empty($context['ban_suggestions']))

Fixed this for me. The last !empty is a mistake, and should not be there at all - The list is already equipped to handle a situation where no triggers exist. ( I tested, a ban with no triggers simply states "No ban triggers specified", and allows for adding triggers. )

EDIT: And I see I'm late, and this was already the accepted solution on GitHub too :) https://github.com/SimpleMachines/SMF/pull/8753
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: