• Resolved jabbadu

    (@jabbadu)


    Hi,

    i guess there is a little bug on the dynamic taxonomy module. If I set posts per page for the frontend view they are not accepted.

    I took a fast look in to the code and figuered out, there is a little bug at:

    acfe_dt_filter_front_list().
    ....
    $taxonomy = $query->get('taxonomy');
    ...
    

    $taxonomy = $query->get('taxonomy'); returns a empty value. If i set it manually to the taxonomy-name it works like it should.

    Can you check this?
    thanks a lot! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! May I ask you on what page you are when you try this setting?

    This feature works only on a Term Single. For example: My Taxonomy: Term 3. If you use Query Monitor Plugin, you should see that the main WP_Query will have the query var taxonomy set to my-taxonomy.

    Screenshot: https://i.imgur.com/EGwF485.png

    Can you try to install the plugin, go on your page and open the “Request tab” just like I did?

    Thanks!

    Regards.

    Thread Starter jabbadu

    (@jabbadu)

    hey!
    I just checked and rechecked.

    Of course it’s the correct location. See the picture: https://imgur.com/a/Q2ss8SM

    By debugging your function, you can see that $taxonomy is empty.
    (KINT Debugger on top of Screen)

    Change $taxonomy = $query->get('taxonomy'); to $taxonomy = $query->tax_query->queries[0]['taxonomy']; and it works.

    I’m not very deep into wp_query and I’m not familiar with the available methods.

    Hope that helps, maybe I am doing smth wrong, but i uses only a few plugins and none of these alters queries.

    • This reply was modified 5 years, 1 month ago by jabbadu.
    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the detailed report and screenshot. In fact, you are right, the settings aren’t working correctly on term single page. I’ll add a fix in the next patch. Meanwhile, you add the fix yourself:

    In the file \acf-extended\includes\modules\dynamic-taxonomy.php line:415. Replace:

    $taxonomy = $query->get('taxonomy');
    $taxonomy_obj = get_taxonomy($taxonomy);
    

    With:

    $term_obj = $query->get_queried_object();
        
    if(!is_a($term_obj, 'WP_Term'))
        return;
    
    $taxonomy = $term_obj->taxonomy;
    $taxonomy_obj = get_taxonomy($taxonomy);
    

    Have a nice day ??

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Just to let you know that the latest 0.8.5 fixed this issue.

    Have a nice day ??

    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dynamic Taxonomy: Posts per page issue’ is closed to new replies.