• Resolved junkes

    (@junkes)


    Hey,

    I have a CPT made with pods called “CD” and a custom taxonomy called “Year” attached to it. I used to use orderby=”year.name ASC”, for example, to order CD’s by Year but it’s not working anymore, I guess since 2.8 update but not sure. Am I doing something wrong or something did change?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Looks like this may be related to an issue we are looking at in the upcoming Pods 2.8.2 release. It was affecting a different use-case but it’s the same exact area so that’s why I think they may be related to the same regression bug.

    Here’s the bug I filed for this: https://github.com/pods-framework/pods/issues/6230

    Can you go to the place on your site where this would normally display and add this to your URL while logged in as an admin?

    ?pods_debug_sql=1

    That will cause Pods to output the queries it uses on those find() requests for the page.

    If you can find on the page where that spot would be, there should be a textarea with what the query used was. Can you provide that in a reply here to better help me understand this individual case?

    Thread Starter junkes

    (@junkes)

    I guess this is it. Just FYI, in this case, it’s an artist page (“artista” post type, in portuguese) that displays artist’s CDs (“disco” post type) by Year (“ano” tax).

    SELECT

    DISTINCT
    t.*
    FROM wp_posts AS t

    LEFT JOIN wp_podsrel AS rel_artista ON
    rel_artista.field_id = 2263
    AND rel_artista.item_id = t.ID

    LEFT JOIN wp_posts AS artista ON
    artista.ID = rel_artista.related_item_id

    LEFT JOIN wp_postmeta AS artista_ID ON
    artista_ID.meta_key = ‘ID’
    AND artista_ID.post_id = artista.ID

    LEFT JOIN wp_term_relationships AS rel_ano ON
    rel_ano.object_id = t.ID

    LEFT JOIN wp_term_taxonomy AS rel_tt_ano ON
    rel_tt_ano.taxonomy = ‘ano’
    AND rel_tt_ano.term_taxonomy_id = rel_ano.term_taxonomy_id

    LEFT JOIN wp_terms AS ano ON
    ano.term_id = rel_tt_ano.term_id

    LEFT JOIN wp_termmeta AS ano_name ON
    ano_name.meta_key = ‘name’
    AND ano_name.term_id = ano.term_id

    WHERE ( ( artista.ID = ‘2513’ ) AND ( t.post_type = ‘disco’ ) AND ( t.post_status IN ( ‘publish’ ) ) )

    ORDER BY ano.name ASC, t.menu_order, t.post_title, t.post_date

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Two of those joins are removed by a fix in Pods 2.8.2 (they join but don’t appear to alter the query results).

    I’m not seeing anything other than those two that are out of the ordinary for the query other than that. To confirm, your taxonomy name is “ano” and this is a taxonomy associated to the CPT.

    And the CDs are all set as published for their status?

    Thread Starter junkes

    (@junkes)

    Yes, taxonomy name is “ano” and it’s associated with the CD (“disco”) CPT with Pods. Yes, all the CDs are set as published.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    @junkes are you on our Live Community Slack Chat by chance? https://support.pods.io/chat/ — I couldn’t find you on there to follow-up.

    You may also want to try out Pods 2.8.2 ahead of the release — https://github.com/pods-framework/pods/archive/refs/heads/release/2.8.2.zip — and let me know if it solves your issue entirely as that could save us both time knowing it’s fixed.

    Thread Starter junkes

    (@junkes)

    I installed 2.8.2 but I guess it didn’t resolve my issue. At least, not with old code that was working before 2.8.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    The Pods 2.8.2 release went out today and you can update to that whenever you are ready. I believe your issue was addressed but I did fix a similar one yesterday.

    Let us know if the update does resolve your problem as planned.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Looks like we posted pretty close to each other ??

    Let’s try to get additional information about your issue created as a new bug on our GitHub at https://pods.io/submit/ and we can help you over there to debug and figure out what’s going wrong.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Pods 2.8.3 is out now and you can try once again to confirm that we solved your problem. I know it’s been a bit of back and forth here but I did revisit the orderby handling for Pods::find() in 2.8.3 and I think it may resolve your problem here.

    Thread Starter junkes

    (@junkes)

    I just updated to 2.8.3 and I’m afraid it didn’t work for me, at least not with the same shortcode as it used to. I’ll submit it to GitHub later so we can look further. btw, I entered Pods’ Slack Community but didn’t have the chance to look around just yet.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    More effort went into Pods 2.8.4 to resolve this issue with associated taxonomies specifically. It finally resolved the issues I kept seeing on our own Pods site with associated taxonomy usage exactly like what you’re using. After applying the update it resolved that problem entirely for us.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Pods 2.8.4 is now out and has a fix that addresses the issue reported here.

    Thread Starter junkes

    (@junkes)

    Well, I just updated and still not working for me. Guess I’m doing something wrong then, but can’t figure it out what.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @junkes

    Could you create a full bug report on GitHub so we can further look into this issue?
    https://github.com/pods-framework/pods/issues/new/choose

    Closing topic here!

    Cheers, Jory

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Orderby custom taxonomy still works?’ is closed to new replies.