Title: Bug found
Last modified: March 2, 2021

---

# Bug found

 *  Resolved [davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * (@davidkoh83)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/)
 * I found a bug that if you have more than 1 repeater field and put a different
   order by for each of them, you will not be able to get a result for the 2nd field.
   When you run pandarf_items_fn without any attributes, you can see that the 2nd
   repeater field is using the order by from the first repeater field which caused
   an error so it returns empty

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * (@codingpanda)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14127895)
 * [@davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * Thanks for reporting the bug, but I don’t seen to be able to replicate it. Could
   you please export your Pods by Pods component – Migrate Packages, and paste it
   here so I can investigate, as well as your code to get the results? I will appreciate
   it if you could provide screenshots as well.
 * Thanks.
 *  Thread Starter [davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * (@davidkoh83)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14139807)
 * Hi,
 * I don’t really want to install so many things on the server at the moment so 
   I just made a screenshot and uploaded it to our server for your reference: [https://cdn.cancerletter.online/media/2021/03/05151431/panda-scaled.jpg](https://cdn.cancerletter.online/media/2021/03/05151431/panda-scaled.jpg)
 * To explain each part. The number below = the number on my screenshot:
    1. Those
   are my pods 2. I made 1 ACT called contributor_detail that has a field called
   start_date 3. I made another ACT called contributor_institution which has article_id
   4. The CPT contributors have 2 fields using your plugin to point to contributor_detail
   and contributor_institution. As you can see highlighted in red, I placed start_date
   and article_id for sorting 5. When I try to get the data using pods_field, the
   institution_detail that points to contributor_institution returns empty while
   the other is ok 6. I found out that you have a function to return the select 
   statement so I used that to see what it was selecting. As you can see, for contributor_institution,
   instead of using article_id that was set, it used start_date instead from the
   previous value 7. In order to overcome this bug, I had to overwrite that by using
   your function but with extra param to state the order_by again to overwrite what
   was previously set
 *  Thread Starter [davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * (@davidkoh83)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14139827)
 * In addition to the above, if I swap the order of additional_details and institution_details
   inside my contributors CPT, both will show article_id in the SELECT statement
   as the order_by instead so it is definitely a bug
 *  Plugin Author [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * (@codingpanda)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14144342)
 * [@davidkoh83](https://wordpress.org/support/users/davidkoh83/)
    Many thanks for
   the detailed explanation :).
 * Yes, it is a bug. I’ve fixed it and will release a new version asap.
 * Thanks again.
 *  Plugin Author [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * (@codingpanda)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14145905)
 * [@davidkoh83](https://wordpress.org/support/users/davidkoh83/)
    If you would 
   like to test it before the new release, you could download it from [https://github.com/coding-panda/panda-pods-repeater-field/tree/develop](https://github.com/coding-panda/panda-pods-repeater-field/tree/develop).
   Let me know if it doesn’t fix the problem. Thanks.
 *  Thread Starter [davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * (@davidkoh83)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14146300)
 * Hi,
 * I have tested and it is working perfectly now. Thank you for the fix and quick
   response!
 *  Plugin Author [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * (@codingpanda)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14242689)
 * [@davidkoh83](https://wordpress.org/support/users/davidkoh83/) Hello, Version
   1.4.9 has been released. Any problems, please let me know.
 *  Thread Starter [davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * (@davidkoh83)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/bug-found-27/#post-14244308)
 * Alright. Thank you
 *  Thread Starter [davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * (@davidkoh83)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/bug-found-27/#post-14339964)
 * Hi,
 * I seem to be getting this sometimes now:
    PHP Fatal error: Uncaught Error: Class‘
   PodsField’ not found in /var/www/html/wp-content/plugins/panda-pods-repeater-
   field/classes/podsfield_pandarepeaterfield.php:9 Stack trace: #0 {main} thrown
   in /var/www/html/wp-content/plugins/panda-pods-repeater-field/classes/podsfield_pandarepeaterfield.
   php on line 9
 *  Plugin Author [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * (@codingpanda)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/bug-found-27/#post-14343213)
 * Hi [@davidkoh83](https://wordpress.org/support/users/davidkoh83/)
 * It usually happens when Pods is not available or loaded after the plugin. I don’t
   know how to replicate this error as it is not happening to me, but I’ve added
   some code to check if the PodsField class exists before loading the files. Hopefully,
   that can fix the problem.
 * You could test it with the dev version: [https://github.com/coding-panda/panda-pods-repeater-field/tree/develop](https://github.com/coding-panda/panda-pods-repeater-field/tree/develop).
 * If it doesn’t work or cause new problems, please let me know.
 * Thanks

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Bug found’ is closed to new replies.

 * ![](https://ps.w.org/panda-pods-repeater-field/assets/icon-128x128.png?rev=1520380)
 * [Panda Pods Repeater Field](https://wordpress.org/plugins/panda-pods-repeater-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/panda-pods-repeater-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/panda-pods-repeater-field/)
 * [Active Topics](https://wordpress.org/support/plugin/panda-pods-repeater-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/panda-pods-repeater-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/panda-pods-repeater-field/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/bug-found-27/#post-14343213)
 * Status: resolved