WordPress.org

Ready to get started?Download WordPress

Forums

Ultimate Post Type Manager
Upgrading from 1.5 to 1.6.3 has broken my site, Array, Array appears everywhere. (9 posts)

  1. josefdunne
    Member
    Posted 2 years ago #

    I just upgraded, and all the places on my custom post type page where custom fields are output show as "Array".

    Any ideas why this is?

    Also on archive pages, the custom post type entries do not appear.

  2. XYDAC
    Member
    Plugin Author

    Posted 2 years ago #

    Can you just Deactivate and Reactivate the Plugin.
    Moreover can you please provide the field type associated with the problem.

  3. XYDAC
    Member
    Plugin Author

    Posted 2 years ago #

    Also update the plugin to 1.6.5

  4. josefdunne
    Member
    Posted 2 years ago #

    I upgraded to 1.6.5 and deactivated and reactivated the plugin, but the same happens. It applies to all fields, the fields are type "text". You can see the page here, where ever the word Array is there should used to be a value with version 1.5 http://bit.ly/iyBvam

  5. josefdunne
    Member
    Posted 2 years ago #

    One more thing, I have not touched my template code, but this is what I am using to call the custom field value. get_post_meta($post->ID, 'name', true)

  6. XYDAC
    Member
    Plugin Author

    Posted 2 years ago #

    Really glad that u gave the code you used to call custom value, else i would have been annoyed thinking that it was related to my plug in.

    You will need to use my shortcode to get the values from the database, because from this upgrade I am storing everything in an array. All you need to do is replace these calls with the shortcodes. you can add the html script to post type's template on post type edit page.
    Or you can change the code of your template file and use the function do_shortcode(); for calling off the shortcode.

    Hope you'll soon solve you problem. And from next time onwards do provide full information before blaming anyone.:)

    Regards,
    -Xydac

  7. josefdunne
    Member
    Posted 2 years ago #

    So something like this? do_shortcode('[xydac_field]{id}[/xydac_field]') this goes in a function.. making your plugin only use shortcode makes is much more restrictive. My code was set up well, also, it was not 100% clear that you had removed the use ofget_post_meta.

    I may have to move to GD instead. Or revert back to 1.5.

  8. josefdunne
    Member
    Posted 2 years ago #

    Could you explain where you informed users of your plugin, that you stopped support for get_post_meta? I now have to re-write all my code again. I read your changelog, but nowhere did I see you say "The plugin does not support get_post_meta" I use a lot of if and else statements against a value for get_post_meta now this code has to be re-written.

  9. XYDAC
    Member
    Plugin Author

    Posted 2 years ago #

    Hey josefdunne ,
    First off, You are getting a lot angry on me mate for the problem caused to you.
    You shouldn't be getting so angry coz in the recent updates I have made huge changes worked day and night and delivering such a plugin for free.The problem to me isn't that my plugin caused a lot of problem for you, the problem is that u don't know how to solve it, and shouting on me.

    I'll tell you one this my dear friend, the technology you are working with is PHP and it's on WordPress. So chill of dude, coz if you don't like any function the way i do just make a damn change and you are done.

    Now moving to your problem,

    You used get_post_meta($post->ID, 'name', true) to access the custom values, so all you need to do is re-define the function get_post_meta in a file for your use. In that function first you should check for an arrayed value so you don't bug up any other kind of custom field. If the value is array then the format i use for my custom fields is as below:
    meta_name : {field_name}
    meta value : array({field_type} => {field_value})

    it's as simple as that.
    I would have actually written the function for you, but i would leave it for you to fight with. It's your decision to use my plugin or not, even on top of my plugin file says, the software come without warranty. so my dear friend..Enjoy...!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic