• Great plugin, but the latest update seems to be stripping the values from one of my custom field keys if more than one key-value pair is used and the update button is clicked.

    I have a custom field called “images” and I have customized my template so that the client only has to enter the name of the images in order for them to show up when the page is rendered.

    example:
    KEY VALUE
    images image1.jpg
    images image2.jpg
    images image3.jpg

    Now if multiple key-value pairs are entered and the WordPress page/post update button (or save draft) is clicked ALL of the images key/values are “stripped”. The other fields are left alone. Also it seems if I only enter one image file name then the one image is retained.

    My work-around has been to fill in all the custom fields except for images, update the page, then enter the images values and only click the “save” button in custom field tempalte. This updates the custom field table and the images don’t get stripped out. I could probably live with it, but it’s difficult to explain why to a client.

    Anyone else seen this?
    Thanks,
    Brett

    https://www.ads-software.com/extend/plugins/custom-field-template/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter brettweaver

    (@brettweaver)

    Update: I remembered that I had a previous version installed on another site (1.4.8) so I reverted the plugin to that version. Same thing happens, so maybe it has something to do with the 2.9.1 version of WordPress? I updated WP the same day I updated this plugin. Bad idea as it turns out.

    Also I noticed this option in Custom Fields Template:

    In case that you would like to insert multiple images at once in use of the custom field media buttons:
    Use multiple image inset
    Caution: You need to edit wp-admin/includes/media.php. Delete or comment out the code in the function media_send_to_editor.

    Could that be part of the problem?
    Brett

    Hi Brett,
    Could you show me the template content you are using. I will try it in my server. Thanks.

    Thread Starter brettweaver

    (@brettweaver)

    Thank you. This is the Template content I”m using:

    [StockNumber]
    type=textfield
    size=35

    [Status]
    type=radio
    value= ForSale # Sold
    clearbutton=true

    [ItemType]
    type=radio
    value=Vehicle # Parts
    default=Vehicle

    [Year]
    type=textfield
    size=4

    [Make]
    type=textfield
    size=35
    default=Jeep

    [Model]
    type=textfield
    size=35

    [Miles]
    type=textfield
    size=35

    [Price]
    type=textfield
    size=35

    [Color]
    type=textfield
    size=35

    [Engine]
    type=select
    value=4-Cyl # 6-Cyl # 8-Cyl # See Description
    clearbutton=true

    [Transmission]
    type=select
    value=Automatic # 3-Speed # 4-Speed # 5-Speed # 6-Speed # See Description
    clearbutton=true

    [OtherOptions]
    type=checkbox
    value=Power Steering # Power Brakes # Air Conditioning # Soft Top # Hard Top # Half Doors # Custom Wheels # Tilt Wheel # Lift Kit # See Description
    clearbutton=true

    [BodyRating]
    type=select
    value=parts only#6#7#8#9#10
    clearbutton=true

    [InteriorRating]
    type=select
    value=parts only#6#7#8#9#10
    clearbutton=true

    [MechRating]
    type=select
    value=parts only#6#7#8#9#10
    clearbutton=true

    [MainImage]
    type=text
    size=35
    label=Enter the file name of the main vehicle image. Names are CASE SENSITIVE. Should be 800 pixels wide.

    [images]
    type=text
    size=35
    label=Additional Images. Enter File Names of Large (800 pixel wide) Images. Names are CASE SENSITIVE.

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    [images]
    type=textfield
    size=35
    hideKey = true

    Hi brettweaver,
    I tried your template. It seems to work well. The data are saved properly. I am afraid the images key name conflict with the other plugins. So please try to change the key name or stop every plugin except the custom field template. Thanks.

    Thread Starter brettweaver

    (@brettweaver)

    Thanks for the suggestion, but the problem persists. Here’s what I did:

    1. Changed the Custom Field Template key names from [images] to [photos]
    2. Installed Custom Field Taxonomies plugin and performed a “Replace images with photos” command. This replaced the key name.
    3. Modified my template file to call the “photos” custom field key instead of “images”.

    The front end of the site renders correctly, but I still have the disappearing values, now from the “photos” custom field.

    Did I understand your suggestion correctly?
    Thanks.

    Did you try to stop every plugin except the custom field template plugin?

    Thread Starter brettweaver

    (@brettweaver)

    Yes. I stopped all plugins except Custom Fields Template, navigated to edit one of my pages with multiple key-value pairs, clicked the update page button and all the key values were stripped. I re-entered them and clicked the save button on the CFT and all was well again.

    Hmm, I am not sure what is the cause of your issue unless I look at your WordPress directly. If you allow me access the server, please send me an email to webmaster[at]wpgogo.com. Thanks.

    cosmictap

    (@cosmictap)

    Same deal here; I’m experiencing wiped key values on saves if the fields already exist.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Custom Field Template] Version 1.5.5 strips multiple values from multiple pairs’ is closed to new replies.