Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The original functionality of the 'answer' button is to provide an anchor link down to the answer form. But what if you are not logged in, or if you don't have access to post an answer? We should not be displaying the answer button.
Also, if you are logged in, but no one has answered the question, the answer form will be at the top. Its not intuitive to someone not familiar to commons to know that the answer button means (show me this answer form)
Comment | File | Size | Author |
---|---|---|---|
#4 | 2094153-remove-answer-button-4.patch | 8.52 KB | japerry |
Screenshot_9_20_13_9_22_AM.png | 381.99 KB | japerry | |
Screenshot_9_20_13_9_54_AM.png | 225.8 KB | japerry |
Comments
Comment #1
WebSinPat CreditAttribution: WebSinPat commentedI agree. Ran into the 2nd issue mentioned and felt it was confusing to have a button to click "answer" right above the answer form that I would be filling out if I wanted to provide an answer.
Comment #2
ezra-g CreditAttribution: ezra-g commentedHopefully we can triage this in Commons 3.9. Thank for the bug report and feedback, japerry & WebSinPat!
Comment #3
japerryHere is a patch that cleans up that link a little and adds node_access. In theory, anon users could still answer the question, but only if a site owner allowed anonymous users to post answer content (not default, and definitely not recommended!)
Comment #4
japerryThis patch is a little more indepth with the button and answer text.
Comment #5
WebSinPat CreditAttribution: WebSinPat commentedPatch in #4 is looking good so far.
However it doesnt seem to address the 2nd issue in the OP that the Answer button appears even when there are no answer yet and it's right on top of the answer form itself. Think we need a check to see if any answers already exist in commons_q_a_node_view, before displaying the answer link.
Also, perchance is this a good time for a fresh request to have the answer link and answer summary info appear in the browsing-widget when viewing the teaser for a question?
Comment #6
japerryAfter looking at the display, I don't think we need to worry about the second use case here. Committing the changes we have and we'll probably re-visit this if we start re-designing the Q/A module.
Fixed here! http://drupalcode.org/project/commons.git/commit/71cf918