This wasn't working for me on a site that we've inherited, as the node language conditions in _node_display_title_get_display_title() were failing.
The easiest and cleanest way that I could get this to work is to add a dependency on the entity module and delegate that check to the entity_metadata_wrapper() function.
I propose that the module be updated to use this method. Patch to follow shortly.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff.txt | 631 bytes | opdavies |
| #8 | 2863428-8.patch | 822 bytes | opdavies |
Comments
Comment #2
opdaviesThis patch adds the dependency to
node_display_title.info, and updates the_node_display_title_get_display_title()logic as described in the issue description.Comment #3
begun commentedThanks for putting together this patch. In the interest of keeping the module as light as possible I would prefer to avoid adding extra module dependencies if possible. Wondering if same thing might be achieved with field_get_items() and possibly field_view_value().
I am keen to know more about the cause of the issue. Do you have any debugging related information you could share? Wondering if this is a language code related issue or something else.
Comment #4
begun commentedComment #5
opdaviesI have an updated patch. I'll upload it most likely tomorrow when I'm back in the office. :)
Comment #6
opdaviesHere is the updated patch that removes the dependency on the entity module, and instead uses
field_get_items()andfield_view_value().Comment #7
kiwimind commentedHaving spoken with Ollie, he's going to rework the patch to simplify it, especially removing the ternary from the return and removing the use of the $title variable as it's no longer needed.
Happy to take another glance once the new patch is there.
Current patch applies cleanly to 7.x-1.x.
Comment #8
opdaviesComment #9
kiwimind commentedPatch applies cleanly to 7.x-1.x.
Looks good to me, think this reads better.
Comment #10
opdaviesAgreed.
Comment #11
begun commentedThanks @opdavies for putting together this patch. I can't see there being any issue with the patch given that using field_get_items() and field_view_value() methods are a good, safe way of obtaining the display value of a field; however, it would be good to know how to recreate the particular issue you encountered. Would be grateful if you could provide me with some additional info around this. You mentioned language related issues. Was this by chance a multi language site?
Comment #12
begun commentedComment #13
kiwimind commentedComment #14
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.