Forum Replies Created

Viewing 15 posts - 106 through 120 (of 330 total)
  • Author
    Posts
  • in reply to: Notice: Undefined offset: 1 in post.php when Debug mode on #6688
    Jason
    Keymaster

    Got it! The problem is that on some of the post types you’re setting capability_type as an array. As is standard with register_post_type, it either has to be a string or an array with pre-defined indexes. From the looks of it, if you just change, for example, array('invoice') to simply 'invoice', that should fix the issue. But that depends on what you’re trying to do.

    in reply to: Notice: Undefined offset: 1 in post.php when Debug mode on #6686
    Jason
    Keymaster

    Sorry, I don’t know the upload limits of this site. Hahah!

    How about a gist, pastie, pastebin, etc.?

    in reply to: Notice: Undefined offset: 1 in post.php when Debug mode on #6682
    Jason
    Keymaster

    Hi @vayu!

    Thanks! That helps!

    Are you registering any custom post types via the piklist_post_types hook? If so could you show me the code for that? Either you’ve found a bug or there’s a simple misconfiguration.

    Jason
    Keymaster

    Hey @jivedig!

    Interesting. The touch_time function isn’t used by a theme; it’s an admin-side function, so changing themes (as you found) wouldn’t have any affect. Still, I just tried this out locally and I’m not having the same issue. Perhaps something is misconfigured where you’re defining the post type?

    Have you tried debugging the line in template.php to see if you can get more information on the variable that’s supposed to be an object?

    in reply to: Notice: Undefined offset: 1 in post.php when Debug mode on #6678
    Jason
    Keymaster

    Hi @vayu!

    Most times in these situations it’s something using Piklist that’s misconfigured that’s causing the issue. Using the piklist function incorrectly, on accident, for example, can raise an error that looks like it’s Piklist having an issue.

    In any case, could you please provide a stack trace to try and isolate the culprit line of code?

    in reply to: Multiple relationships question #6634
    Jason
    Keymaster

    Also, keep in mind that you don’t need the 'field' parameter to the field if you’re using it for relationships.

    Jason
    Keymaster

    Hi @stham!

    You would probably want to use the register_activation_hook instead of admin_init, otherwise you’ll be updating the settings every time the admin-side loads. Also, check to make sure there isn’t an existing value or you’ll overwrite what they’ve done if the plugin is deactivated and reactivated.

    That said, using update_option should work just fine. Just make sure you’re using the right options key and saving in the format Piklist is expecting. I’d enter the values through the field, save it, then check out the wp_options table to see how Piklist is saving it out. It may either be a single, serialized row, or multiple rows per value (depending on whether it’s a group or not).

    That should work. Piklist isn’t doing anything magical beyond the normal use of get_option and update_option.

    in reply to: Displaying posts in a meta-box filtered by post_meta #6630
    Jason
    Keymaster

    Hi @bicho44!

    Piklist makes it easy to quickly make metaboxes on the dashboard, but I’m afraid any interactivity you intend from there is up to you to develop. If I understand you correctly, you’ll probably be needing to do some admin-side ajax to accomplish what you’re looking for. For more information on how to do this, check out this article: https://codex.wordpress.org/AJAX_in_Plugins

    in reply to: Multiple relationships question #6625
    Jason
    Keymaster

    The difference between admin-side and front-end forms is that in the back-end the scope of the fields are derived from the context. For example if a field is on the post edit page, the fields assume they should save as the meta of that post. On the front end there’s no screen context, so it’s up to you to define both the scope and the object (if there is one).

    Try setting 'scope' => 'post'.

    in reply to: bizarre priority/custom fields interaction #6609
    Jason
    Keymaster

    Hmm.. I’m using 0.9.9.9. I’m not aware of any fix for this, but it’s possible.

    I haven’t tested the simpleton just yet, but I’m just using the default post type changing nothing about it but the name. I’ll try to look into this a bit more later. Unfortunately I’m in the middle of a very tight deadline.

    in reply to: bizarre priority/custom fields interaction #6606
    Jason
    Keymaster

    Interesting, so, to be clear, low priority fields aren’t saving for the default post type? Are you using the latest trunk version of Piklist? I just tried to reproduce this locally and am unable to; it’s saving and updating just fine.

    in reply to: Multiple relationships question #6604
    Jason
    Keymaster

    Glad to help! 🙂

    in reply to: Multiple relationships question #6599
    Jason
    Keymaster

    You actually don’t need a ‘field’ value at all for relate fields. The field is only used to provide a key for custom meta fields.

    in reply to: Multiple relationships question #6597
    Jason
    Keymaster

    Ah, I see. In the property_tenant field, you have 'relate' => array( 'scope' => 'tenants' when it should be 'relate' => array( 'scope' => 'post'. The scope is to specify the object type (i.e. post, user, comment), not the post type. 😉

    As you can see, whatever is used there is later used in the __relate_{$relate} meta key.

    in reply to: bizarre priority/custom fields interaction #6595
    Jason
    Keymaster

    Hi @mcmaster!

    Interesting use-case. I’m curious, and not to dodge the issue, but why do you want the post type to support ‘custom-fields’ if you’re using Piklist to generate custom fields? The two seem to somewhat bleed into each other.

Viewing 15 posts - 106 through 120 (of 330 total)