Skip Navigation

[Gelöst] Some custom field images are not displayed although they exist

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created vor 6 Jahre, 9 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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+01:00)

This topic contains 11 Antworten, has 2 Stimmen.

Last updated by André Linde vor 6 Jahre, 9 Monate.

Assisted by: Nigel.

Author
Artikel
#541096
Bildschirmfoto 2017-06-25 um 18.42.43.png

Hello,

I'm looking in my developer console and i see after the img tag there is no image path it looks like so <img src=":large"

Most pictures are displayed correctly. To test I have some pictures which are not displayed again in the mediathek loaded but also does not help

I use latest versions from toolset plugins.

Have you an idea to solve this?

best regards
André

#541349

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

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

Hi André

Could you please describe how you have added the image fields to your site?

Is this a content template for a custom post type where the posts have the images added as custom fields. Or a layout for such single posts? Or something else?

Can you show how/where you have inserted the shortcodes to output the images?

#541512
Bildschirmfoto 2017-06-26 um 18.30.20.png
Bildschirmfoto 2017-06-26 um 18.30.59.png

Hi Nigel,

i have create toolset types fields and one field is image field for book images than i have create content template and create a design with visual composer.

I attach two screenshots hope it helps.

thank you very much

best greetings
Andre

#541721

Hi Nigel,

i don't know what is wrong but i have another problems too. If i have this shortcode

add_action('init', 'add_mapped_shortcodes_on_init');
function add_mapped_shortcodes_on_init()
{
  WPBMap::addAllMappedShortcodes();
}

in my functions.php and if I disable visual composer than the sites breaks with 500 error

If i want create a visual composer grid and add some elements that don't work too and in my console i become these message:

editor.min.js?ver=4.8:1 Uncaught TypeError: Cannot read property 'get' of undefined
    at Object.e [as go] (editor.min.js?ver=4.8:1)
    at vc.Storage.setContent (backend.min.js?ver=5.1.1:6)
    at vc.Storage.save (backend.min.js?ver=5.1.1:6)
    at vc.Storage.update (backend.min.js?ver=5.1.1:6)
    at n.sync (backend.min.js?ver=5.1.1:6)
    at n.save (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:98)
    at n.create (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:98)
    at n.vc.AddElementUIPanelBackendEditor.createElement (grid-builder.min.js?ver=5.1.1:1)
    at HTMLDivElement.dispatch (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:3)
    at HTMLDivElement.r.handle (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:3)

if i disable types than it works. Can you help me too solve it too?

I can give you access to my site can I sent you the acceess Data private?

best greetings
André

#541726

Hi Nigel I'm again,

the second problem with visual composer grid problem i think i have solved. That was a viasual composer problem. I have found a solution here:

hidden link

the other problem still exists

best greetings
André

#541984

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

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

Hi André

I tried to reproduce the problem locally on a test site but I was unable to.

I created a Content Template for Books and designed the template using Visual Composer, using a text module to insert the shortcode for a Types image field, and the image was correctly rendered.

Can you try a small test.

Find the post ID of one of your book posts which you know has an image added in the image field.

Create a test page and without using the Visual Composer editor insert the types shortcode for the image field, adding the id attribute to specify the book post the image should be taken from (e.g. [types field='cover' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='none' resize='proportional' id='99'][/types], using the same values as from your template and with the id edited accordingly.)

Does that display the image correctly when you view that page?

#542003

Hi Nigel,

i have create a page without visual composer elements and paste the shortcode with different id's from book type but it don't display anything.

And the problem with disable visual composer when the shortcode is in my functions.php is still exists.

add_action('init', 'add_mapped_shortcodes_on_init');
function add_mapped_shortcodes_on_init()
{
  WPBMap::addAllMappedShortcodes();
}

Is this better if i give you access?

best regards
Andre

#542018

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

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

It sounds like the image fields for your books are not added to the book posts correctly, but, yes, let me look for myself.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

Regarding the code snippet you added to your functions.php file, why did you add it? (I recognise the code from Visual Composer and I know what it does, but I want to check why you are adding it to your site.)

#542460

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

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

Screen Shot 2017-06-28 at 13.08.30.png

Hi André

I looked at your site and viewed some books at random on the front of the site and all of the ones I tried looked fine (e.g. see screenshot).

Do you have any specific books where the images are not working?

(Note, I temporarily changed the language of your user profile to English so I can move around the admin pages easily. I have left it in English for now in case I need to go back into the site.)

#542469

Hi Nigel,

yes you can see page where images missing here:

hidden link

english user profile is ok for me 🙂 thank you for your help

best greetings
Andre

#542563

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

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

Hi André

So the problem is not with the individual book posts, it is with the grid view of books on this page.

I assumed you had added a View to create this list of books, but I see that you are using the Visual Composer Post Masonry Grid module to show the list of books.

We don't have any control over how that grid looks. I assumed that the module uses the featured images of the posts in that grid display.

I compared a post that works (id = 1054) with one that does not (id = 2215) but I saw that you do not have featured images enabled for your book post type (in Toolset > Post Types in the "Sections to display..." block).

I enabled this setting to be able to see whether the book posts had featured images or not, and found that the post that works does, the post that does not work does not.

So if you are going to use the VC Post Masonry Grid module to show your list of books you will need to make sure those book posts have a featured image.

#543338

Hi Nigel,

thank you very much for your great help. I don't know why some images have featured images too. I have a idea i create a grid with toolset and style it, I think it's better 🙂

best regards
André

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.