Users can't reply, without 'Post attachments' allowed

Started by Kanman, January 18, 2015, 12:04:44 PM

Previous topic - Next topic

Kanman

Users can't see the reply button while 'Post attachments' isn't allowed for there group.

venguard223

Wow. This has been a bug since... almost 5 years ago.

Themes/default/sd_template/SimpleDesk-Post.template.php
Code (find) Select
if (empty($context['current_attachments']) && empty($context['ticket_form']['do_attach']))
return;


Code (replace) Select
if (empty($context['current_attachments']) && empty($context['ticket_form']['do_attach']))
{
echo '
</div>';
return;
}


This one is my fault, I'm afraid. This should fix it - does for me on a test environment.

tfs

I've never had a user who wasn't allowed to post an attachment, and so would have never seen this. :)

Good catch!
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

Yup, it was something I don't think we ever tested for, because there are other symptoms beyond the button not being visible - there's all kinds of template shenanigans too where the theme is pulled up short behind the reply area due to the missing </div>.

Kanman

Thanks, I didn't expect an reply this early at a apparently dead forum. I did found this bug while testing.

EDIT: venguard223: that dus fix it.

venguard223

Some of us do still keep the faith ;)

But yeah, this was a bug I made originally just because it was never tested for, and it didn't take long to track down.

Flavio93Zena

Thank you for the fix, wow never noticed it myself, yet I had tested it quite a lot... But I never thought about replying multiple times during testing ;D