Notice: Undefined property: stdClass::$tag in nodereview_load() (line 186 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined variable: votes in nodereview_load() (line 186 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined property: stdClass::$review in nodereview_view() (line 303 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined property: stdClass::$tag in nodereview_view() (line 310 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined property: stdClass::$tag in theme_nodereview_review_body() (line 63 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview.theme.inc).
Notice: Undefined property: stdClass::$tag in theme_nodereview_review_body() (line 65 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview.theme.inc).

The above errors are what I get after posting a new review (I'm using Fivestar with this module). Then I get the following two errors (same as the first two from above) when I go to the node the review was written for, and they never go away:

Notice: Undefined property: stdClass::$tag in nodereview_load() (line 186 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined variable: votes in nodereview_load() (line 186 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).

Finally, I get the following errors (same as the first three from all the way above) when I click the "Review" tab of the node the review was written for, and they never go away:

Notice: Undefined property: stdClass::$tag in nodereview_load() (line 186 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined variable: votes in nodereview_load() (line 186 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined property: stdClass::$review in nodereview_view() (line 303 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Undefined property: stdClass::$tag in theme_nodereview_teaser() (line 135 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview.theme.inc).
Notice: Undefined property: stdClass::$tag in theme_nodereview_teaser() (line 137 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview.theme.inc).

Can anyone else confirm?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

h3rj4n’s picture

Title: Initial Errors » Notice errors when module isn't configured right.
Status: Active » Needs review
FileSize
3.7 KB

I changed the title so that it covers the the content better.

I guess this happens when the module isn't configured the right way. The module need a nodereview axe to function right. You haven't created one yet for the content type. That's why you get those notices. I created a patch that fixes this. I'm not sure what else it'll break though.

I haven't tested this in combination with the fivestar module.

yaworsk’s picture

Took a look at the patch (though haven't tested it) and I'm wondering if it is a bit too intensive (the node_load function)? It looks like we are calling a full node_load on every review we find and then going back to the database two more times (via voting api and a separate database call).

Maybe this is an opportunity to integrate with views and we create a default view that the user can use. My thinking is, it would pull in all the reviews for a given node as a block, or even integrated with EVA module or something... That would also allow users to customize the information output on a reviewed node itself.

What do you think? Am I way off?

Also - just thinking - as an alternative, if this patch works - we could just apply it to get a stable d7 version going and then focus on improving that version...

jay.lee.bio’s picture

Wow h3rj4n, the module does function correctly once I put in the axe. Thanks for that information.

Give me a few hours to play around with it (I think I need to install D6 on a test server to understand exactly what the role of an axe is). I'll also be stopping by multiple times a day to test all patches in a timely manner.

h3rj4n’s picture

+++ b/nodereview_node_nodereview.inc
@@ -162,28 +162,38 @@ function nodereview_validate($node, $form, &$form_state) {
+      $reviewed_node = node_load($node->reviewed_nid);

I guess this isn't needed. Don't see the node object being used anywhere.

jay.lee.bio’s picture

H3rj4n, the patch works. However, I get the following errors if I do #4 (so I guess it's needed):

Notice: Undefined variable: reviewed_node in nodereview_load() (line 176 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).
Notice: Trying to get property of non-object in nodereview_load() (line 176 of /collectiboard/public_html/sites/all/modules/nodereview/nodereview_node_nodereview.inc).

But a new problem is that another patch you created makes it so that the "Add review" tab disappears if you don't create a review axis. Here are the two options to consider:

1) Make the review axis an option so that the module in its simplest form will have an alpha release asap. Then the "One Review Per User" issue needs to addressed with a new patch so that users can submit only one review whether a review axis is added or not.
2) Force users to use the review axis (the way it is right now). Then this patch is not needed, at least for now.

I'd go for option 1, due to the following reasons:

1) There are a lot more issues related to the review axes that also need to be fixed. I'll start posting what I noticed one by one, but some are related to Fivestar that might be a bit more complicated than they need to be because now we're talking about two modules (each review axis forces you to submit a rating, meaning Fivestar must be used whether you like it or not).
2) Some people just need Amazon-style reviews (without review axes), not eBay-style reviews (with review axes for shipping time, etc.). They should be allowed the option to choose.
3) The module will be just that much closer to an alpha release. Issues regarding review axes can always be addressed afterwards.

jay.lee.bio’s picture

Status: Needs review » Reviewed & tested by the community
jay.lee.bio’s picture

Issue summary: View changes

Added third set of errors.