Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to rate #8

Open
TommyChris opened this issue Apr 18, 2015 · 0 comments
Open

Unable to rate #8

TommyChris opened this issue Apr 18, 2015 · 0 comments

Comments

@TommyChris
Copy link

I have a problem with your really coolbundle:

If I show a rating, before anybody renders the voting page, no one can rate anymore.

In technically:

On the front page, I have thumbnails to videos and other meta infos (duration, number of views and rating). This videos appears in the database as the image shows:

image

The important part is the null permalink and null security_role columns.

My users can vote in the video's dedicated subpage. If I open a dedicated subpage, which is not in the database (so the rating never before shown), the default row created as the image shows (last row):

image

If I open the dedicated subpage, which has this magic null row, I can't vote.

====================/

My solution is to modify Controller/RatingController.php in function showRateAction($id) to not create the empty database rows.

-            $rating = $ratingManager->createRating($id);
-            $ratingManager->saveRating($rating);
+           $rating = new DCS\RatingBundle\Entity\Rating();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant