Recent Content page displays list of recently-added content but the following appears top of page:
* Notice: Undefined property: stdClass::$comment_count in tracker_page() (line 53 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$type in tracker_page() (line 63 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$title in tracker_page() (line 64 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$last_activity in tracker_page() (line 67 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$type in tracker_page() (line 74 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$comment_count in tracker_page() (line 88 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$last_activity in tracker_page() (line 93 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$comment_count in tracker_page() (line 94 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
* Notice: Undefined property: stdClass::$last_activity in tracker_page() (line 95 of /export/data/www/htdocs/modules/tracker/tracker.pages.inc).
Comment | File | Size | Author |
---|---|---|---|
#3 | Screenshot.png | 295 KB | juves |
9-24-2010 2-02-21 PM.jpg | 285.45 KB | beddoe |
Comments
Comment #1
Eolmornedhel CreditAttribution: Eolmornedhel commentedI found the following got rid of the errors:
line 53: if (isset($node->comment_count)) {
line 63: 'type' => check_plain(node_type_get_name(isset($node->type))),
and repeat the addition of isset() for each remaining error.
Comment #2
joachim CreditAttribution: joachim commentedI can't reproduce this.
Can you give more details about your setup -- content types, comment settings, etc?
Comment #3
juves CreditAttribution: juves commentedSame problem.
Interesting, there is actually no node with id 15 (see screenshot)
Comment #4
juves CreditAttribution: juves commentedComment #5
joachim CreditAttribution: joachim commentedIIRC Tracker on D7 caches its own data about nodes. Could it be it has data about node 15, but you since deleted node 15, and it's not caught up?
Can you look at tracker module's tables?
Comment #6
juves CreditAttribution: juves commentedYes, I deleted them from both tables, there are no more notices
Comment #7
joachim CreditAttribution: joachim commentedAh... I rather wanted you to check what was in those tables!
Comment #8
juves CreditAttribution: juves commentedI can reproduce it by creating and deleting a new node.
node 16, user 15
tracker_node
tracker_user
its all still there, I flushed cache und ran cron after deleting.
it's independent from the content type.
Comment #9
joachim CreditAttribution: joachim commentedConfirming this.
I reproduced like this:
1. create a node. notice it's shown in the tracker
2. delete the node.
3. go to the tracker and see the error messages.
Comment #10
joachim CreditAttribution: joachim commentedAdding description of the problem to the title.
Comment #11
joachim CreditAttribution: joachim commentedThe problem is here:
Tracker only cleans up its tables if there is no node. However, hook_node_delete() is invoked BEFORE core deletes the node, hence tracker's logic fails. See also #988030: Document correct sequence of hooks in node deletion.
Comment #12
moshe weitzman CreditAttribution: moshe weitzman commentedUm, shouldn't tracker implement hook_node_delete like everyone else?
Comment #13
joachim CreditAttribution: joachim commentedIt does -- hook_node_delete calls the code above.
But I am guessing this was written before the change at #890790: deleting nodes does not delete their comments..
Tracker assumes hook_node_delete is invoked AFTER the node has been deleted. This is no longer the case, so tracker's query to see whether a node exists returns a positive, and then it erroneously decides to not delete its records.
Comment #14
FanisTsiros CreditAttribution: FanisTsiros commentedShould this #950680: Multiple notices from tracker after deleting a node marked as duplicate ?
There 's also a patch there.
Comment #15
catchMarking this as duplicate of #950680: Multiple notices from tracker after deleting a node, the other issue is RTBC.