quiltingcode / pp4-craft-cafe

1 stars 2 forks source link

BUG: Community Posts Page - like button has stopped working #128

Open quiltingcode opened 1 year ago

quiltingcode commented 1 year ago

Describe the bug When you click on the heart:

NoReverseMatch at /craft-community/like2/yoyo-flower Reverse for 'craft-community' with arguments '('yoyo-flower',)' not found. 1 pattern(s) tried: ['craft\-community/craft\-community/\Z']

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on like heart on a post
  3. See error

Expected behavior like function should work the same as on the post-details page

Additional context Add any other context about the problem here.

quiltingcode commented 1 year ago

I have changed the return route on the view, now to redirect back directly to 'craft-community', which stops the error.

Now only when liked == True, the heart icon filled in doesn't appear but the like toggle functionality is working.