Skip Navigation

[Resolved] TB Image not working in a content template from a relationship view

This support ticket is created 5 years, 6 months 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.

Our next available supporter will start replying to tickets in about 1.47 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 11 replies, has 2 voices.

Last updated by Luo Yang 4 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1254493

I have been trying out the new TB Image field (I like it, particularly the linking capabilities)

I have two content types, artwork and events. Artwork has an image field.

I have a many to many relationship between artwork and events.

I have made a content template for artwork and can successfully use TB Image to display the image.

I can make a view that list all artwork and in the content template again I can use TB image to display the image.

But when I make a view that displays artwork using the event-artwork relationship the TB image field does not work in the content template. When editing the content template I can chose an existing artwork and it displays as expected. But when I add the view to the event content template and view the event, the image does not display. I added a paragraph above and below the TB Image field with text in them. They show when I view an event but no image. Using the browser inspect feature, there is no HTML for the image between the two paragraphs. If I add a TB single field at the end, use the same field settings as for the TB Image, the image does show on the event but I lose the easy way to link the image to the associated content.

Thanks
Steve RIngwood
Nevets Software

#1254697

Hello,

The problem you mentioned above is abnormal, please check these:

1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide a copy of your website in below private message box(you can put it into your own google drive disk, and share the link), also point out the problem page URL and content template URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1256479

Thanks for the details, I am downloading the files, will update here if there is anything found.

#1256503
error409.JPG

I have tried to download the files lots of time, but keep on getting HTTP ERROR 409, see screenshot:
Please put the duplicator package file in other website, for example onedrive, DropBox, and share the links again. thanks

#1257711
TB-Single-Field2.JPG
TB-Single-Field.JPG

Thanks for the details, I can see the problem you mentioned above, you just need to display the image field value with Types shortcode [types], for example:
Dashboard-> Toolset-> Content Templates, edit "Loop item in Event Artwork" content template:
Add a row(replace your image row), add a "TB Single Field", and display the custom image field "photo" with Types shortcode

[types field='photo' output='normal'  align='none' size='thumbnail'  proportional='true' resize='proportional' padding_color='transparent'   title='%%TITLE%%' alt='%%ALT%%'    ][/types]

See screenshot: TB-Single-Field.JPG

I have tested it in front-end, it works fine see screenshot TB-Single-Field2.JPG

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image

#1258455

I failed to make the reason for this support request clear.

I understand the the Toolset Blocks plugin is in beta and that the TB Image block is new to it. I believe what I have found is a bug in the TB Image block. While the "TB Single Field" the works to display the image, it lacks the "TB Image" functionality. Since they both allow one to specify a field to display, I would expect the "TB Image" to correctly display the image in the case of a content template that is part of a view displaying content through a relationship (which the "TB Single Field"). I am hoping that the "TB Image" can be made to work in this scenario.

Thanks

#1259027

Thanks for the details, I have tried the same TB Image field setting in a fresh wordpress installation in my localhost + latest version of Toolset plugins, it works fine.

I am digging in your duplicator package, will update here if there is anything found.

#1259193
my-event.JPG

Here are what I found, please edit the content template "Event Page", if I remove the "Post content" row: This is an event …,
And test again in front-end, then I can see all images in front-end, see screenshot my-event.JPG

It seems to be a bug of the Toolset Block plugin, can you confirm it in your website too?
I will escalated this thread.

#1259995

Hi
Thanks for the information. If I remove the "Post content" row on my install, the images now show.

Did some further testing and used a custom field for the event description. Added the field to the content template for event and both the description and artworks image show. Works using either a multi-line or WYSIWYG field.

Note that if in the loop template (when listing the artwork related to the event) the images shows correctly even when using the "Post Content" row in the event content template.

And the TB Image works in the Artwork content template even if I add the "Post Content" field to the template.

Thanks
Steve

#1260665

Thanks for the details, I can duplicate the same problem in a fresh wordpress installation + the latest version of Toolset plugins, and have escalated this issue, will update here if there is anything news.

Currently, you can try the "TB Single Field" for displaying custom image field.

#1261867

Here is an update, it has been escalated to our developers, and is in our erratum list here:
https://toolset.com/errata/tb-image-block-not-showing-image-field-in-some-cases/

#1407729

This is fixed in Toolset Blocks plugin version 1.0, you can download it here:
https://toolset.com/account/downloads/

Please test and feedback if the problem is fixed. thanks