hello,
I have a drupal website with a content that is reviewed on several axis by users.
So I use fivestar, nodecomments and I associated some fivestar CCK widget to these nodecomments node.
The voting system works pretty well, when I vote, all is registered correctly.
But if I go to the parent content (so with the nodecomments and fivestar listed in a view) and that I flush the cache, I get the following error :
# warning: preg_match() expects parameter 2 to be string, array given in /includes/bootstrap.inc on line 777.
And the fivestar associated to my nodecomment node disappears...
very strange issue.
Comments
Comment #1
markus_petrux commentedI have also seen these errors in bootstrap.inc, line 777 caused by Fivestar/CCK.
The problem happens when the cached information about fields is cleared from the Content cache. The next page load may invoke a CCK function that needs to rebuild cached information about fields. If that happens before fivestar_init() is executed, then CCK won't be able to load information about Fivestar fields. Next, when something related to Fivestar fields tries to use t(), it causes this error in bootstrap.inc, line 777, because there's no entry in the CCK caches about fivestar.
The solution would be as simple as loading the fivestar_field.inc file as soon as fivestar.module loads, so the CCK hooks implemented by fivestar are there, at least, as soon as bootstrap reaches full step, so any other module that may use CCK stuff during hook_init() does not cause this kind of headaches, that are pretty difficult to track.
Comment #2
markus_petrux commentedIn the meantime, I'm using a module that has a weight lower than any other module (say -99999), and its hook_init() implementation does this:
Comment #3
whiteph commentedWe can no longer support the Drupal 6 version of Fivestar. It is in security maintenance mode only. When the Drupal 8 version of Fivestar is released, the Drupal 6 version will be officially deprecated. However, if a volunteer can be found who is willing to test patches for the Drupal 6 version, we could revert it to normal maintenance. See Help testing Drupal 6 patches.