I have a Post Type called "Restaurants".
I have also set up a taxonomy for Restaurants... called "Cuisines".
In the Cuisines taxonomy, I have set up some custom fields. Some of these fields are for images. I want to use these images to display on the Cuisine archive page.
I implemented this WP-TYPES code almost 2 years ago and it has worked fine.
We have just noticed that now the archive pages are broken when viewed. After troubleshooting, I have narrowed to issue down to the custom taxonomy image.
Specifically, it is a line that looks like this...
[types termmeta="taxonomy-square-thumb" size="medium" align="none" resize="proportional" class="img-responsive" alt="[types termmeta='archive-image-title'][/types]"][/types]
The termmeta shortcode seems to be breaking the page all of a sudden. Removing the shortcode allows the page to display properly (without the taxonomy image)
I can provide ADMIN access if you send me a private reply box
When you say the archive is broken, can you be more specific? Is there a Server error 500, or a 404, or is the design not what you expect? What HTML markup is generated for the image? Can you share a screenshot of the results on the front-end? What if you try the shortcode without the nested alt attribute shortcode, like this:
[types termmeta="taxonomy-square-thumb" size="medium" align="none" resize="proportional" class="img-responsive" alt=""][/types]
Private reply fields are enabled here. Let me know if it's okay to test adding the shortcode on the live site.
Okay this behavior looks like the exact same symptom of the problem we discussed before https://toolset.com/forums/topic/inconsistent-display-behavior-of-pages. The page content is truncated unexpectedly right after the #main-content div is opened. In this particular case, it seems to be related to the size attribute of the termmeta field. This code works just fine:
[types termmeta="taxonomy-square-thumb" align="none" resize="proportional" class="img-responsive" alt="[types termmeta='archive-image-title'][/types]"][/types]
As soon as you add size="medium" the problem returns. You can try modifying the settings in Toolset > Settings > Custom Content > Images resizing to see if it helps. You can try temporarily deactivating the LiteSpeed Cache plugin to see if the problem is resolved. Last time I think we had chalked this up to a quirk in LiteSpeed or a server-side issue since the problem was not replicable in my local test environment, and there were no obvious errors. I think this is going to be a similar situation. Are there any errors in the server logs? Are any LiteSpeed caching logs available?
Well.. the interesting thing is that if I use the TOOLSET GUI and try to add the taxonomy image with the "default" settings (with the exception of setting the size as 'medium'), it ends up giving me the folloing shortcode...
[types termmeta='taxonomy-square-thumb' title='%%TITLE%%' alt='%%ALT%%' size='medium' resize='proportional'][/types]
This code also breaks the site. I am guessing becasue of the size='medium' attribute?
Seems strange that a shortcode with no real customizations with cause such a problem.
I have fixed the issue by using the "raw" output for the image.
Thanks for your help.