Hi,

I'm getting lots of notices like this in my watchdog log:

Trying to get property of non-object in flag_node->get_content_id() (line 1230 of /var/www/drupal/sites/all/modules/flag/flag.inc).

Usually, "Location" seems to be a View, a referrer is not given. I am not using flags in the Views referenced in the "Location" field.

Since the severity is marked as "error", I'd like to get rid of those notifications.

Any ideas?

Thanks!

CommentFileSizeAuthor
#1 flag-1320274-2.x.patch283 bytessmokris
#1 flag-1320274-1.x.patch281 bytessmokris
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smokris’s picture

Status: Active » Needs review
FileSize
281 bytes
283 bytes

Patches attached, for both flag-6.x-2.x and flag-6.x-1.x.

joachim’s picture

Version: 6.x-2.0-beta6 » 7.x-2.x-dev
Status: Needs review » Needs work

Can you debug to try to find out what is calling get_content_id() without a node object? The problem is there. get_content_id() should be able to trust that it's getting called in a valid context.

joachim’s picture

Status: Needs work » Postponed (maintainer needs more info)

Were you using Field collection, or anything else that lets you edit multiple entities in the same form?

This may be a duplicate of #1774226: incompatible with field collection - Trying to get property of non-object in flag_entity->applies_to_content_object().

asb’s picture

This is an issue for D6; there are neither multiple entities nor field collections in D6, imho ;)

joachim’s picture

Can you debug the source of the problem?

asb’s picture

If I could, I probably would have fixed it, wouldn't I ;)

joachim’s picture

I mean just put in some debug statements to find out where the code is coming from when it tries to do this.

Otherwise, I simply can't fix this bug.

joachim’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing old bugs where no further information was supplied.