Feedback link for article doesn't work

Got an idea for a site feature, a suggestion for an article, or spotted an error we made, feel free to post it here.
Guests can post here!
User avatar
Saavick
AOU Content Editor
Posts: 611
Joined: Sat Jul 11, 2015 2:09 pm
Location: Netherlands

Feedback link for article doesn't work

Post by Saavick » Thu Feb 14, 2019 2:54 pm

hey hey :)

I tried to leave feedback on an article today and noticed a small problem. For articles that don't have any feedback yet, there's a link at the bottom:
Do you have questions about this article or found an error? No comments yet - Click here to leave Feedback for this article! [+]
Judging from the javascript code behind it, it's supposed to unhide the "commentbox" element, but it doesn't seem to do this. I managed to get around it by manually unhiding the element, and then the comment got posted as intended.

User avatar
Khuri
AOU Programmer/Coder
Posts: 1759
Joined: Thu Sep 29, 2005 7:57 pm
Location: Germany
Contact:

Re: Feedback link for article doesn't work

Post by Khuri » Fri Feb 15, 2019 9:19 am

Thanks for the info, seems to work from on side though.

What browser/version are you using?

User avatar
Saavick
AOU Content Editor
Posts: 611
Joined: Sat Jul 11, 2015 2:09 pm
Location: Netherlands

Re: Feedback link for article doesn't work

Post by Saavick » Fri Feb 15, 2019 9:40 am

I'm using firefox 65.0.1 (the latest version).

In the developer console it shows the following error when I click the link:
SyntaxError: unterminated regular expression literal
Changing the href like so fixes it for me:
href="javascript:hideunhide(document.getElementById('commentlink'),document.getElementById('commentbox'));"
(I removed the slash after the semi colon.)

User avatar
Khuri
AOU Programmer/Coder
Posts: 1759
Joined: Thu Sep 29, 2005 7:57 pm
Location: Germany
Contact:

Re: Feedback link for article doesn't work

Post by Khuri » Mon Feb 18, 2019 9:59 am

Sorry, my bad.
When you said "articles" I checked the actual articles and not the guides where it happened.

Fixed it, thank you! :)

User avatar
Saavick
AOU Content Editor
Posts: 611
Joined: Sat Jul 11, 2015 2:09 pm
Location: Netherlands

Re: Feedback link for article doesn't work

Post by Saavick » Mon Feb 18, 2019 12:33 pm

I hadn't considered they were different things, oops :)
Thanks for the fix :heart:

Post Reply