A 4th argument "$language" is either missing or not needed:
Warning: Missing argument 4 for fivestar_entity_view() in fivestar_entity_view() (line 516
Change
function fivestar_entity_view($entity, $type, $view_mode, $langcode) {
To
function fivestar_entity_view($entity, $type, $view_mode) {
$langcode is not used in that function anyway - maybe this was left for a future feature?
Comments
Comment #1
ericduran commentedThis was left in there for the future.
But the 4 arg belongs there according to http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...
Comment #2
ericduran commentedAlso do you know how you got that warning?
Comment #3
iajay commentedEven I have this same error...
This comes when the fivestar rating block is added to a panel page, i have overridden a node type page with a panel page, and added the fivestar rating block to the panel page... Any solutions?
Kind regards
Ajjaykummar
Comment #4
Anonymous (not verified) commentedI have the same as #3, showing the fivestar widget somewhere in a node panel.
Maybe you can fix it like this:
Set default to NULL?
Comment #5
ericduran commentedHmm,
If this is indeed a problem then there's either a bug in core, in panel, or in the docs. So I will not change this until the root cause of the issue is found.
The hook_entity_view is supposed to pass in all 4 values. I'm not going to add null in order to support broken code somewhere.
We should find the actual issue.
Comment #6
ericduran commentedCan someone give me directions on how to replicate this bug so I can look into it?
Thanks ;)
Comment #7
ericduran commentedok, I think I found it, it seems like a ctools bug
Comment #8
ericduran commentedOk a little investigating and this issue has already been fixed -- #1173928: Invoking 'entity_view' required $langcode
Update to the latest dev version of ctools and this problem will go away.
Comment #9
iajay commentedthanks for the solution
upgrading to ctools 7.x-1.0-beta1 solved the problem