Notice: Trying to get property of non-object in smartqueue_taxonomy_nodequeue_subqueue_title() (line 217 of ... sites/all/modules/contrib/nodequeue/smartqueue.module).
smartqueue_taxonomy_nodequeue_subqueue_title() checks only to see if a term ID is true, but does not test whether that term currently exists.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | nodequeue-smartqueue_test_term-1588028-6.patch | 1.21 KB | jenlampton |
| #2 | smartqueue_test_term-1588028-2.patch | 898 bytes | jweowu |
| #1 | smartqueue_test_term-1588028.patch | 531 bytes | jweowu |
Comments
Comment #1
jweowu commentedComment #2
jweowu commentedDealing with side-effects of ignoring the invalid terms.
Comment #3
tripper54 commentedSeems to work OK for me. I was getting this error after deleting a term.
Comment #4
fizk commentedAfter applying this patch and removing a term, adding more terms, etc., I saw multiple subqueues named "6" (I'm assuming this was the old term ID for the term "three"). After adding the removed term, I saw the "6" subqueue be replaced by "three". These behaviours don't seem stable, so I think this needs more work.
Comment #5
jweowu commentedWhat do you think the title should be in the situation where the term doesn't exist?
I think it's useful to include
$referencein the output in some way, as it provides some kind of identification.Perhaps something along the lines of
sprintf("Invalid term reference: %s", $reference)?Comment #6
jenlamptonHere's a reroll of the patch, slightly different approach.
Comment #7
jweowu commentedRegression from the previous patch: You're assuming that the taxonomy_term_load returned an object.