Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » [Plugin: Types – Custom Fields and Custom Post Types Management] Image custom field value won't

  • Resolved sjspain


    Types version 1.0
    I’ve created a custom field of type image for a page type called location. It works fine when I create a new location, but when I change the image and click update, the image url just reverts to the previous value.

    I’ve tried changing the url directly and from the media library and uploading a new image – these make no difference. I’ve also tried changing the main text to see if this forces the new value to be saved – it doesn’t.

    This seems quite basic and is very irritating – please can someone help?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Events Manager version 5.1.6
    I’ve actually used the Types plugin to add custom fields to the post type Location which is part of the Event Manager Plugin.

    This works fine – except that I can’t change the values of any of the custom fields I once I’ve published the Location post.

    Any ideas?

    Plugin Author Amir Helzer


    Is this problem happening just with Types or when other plugins are setting the values of custom fields?

    I can easily see this happening if more than on plugin is setting custom field values.

    There are custom fields on the custom post type ‘Location’. These are all part of the Event Manager plugin. I am trying to use Types to add some addition custom fields to the post type ‘Location’.

    Both the Types custom fields and the Event Manager custom fields are saved correctly when a ‘Location’ is published. Only the Event Manager custom fields save on an update.

    Surely the WordPress infrastructure, if correctly used by both plugins, should allow custom fields from separate plugins to be updated.

    Any ideas on what would be causing a problem?

    Plugin Author Amir Helzer


    Actually, no. WordPress infrastructure doesn’t want to deal with two plugins updating the same custom fields.

    It’s just not going to work. You can’t update the same fields from two plugins. You can create NEW custom fields with Types and manage them, but not the same fields that the event manager plugin is managing.

    These are NEW custom fields – just on another plugin’s custom post type.

    The Events Manager plugin has a custom post of ‘Location’. It has custom fields for the Address.

    I have used Types to add custom fields for a Website URL and an Image to the ‘Location’ Post type.

    My only problem is that the Website URL and Image do not update.

    Plugin Author Amir Helzer


    Weird. That shouldn’t happen. Someone will need to debug this to make it work. If the author of the events manager plugin is also interested, we can look at it together.

    You can also help by providing an online test site, where we can see this happening. But anyway, we’ll need the participation of the other author.



    happy to help.

    @sjspain, could it not be that you have the same name for the custom field, or one of our post meta values?

    I think they both work together, but one is just overwriting the other. How does types store custom fields?

    aside from normal WP custom fields for CPTs, we also have ‘attributes’ which you can define in our settings and appear in a seperate meta box but are just normal custom fields, then we also store post meta with prefixes e.g. _location_id

    Plugin Author Amir Helzer


    Hi Marcus,

    Types uses the standard post-meta table for custom fields. If Types and Event Manager setup different custom fields, I see no reason at all for values not to be saved.

    If might be a good idea to enable PHP error reporting and see if there’s any error when saving the post.

    There were no name clashes, but this might clarify things.

    I had attributes enabled in the settings for the locations and one attribute configured as follows #_LATT{Circuit Church}{Yes|No}

    I removed the attribute and disabled attributes for Locations and now the Types Custom Fields are updating OK.

    I have exactly the same problems. However I don’t have attributes configured.

    Any ideas?

    Never mind. Already found it. Solved!

    Plugin Author Amir Helzer


    Great. I’ll also mark it as solved here.

    I was struggling to do the same. Precisely, the following steps:

    1. Have in Events Manager’s Locations a URL field that can be updated through WP-admin.
    2. Have that field show on the Location pages for users.
    3. Add that field to the front-end management pages of Events Manager so our users can add URLs to their submitted locations.

    I was stuck with the first one exactly the way sjspain and Chantal Coolsma were: the custom field now shows on the Edit Location pages under WP-admin, but saving any value didn’t work despite not having any custom fields or attributes through Events Manager.

    I resolved the problem by renaming the custom field’s slug from “website” to “website-randomstring”. Apparently the slug “website” was already used somewhere else, which didn’t prevent the field from showing but did prevent it from updating.

    Amir: Maybe add a check for slugs that cannot be used and a helpful warning when trying to save a field with one?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] Image custom field value won't’ is closed to new replies.