Closed slyderza closed 1 month ago
@slyderza If you can, please provide us the Pods Migrate:Packages export as requested in the Bug Report Template (Pods Admin, Components, Migrate:Packages, Enable, then Migrate: Packages, Export and save the result as a text file and upload here).
It speeds up our testing of your bug and verifies that we are configuring our test identically. Thanks!
Here you go:
Thanks! @slyderza :)
Mine actually worked immediately. @slyderza Have you tried duplicating this to a staging site and deactivating all your plugins except for WooCommerce and Pods?
This might actually be a plugin conflict.
Granted I also find that SQL Error unusual:
<e>Database Error; SQL: SELECT
DISTINCT
`t`.`ID`, `post_title_pretty`.`meta_value` AS post_title_pretty, `t`.`post_type`
FROM `wp_posts` AS `t`
LEFT JOIN `wp_postmeta` AS `post_title_pretty` ON
`post_title_pretty`.`meta_key` = 'post_title_pretty'
AND `post_title_pretty`.`post_id` = `t`.`ID`
WHERE ( ( `t`.`post_status` IN ( "publish" ) ) AND ( `t`.`post_title_pretty` LIKE '%e%' OR `t`.`post_title` LIKE '%e%' OR `t`.`post_name` LIKE '%e%' OR `t`.`post_content` LIKE '%e%' OR `t`.`post_excerpt` LIKE '%e%' ) AND ( `t`.`post_type` = "product" ) )
ORDER BY (`t`.`post_title_pretty` LIKE '%e%' ) DESC, `post_title_pretty`.`meta_value`, `t`.`post_title_pretty`, `t`.`ID`, `t`.`menu_order`, `t`.`post_title`, `t`.`post_date`
LIMIT 0, 15; Response: Unknown column 't.post_title_pretty' in 'where clause'
@jimtrue Your screenshot shows Checkboxes not the Autocomplete, Checkboxes work fine for me too.
I have set up a blank copy of Wordpress with just Pods, Woocommerce and Fakerpress and am getting the same error.
Here is my findings:
I have a test site with the issue happening, can I invite you to the site for testing? You can then see the error happening and also play with my settings.
@slyderza My apologies, I imported your package as provided which imported them all as checkboxes (which is probably your current configuration) so I didn't go back in to change them.
After switching (I did both AutoComplete for 1 and List View for the 2nd, leaving the remainders in Calculator Group as Checkbox) I didn't get the error with AutoComplete or Listview (which both use the Select2 AJAX searching), until I went past about 20 entries. I never get the SQL error on my installation (which only has WooCommerce, Pods and FakerPress), but the Ajax Search in Select2 is not working (with no JS errors in the Dev Console). If I remove your custom Orderby and override for the Field to display in Select, they both work.
If you can, send us an email to support@pods.io with login/invite to the site for testing. @pglewis This looks like we do have an issue here, but need to see the replicated SQL error, too. I'm also going to try to create a more simplified test for it.
I have created a user and sent details through to support@pods.io
Thank you.
@slyderza Nothing populated through here yet, unfortunately. I sent a test email after just to make sure our HelpScout wasn't stuck ;)
Apologies I don't believe my server is sending emails, I have manually mailed through the login details.
@slyderza Thanks for the website access. Yep, you're getting the same issue I was seeing locally. The AJAX just comes back with no response to the search. Where were you getting the SQL error you included above?
@jimtrue If you open Developer Tools and check Network activity before doing a search when you do the search you will see the Ajax calls response.
Thanks for that additional feedback @slyderza! Yes, I can replicate this and it indicates a two-fold issue:
1) Obviously we've got some odd construction happening on the SQL for something that should work normally (ie Customized Order By), and
2) Our DFV isn't providing any error reporting when it gets a SQL error.
I am also having a similar issue with our project. Long lists or relationship content that do not use the default "Title" field for the Display Field in Selection List provide no auto-complete content (with format 'Autocomplete' or 'List view').
Describe the bug I have a field on a Groups Custom Post Type that is set to be a Relation to a Products Custom Post Type. When choosing Autocomplete as the Format and a Meta Value as the Display Field I get a SQL error when searching on that field.
If I set the field to format Checkboxes then it shows the Meta Values fine. The SQL Error only happens when the Autocomplete Ajax request happens.
To Reproduce See below 2 screenshots showing how I have set up the relation field.
When searching here is the error: error.txt
Expected behavior I expect a list of product rows based on the post_title_pretty meta value.
WordPress Environment
Pods Package Export (helpful!)