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 a link has a non-empty title and an empty url, then it is supposed to display as plain text. At least, this is how it works in 7.x-1.0. In the dev release from 2012-Aug-17, an empty url gets replaced with the url of the home page.
This change seems to be an unintended consequence of #1645640: Since <front> isn't implemented, take it off the project page until it is., commit b4919a6.
Comment | File | Size | Author |
---|---|---|---|
#2 | link-empty-1891340-2.patch | 1.34 KB | benjifisher |
#1 | link-empty-1891340-1.patch | 1.02 KB | benjifisher |
Comments
Comment #1
benjifisherThe attached patch fixes the problem for me. It does three things:
link_validate_url($text)
to return LINK_EMPTY instead of FALSE if$text
is empty._link_sanitize()
and conditionally skip the rewriting introduced in #1645640: Since <front> isn't implemented, take it off the project page until it is..Comment #2
benjifisherThe patch in #1 has indentation errors. Try this one.
Comment #3
jcfiala CreditAttribution: jcfiala commentedThis is actually fixed in another recent patch.
Comment #4
benjifisherI guess the duplicate issue is #1766150: Title + Optional URL empty not displayed as plain text.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedThis bug has not been fixed in 7.x-1.2.
Neither the patch provided above nor the patch in the "duplicate" issue fix it.
I encountered the bug in 7.x-1.1. After updating to 7.x-1.2 and clearing all caches, the bug persists.
(Note that I am encountering this in conjunction with Link iFrame Fromatter 7.x-1.1.)
Comment #6
CoffeyMachine CreditAttribution: CoffeyMachine commentedThis is working for me in 7.x-1.3.