SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: Kanman on January 18, 2015, 12:04:44 PM

Title: Users can't reply, without 'Post attachments' allowed
Post by: Kanman on January 18, 2015, 12:04:44 PM
Users can't see the reply button while 'Post attachments' isn't allowed for there group.
Title: Re: Users can't reply, without 'Post attachments' allowed
Post by: venguard223 on January 18, 2015, 08:29:46 PM
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.
Title: Re: Users can't reply, without 'Post attachments' allowed
Post by: tfs on January 18, 2015, 09:06:44 PM
I've never had a user who wasn't allowed to post an attachment, and so would have never seen this. :)

Good catch!
Title: Re: Users can't reply, without 'Post attachments' allowed
Post by: venguard223 on January 18, 2015, 09:07:54 PM
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>.
Title: Re: Users can't reply, without 'Post attachments' allowed
Post by: Kanman on January 19, 2015, 08:33:41 AM
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.
Title: Re: Users can't reply, without 'Post attachments' allowed
Post by: venguard223 on January 21, 2015, 12:48:06 PM
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.
Title: Re: Users can't reply, without 'Post attachments' allowed
Post by: Flavio93Zena on February 08, 2015, 07:30:25 PM
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