Forums

Custom Field Suite
[resolved] field relationship if I choose type-page on a post no ID (10 posts)

  1. Monika
    Member
    Posted 7 months ago #

    Hi Matt
    Field Relationship

    I have a "suite" for posts, and if I choose there a page => field relationship type:page

    it returns no ID

    but if I choose a post => (type:posts) it returns the ID of the choosen post or posts

    I'm using this code to return the ID

    http://uproot.us/custom-field-suite/documentation/relationship/

    http://wordpress.org/extend/plugins/custom-field-suite/

  2. logikal16
    Member
    Posted 7 months ago #

    Hey, just so I'm understanding correctly:

    You're editing a post. Within the post edit screen, there's a relationship field. In the relationship filter box, you've entered "type:page" -- but no items appear in the box below to select from.

    Does that sound about right?

  3. Monika
    Member
    Posted 7 months ago #

    no the items are there, I can choose "pages" -
    backend is fine ;)

    but I see no page ID at frontend

    but if I choose a "post" in backend I'll see the ID at frontend

    (at frontend or on frontend or ??... english is sometimes confusing me ;))

  4. logikal16
    Member
    Posted 7 months ago #

    Ah, ok. I'll look into this shortly.

  5. logikal16
    Member
    Posted 7 months ago #

    Monika,

    I've done some more testing and wasn't able to reproduce the issue you're experiencing.

    Here's a screencast with more info: http://screencast.com/t/FZiCuQkZ

  6. Monika
    Member
    Posted 7 months ago #

    hi Matt

    after your screencast I'm testing this relationship field with all possibilities ...

    if I choose only 1 page or only 1 post => there is no ID on frontend,

    if I choose 2posts or 2pages, or 1 post and 1 page=> it works

    there is an absolut simple "screen" about this

    http://www.webdesign-in.de/--190105/cfs-test.jpg

    so I don't know: have I missundertood this field?

  7. logikal16
    Member
    Posted 7 months ago #

    Monika,

    It was in fact a bug. Great find!

    The fix will be incorporated into 1.0.3. In the meantime, if you wanted to try it out, it involves changing 1 line:

    custom-field-suite/core/fields/relationship.php (line 213):

    Old:
    $return = array($v[0]);

    New:
    $return = array($value[0]);

  8. Monika
    Member
    Posted 7 months ago #

    I'll like to write an article about your plugin
    and I test all plugins bevor I'm writing about them,
    because my "little" texto.de is one of the german "planet" Domains and so I would like promote working plugins ;)

    I have time - time enough ;)

    I change this line and try to test more => but there are also customers with "deadlines" ;);)

    thanks Matt

  9. texasguy911
    Member
    Posted 7 months ago #

    I still don't understand what "field relationship" does and in what cases it can be used. I did visit the author's website, I still don't have a grasp. Please give me an example, thanks.

  10. logikal16
    Member
    Posted 7 months ago #

    A basic example uses 2 post types: "team" and "player".

    If you want to associate players with a team, you'd use a relationship field.

    For each team (post item), you'd use the relationship field to select all related players.

Reply

You must log in to post.

About this Plugin

About this Topic