Skip Navigation

[Resolved] Alt tag not displaying

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by steveS-7 6 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#593636

I have created a view that shows photos from each product I setup. But it will not show the alt tag that is loaded in with the photo. I'm using this code: [types field='photos' size='medium' align='none' resize='pad' index="0" alt='%%ALT%%'][/types]

Link to a page where the issue can be seen: hidden link

You can see the alt tag is showing up blank on all the images even though they all have them set in the Media Manager.

#593807

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Steve

I observed the problem on your site and did some quick testing but couldn't identify the cause. It appears to be a live site so I have taken a copy to install locally for further testing and will get back to you later.

#593985

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Steve

I did some further testing but wasn't able to determine the cause, and it is not something I can reproduce on a test site, it seems to be an exception affecting only your site.

I have escalated this thread so that it can be investigated further, and I'll update you when there is some news.

Thanks for your patience.

#594002

Thanks for your help!

#594573

Any updates on this?

#594618

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Steve

There is good news and bad news.

We haven't been able to identify the cause of the issue. We can't reproduce it with a similar set up, it only appears to affect the images on your site.

What we did find with your own site is that with a minimal set up—switching theme to twentyseventeen and disabling non-Toolset plugins—new images uploaded to new posts worked as expected, the alt attributes are output.

I then re-enabled your theme and your plugins one-by-one trying to identify if a conflict was responsible for the issue, but for newly uploaded images they continued to work fine.

But the old images do not. Examining the database we cannot see what the difference is between the old and new images that might account for it. At some point something was affecting the images as they were uploaded, but we don't know what.

Could you please verify that for new images uploaded the alt tags appear.

I tried running the regenerate thumbnails plugin on my copy of your site hoping that might fix the images but it didn't, and for now I don't see any alternative to manually replacing them.

#594776

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Steve

Another colleague took a look and found that the guid column in the wp_posts table contains URLs that point to a different location than the current site URL.

It looks like you migrated the site and whatever tool you used didn't do a proper search and replace on the URLs.

When making copies of sites we use Duplicator or All in One WP Migration, both of which handle this automatically.

#596959

Thanks - replacing the development URL in the guid column worked! I had been told in the past not to do that, but I will from now on.