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.
If you select the "Use absolute link" checkbox on the path field for your jump menu, it'll fail to set the default value when you visit a page from the jump menu. The issue is that the options array uses the path field values which are absolute urls, but when setting the default value it uses a root-relative url so there is never a match. The attached patch will look at the absolute link checkbox for the jump menu's selected path field and will use the appropriate url when setting the default value.
Comment | File | Size | Author |
---|---|---|---|
#3 | views.code_.1845268-3.patch | 1.03 KB | Pol |
#2 | views.miscellaneous.1845268-2.patch | 954 bytes | Pol |
#1 | 1845268_jump_menu_default_value_absolute_link_option.patch | 954 bytes | d.clarke |
Comments
Comment #1
d.clarke CreditAttribution: d.clarke commentedComment #2
PolGot the problem with Views 7.x-3.x when enabling different languages, I need to use absolute urls because by default, the url() doesn't take in account the language when generating the url().
This patch fix it for Views 7.x-3.x
Comment #3
PolNew patch with comments as requested by @Dawehner.
Comment #4
dawehnerCommitted and pushed.
Comment #5
DamienMcKennaWhy was this pushed to CTools 8.x? The 8.x-1.x branch has been abandoned, 8.x-2.x is being rewritten from scratch, so this is no longer relevant to CTools.
I've pushed it back to the Views issue queue.