If Static Title is set in the field settings, but the field/url are optional, the Static Title is displayed on node view even if no data is ever entered.

I think nothing should show if nothing is entered.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Last Call Media’s picture

FileSize
684 bytes
Last Call Media’s picture

Status: Active » Needs review
acouch’s picture

This patch worked for me.

acouch’s picture

Status: Needs review » Reviewed & tested by the community
jcfiala’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

So, I'm not sure about this one. It's worked this way for a while, it works this way in Drupal 7's version, and I've even got a test (testOptionalUrlStaticTitleDisplays()) that makes sure that this functionality happens.

So, that basically means that I need convincing that this is something I need to change.

tech108’s picture

bug report #399438 by mutzel:Fixed so it will display static title if optional url is blank.

It looks like bug fix #399438 might have made it so static titles with no URL display the static title. If there is no URL, nothing should display.

Please advise how to have a static title and not display if no URL is given.

Thank you.

tech108’s picture

I reverted to link-6.x-2.9 and now the empty link fields no longer display the static title.

That is my preference.

rootwork’s picture

Title: If Static Title is set but no value is entered, Static Title is display on the node anyway » If Static Title is set but no value is entered, Static Title is displayed on the node anyway
Version: 6.x-2.x-dev » 6.x-2.10
Status: Postponed (maintainer needs more info) » Active

This is clearly a bug -- prior to the 2.10 update, link fields with no URLs were not displaying, as they shouldn't be. The 2.10 changed the functionality, such that link fields that had a static title set would display even if there was no URL.

If this (new) functionality is actually desired, there should be some way to turn it off -- it caused thousands of pages across my site to have the static titles displayed even when there was nothing there. Downgrading to 2.9 until this is addressed.

Let me know if I can help testing or reviewing patches, or providing any additional information on this bug.

rootwork’s picture

I know development for D6 isn't a priority, but at the very least it'd be nice to see a 2.11 release that fixes this regression.

webservant316’s picture

same here

flaviovs’s picture

Priority: Normal » Major

+1 for a fix for this

Bumping it to major as it breaks expected behavior.

webservant316’s picture

thanks - I am eager to get this fix installed

Jonah Fenn’s picture

Hi there! We recently updated the Link module here at Oregon State University and are seeing this behavior as well. Based on comment #6, it appears this was done purposely.

Is there a particular case that can be provided as an example regarding why someone would want to see a plain text static title for a non-existent link? This actually seems more like a bug.

dman’s picture

This is an annoying regression. At least make this changed behavior optional, it screwed up our exiting site a bit, and goes against normal Drupal field display expectations.
If there is no data, the field should not display anything.
Reverting to 6.x-2.9 for now.

webservant316’s picture

any progress here?

dstupakewicz’s picture

I too am experiencing problems with this. When the URL field is left blank, a default title should not be displayed. This is causing the end-user to believe a link is present but is not working. "Dead links" make all site designers look very bad. Please address.

Last Call Media’s picture

Here is the dev version with the patch from comment 1 applied. This patched version has been running several sites without issue for a couple years. It doesn't seem that a new official release of this module will happen.

jenlampton’s picture

Issue summary: View changes
Status: Active » Reviewed & tested by the community

The patch in #1 is working for me as well.

Seeing that this is a bug that was introduced in the latest version of the module, I agree that it should be fixed. As per #1.

If the intent in the other issue was to allow people to the ability to show a title when no link is entered (which, is a bit weird, we are talking about link fields here) then there should have been an additional setting introduced that allowed people to choose to "Show static title when link field is left empty" instead of breaking the existing behavior for everyone else :)

rootwork’s picture

At long last would someone please commit this fix. The module has been broken for a year and a half, and we have a straightforward fix ready to go.

Please fix this regression with a new version, or at least a new dev.

jcfiala’s picture

Ah! "Reviewed & tested by the community" are the magic words.

Let me see if I can do something this weekend.

jcfiala’s picture

Status: Reviewed & tested by the community » Fixed

Fix has been committed to git, and pushed up, so the dev version of the module should have this soon.

Probably try posting a new version of link in a few days - please test the dev version of the module and see if there's any problems.

rootwork’s picture

Great, thanks! Will test.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.