xwikisas / application-forum

Forum Application (Pro)
GNU Lesser General Public License v3.0
0 stars 5 forks source link

Topics and answers cannot be voted anymore #106 #108

Closed trrenty closed 2 years ago

trrenty commented 2 years ago

While investigating this issue I found out that the voting also failed on older versions of XWiki.

On the older versions, the reason the vote failed was because there was a conflict in converting the parameters passed to the Ratings API through services.ratings. Making sure we always passed a document reference to the functions fixed the issue.

On the newer versions, the Ratings API had changed and thus the function calls inside our application were no longer valid. So I had to make changes to the code for it to work on both APIs.

Moreover, I made some small code changes to the JavaScript code. The click listener wasn't properly removed from the vote button after voting. The html title associated with the vote button wasn't updated after voting.