Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#1 | flag-1320274-2.x.patch | 283 bytes | smokris |
#1 | flag-1320274-1.x.patch | 281 bytes | smokris |
Comments
Comment #1
smokrisPatches attached, for both flag-6.x-2.x and flag-6.x-1.x.
Comment #2
joachim CreditAttribution: joachim commentedCan 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.
Comment #3
joachim CreditAttribution: joachim commentedWere 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().
Comment #4
asb CreditAttribution: asb commentedThis is an issue for D6; there are neither multiple entities nor field collections in D6, imho ;)
Comment #5
joachim CreditAttribution: joachim commentedCan you debug the source of the problem?
Comment #6
asb CreditAttribution: asb commentedIf I could, I probably would have fixed it, wouldn't I ;)
Comment #7
joachim CreditAttribution: joachim commentedI 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.
Comment #8
joachim CreditAttribution: joachim commentedClosing old bugs where no further information was supplied.