Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
4.4k views
in Q2A Core by
edited by

[UPDATE] April 8, 2015 - I updated this entry with new information. The question and it's details read differently. I have searched for this answer and have not yet found it. 

We are running 1.7.1 on a prototype server and want to deploy this to run along side or replace our existing static knowledge base. I'm expecting traffic of up to 3K visitors per day, so this issue is important for us to sort out. 

When I try to move a question to a different category I get this message in Red (it says 6 characters because I changed the minimum character count for new questions from 12 to 6, but this is just a side effect of the real issue.

Please provide more information - at least 6 characters

We figured out what the problem was and I believe we have found a bug. 

When a question has been solved the question cannot be moved to a new category. 

Even the admin cannot move it unless the Posting option: 

"Close questions with a selected answer" is unchecked. 

We understand that users, editors can't move posts, but moderators and admin's should be able to move locked posts. The MO here is that in a perfect world people will ask questions in the right category, but newbies / frustrated people will just post wherever. In the event a moderator does not see it in time and it's and the question is answered, it will need to be moved to it's proper home. Even locked topics in a phpBB forum can be moved. 

Is there a workaround or mod that allows this if that option is checked?

or where in the php code would we change the value to unlock this functionality?

Q2A version: 1.7.1
by
So did the proposed fix work? Your latest feedback was a downvote so I'm not sure if that means "it didn't". BTW, I'd acknowledge this as a bug introduced in v1.7.0
by
I'm sorry I down voted your initial response because it actually didn't address the question, however I edited both the question and the content of the question. I just reversed the downward vote to a positive.

1 Answer

+2 votes
by
selected by
 
Best answer

Replace this line with the following code:

} else if ($question['closed']) {
    if (isset($question['title']))
        $in['title'] = $question['title'];
    if (isset($question['content'])) {
        $in['content'] = $question['content'];
        $in['text'] = qa_viewer_text($question['content'], $question['format']);
    }
}

Here is a better but wordier approach: https://github.com/q2a/question2answer/pull/208

by
Thank you for the code.

After some further analysis, we decided that we would not implement this and instead leave the check box unchecked. Logic for the decision was that an answer better than the one provided and selected by the original requester may show up and the requester may choose to change the solution to a newer solution.
by
That didn't worked out for me. I have users "Expert" that could change the post category before 1.7. Now that doesn't work, even using this selected "answer" to change the code.

Any idea how to solve this?
Best Regards
by
The 2 approaches I've proposed there don't actually care at all about the user permissions, which makes sense, because the code changes introduced in 1.7.0 (which were actually a fix to another bug) don't care about permissions either.

It is likely that you have a different issue. Test it properly with different users with different permissions. Using only experts doesn't actually confirm it is only happening to them.
by
Changed the user to Editor and the problem does not happen. It happens only in Expert mode.
by
I checked out the patch-50 branch I linked in the answer. Logged in with an expert user. Browsed to a closed question. Edited it. Selected a new category. It was successfully edited. I couldn't reproduce it. If you think there is an issue with the core you should provide step by step instructions starting from a clean Q2A installation. But note as your issue is not exactly the same as this one you should better ask a new question
...