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.
Since version 3.0, Views has a better way to compute unique dom_ids that makes it useless to do the same in nodereference_explorer_views_pre_render().
Worse, it appears that the way nodereference_explorer computes dom_ids can create conflicts when using attachment displays (see #1446970: ajaxViewResponse produces blank output if target selector matches several elements).
I propose to change nodereference_explorer_views_pre_render() to do nothing if Views 3.0 or later is in use, or use the same code than in Views 3 if it's an earlier version. Patch incoming.
Comment | File | Size | Author |
---|---|---|---|
#1 | unique_dom_id-1447076-1.patch | 2.52 KB | mdupont |
Comments
Comment #1
mdupontAnd here is the patch. It checks against views_api_version() and fallback to the same code than used in Views 3.0's theme.inc.
Comment #2
mdupontNote: for the pager to work, I also had to change the following line in nodereference_explorer_views_pre_execute() from:
to:
Otherwise, the name of the content types were wrapped with the HTML entity for the apostrophe character (') instead of the character itself, causing MySQL to fail on the query.
Comment #3
gnindl CreditAttribution: gnindl commentedPorted and commited patch from comment #1: http://drupalcode.org/project/nodereference_explorer.git/commit/0fc289d
Committed patch from comment #2: http://drupalcode.org/project/nodereference_explorer.git/commit/9b1e915
Thanks, mdupont!