Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

How to forbid user to edit his own question?

+1 vote
I have a problem, when experts answer a question, then user edits his question. Result - answer does not apply to question. Any ways to forbid user to edit his question after answer is posted?
Q2A version: 1.5
asked Jan 30 in Q2A Core by glodas
great question, I've brought this up in the past. Even worse, is the fact that users can hide their own questions! This can really screw up a site. This is one of the features in Q2A that should be fixed, even if the developer has some reason for allowing editing of questions and hiding of questions. In my opinion, essentially, only Admins or some other higher level should be allowed to edit and hide questions. Regular users should  not be allowed to do any of this, though perhaps they should be provided a 15 minute window to edit their own question after it's  been posted.
@osseonews: Totally agree!

1 Answer

+1 vote

I can see the point, but does this really happen in reality? It's hard to see the motivation from the questioners point of view.

Anyway, this can be implemented via a plugin which overrides the function qa_page_q_post_rules(...) - first it should call the base function to get the default result for $rules, and then set $rules['editable']=false in the cases it wants, before returning $rules.

answered Feb 2 by gidgreen
It would be great to have these option added to "admin/permissions".

+ Permissions for "Edit Questions"
+ Permissions for "Hiding Questions"

@gidgreen: Especially as I do not know how to write the proposed plugin ;)
Yeah, I think what should happen is that the user can edit their own question after some period of time. A user should never be allowed to edit the Title part of the question, since the title creates the URL and you have users editing questions they will be changing the URL also, which is bad for SEO and will cause other issues.

Alternatively, Q2A can create a permanent URL alias after a question is first submitted and this URL should not be changed unless done so by an admin.