Fix Favorite & Subscription Topic pages #111
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Favorites (
Forums/Favorites/Topics
) and Subscription (Forums/Subscription/Topics
) pages allow you to un-favorite and unsubscribe respectively. These actions havn't worked in a while from what I can see because once the buttons are clicked the topic ID which should be passed back is not getting registered with the correct ID in the controller. We need to map the HTML input tag to the parameter in the controller action.When trying to unsubscribe from a topic it just unsubscribes from the topic with the ID of the default value of controller action i.e 0. When you try and un-favorite a topic on this page it actually throws an exception because you not a favorite of topic 0.
Fixes #110
Steps to Reproduce
I have reproduced both issues above on https://popforumsdev.azurewebsites.net/Forums
Unsubscribe not working
Result: Nothing happens.
Remove favorite
Result: Exception is thrown