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.
pathauto_token_values('node') is sometimes invoked without a $vid property, causing php5.3 to throw a warning when accessing $object->vid without testing for its existence first.
Comment | File | Size | Author |
---|---|---|---|
#1 | token_node_no_vid-1294418-1.patch | 1.05 KB | fgm |
Comments
Comment #1
fgmSuggested patch fixex this
Comment #3
fgmLooking at the errors, they point to even more of the same in other places, but none where this patch changes code, meaning it is actually useful.
Comment #4
Dave ReidA node object that does not have $vid defined in it would indicate the failure is higher up since it's invalid data.
Comment #5
fgmAIUI it is valid, if the node does not have a nid either because it has not yet being saved, which is how this happens: tokens being generated before the node is actually saved.