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.
The module does not check whether the node has a title or not, and sometimes nodes do not have one. This makes PHP 5.3 throw notices.
Comment | File | Size | Author |
---|---|---|---|
#1 | token_node_no_title-1294402-1.patch | 954 bytes | fgm |
Comments
Comment #1
fgmSuggested patch.
Comment #2
fgmForfot to add tag.
Comment #3
Dave ReidThe $node->title property should *always* be defined. What module doesn't provide the title property?
Comment #4
fgmHard to tell: I noticed this on a site with several hundred modules enabled. This happens because the token is being accessed fairly long before the node build is done and before the node the is saved.
I could dig deeper if you really think it is needed, but it seems logical that this might happen: referencing a token before the underlying data is completely prepared is something token should handle properly.
Comment #5
Dave ReidHrm, but $node->title should *always* exist. Token replacement before data is prepared is a fundamental error we can't really handle because at that point the basic data should always exist.
Comment #6
Dave Reid