When attempting to create dummy content on which users are allowed to vote I get:
Fatal error: Unsupported operand types in .../modules/acquia/votingapi/votingapi.module on line 519
When attempting to create dummy content on which users are allowed to vote I get:
Fatal error: Unsupported operand types in .../modules/acquia/votingapi/votingapi.module on line 519
Comments
Comment #1
glass.dimly commentedSo, as a follow up/correction, these content types don't actually have Voting enabled on them. I've tried this with both voting enabled and disabled on the Blog content type in question.
Instead see the following which appears on the Devel Generate page:
"Blog entry. This type contains CCK fields which will only be populated by fields that implement the content_generate hook."
So it's trying use the content_generate hook on a *required* imagefield added using CCK. I'm beginning to think this is an issue for CCK or Devel's issue queue.
Am I knocking on the wrong door?
-glass.dimly
Comment #2
eaton commentedI'm a bit baffled by this; are you using fivestar module with a required CCK 'vote' field, perhaps? There's no reason that VotingAPI should even be triggered by devel generate...
Comment #3
moshe weitzman commentedThis is indeed baffling, but I will note that votingapi has some devel_generate feature for *generating votes*
Comment #4
rooby commentedI have seen this error when using user karma and voting api then using devel generate content.
This was using 6.x-2.3 and my error was on line 587.
It was caused by user karma calling votingapi_set_votes() with a $criteria array that had content_id = 0
It is most likely an incorrect calling of a voting api function by another module you're using that relies on voting api.
To find you what is calling the function when it creashes put this code just before the line your error is on:
For the sake of anyone who had my problem the issue was resolved in user karma at #472098: voting API error when submitting scoop
Comment #5
legolasboDrupal 6 is no longer supported. Closing old issues to clean up the issue queue.
Please reopen and update this issue if this is still an issue in the D7 or D8 version.