Comments (7)
"exception" => Twig_Error_Runtime {#1601 ▼
-lineno: 3
-name: "StarRatingBundle:Display:ratingDisplay.html.twig"
-rawMessage: "An exception has been thrown during the rendering of a template ("Notice: Object of class Symfony\Component\Form\FormView could not be converted to int")."
-sourcePath: "/var/www/html/MMSS/vendor/blackknight467/star-rating-bundle/blackknight467/StarRatingBundle/Resources/views/Display/ratingDisplay.html.twig"
-sourceCode: """
{% for i in 1..max %}\n
\n
{% endfor %}\n
"""
#message: "An exception has been thrown during the rendering of a template ("Notice: Object of class Symfony\Component\Form\FormView could not be converted to int")."
#code: 0
#file: "/var/www/html/MMSS/vendor/blackknight467/star-rating-bundle/blackknight467/StarRatingBundle/Resources/views/Display/ratingDisplay.html.twig"
#line: 3
from starratingbundle.
@hamzarebaichkaw
can you post the twig you're using and the value of the variable you're passing to the rating filter?
from starratingbundle.
{{ form_start(commentaire, {'action': path('AjoutCommentaire') , 'method': 'POST','class':'comment-form'}) }}
{{ form_widget(commentaire.comment, { 'attr': {'class': 'form-control','cols':'45','rows':'8', 'placeholder': 'Write your comment here...'} }) }}
{{ form_widget(commentaire.rating|rating(5,"fa-3x") ) }}
</p>
Publish
{{ form_end(commentaire) }}
from starratingbundle.
@hamzarebaichkaw
is "commentaire.rating" a string or an int?
from starratingbundle.
int
from starratingbundle.
@hamzarebaichkaw
oh, you're trying to use a filter in your form. Just remove the rating filter and you should be fine.
{{ form_widget(commentaire.rating) }}
from starratingbundle.
@blackknight467
thank you it worked
from starratingbundle.
Related Issues (16)
- Label appearing twice HOT 5
- Stars Not showing HOT 5
- it is possible to display stars on webpage HOT 4
- still works with Symfony 2? HOT 6
- Render half star HOT 1
- Rectangles instead of stars HOT 2
- Pass rate value into entity HOT 1
- Usage in forms HOT 7
- Issue in installation HOT 1
- Symfony 4 template not found exception HOT 1
- Question: Is this bundle still maintained
- Read only field HOT 2
- This bundle will be updated to symfony 3? HOT 2
- Could not load type "AppBundle\Form\RatingType" HOT 3
- Is it possible to use it in a Handlebars file ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starratingbundle.