Skip Navigation

[Resolved] View not displaying after all products have been deleted and added again

This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 3 voices.

Last updated by Minesh 3 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2041763

I am trying to:
After upgrade to the latest version: This page used to display the results in a spreadsheet format with no issues using custom fields. After removing all products and re-importing them, the view does not display anymore. These were all the products that were imported before.

Link to a page where the issue can be seen:
hidden link
I expected to see:
Results like before

Instead, I got:
no items found

#2042429

Hello and thank you for contacting the Toolset support.

I spot a corrupt filter in the view that may cause the issue. Check this screenshot hidden link
This corrupts the underlying SQL and returns no data. Check this

So, I tried to copy the existing content loop and filters to another view, but I encounter errors. Check this screenshot hidden link

Can you please provide FTP access to your website so I can check what errors are triggered? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2042999
#2047703

Thank you! I was able to connect with FTP and activate debugging. The issue that I was encountering is a Memory issue, so I temporarily increased the WP_MEMORY_LIMIT and now my view renders.

The issue seems to come from a composite filter(between) on an "xct" field, which I could not find, there are no field groups for products post type that has this field on it:

      From: [wpv-control-postmeta field="xct" type="textfield" url_param="wpv-xct_min" style="display:inline !important;width:38px;" ]
	  To: [wpv-control-postmeta field="xct" type="textfield" url_param="wpv-xct_max" style="display:inline !important; width:38px;"]

Can you help me understand what this filter is meant for? It is checked against what field?

#2048331
view loose 2.jpg
view loose 1.jpg

hi Jamal-
the field xct is a custom field of the product which searches by the value in that field. On the mentioned view page you will see the slider ("Carat Range") which used to filter products based on xct . If you create a new view, you will be able to see that custom field "xct".

you can see custom field xct in the products with product category loose diamonds. I have attached an example.

hope this helps

#2048705

Thank you! That explains it.

Working on my test view, I see that the filters are used in the view's query, but I also spotted another custom field which I don't know where it comes from. Check this screenshot hidden link
This will search for the products that match the query(between 1, 8.9), but also that have a custom field "Yct1". Adding a check for another custom field is usually used for ordering, but in this case, it is just odd. We need to test this again in a minimal setup(Only Toolset plugins+WooCommerce+Default theme) to try to isolate this and spot where it comes from.

Can you provide a staging site where I can switch themes and plugins without impacting your live site users? If yes, I am setting your next reply to be private to let your share credentials to it safely.

#2052591

Hi Jamal-
Yct1 custom field that you mention does not belong to this view. It is a custom field for a different group of products. We are only querying "loose diamonds"
Product categories in one of these: loose-diamonds

let me know if you still need to stage a site for you.
Best!

#2054889

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Jamal is on Vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.

As Jamal shared, on custom fields page, I do not see all those fields for which you added the Frontend Filter those fields are missing from the custom fields page: hidden link

Can you please tell me to what custom field group you added all those field for which you added the frontend filter, please check the following screenshot: hidden link

Then I've visited the "Post Field Control" page and I can see all those fields are available there:
=> hidden link

Can you please try to make a custom field group and assign it to product post type and then from the "Post Field Control" page, add your required fields and set it to "Manage with Types" and click on "Change Assignment" link and set the field to display with the custom field group you just created.

Does that help you to resolve your issue?

#2076697
view1.jpg

hi-
This is all extremely confusing. This view has been working for years until this last update. I never had to go through these mentioned procedures. Nonetheless I tried to follow these instructions as best as I could and the view is still not working.

Years ago when I created this view, it worked like a charm the first time. Also I am unable to modify a filter (see attached please)

#2077273

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As shared with the previous reply:
=> https://toolset.com/forums/topic/view-not-displaying-after-all-products-have-been-deleted-and-added-again/#post-2054889

Have you set the xct field Managed by Types from the "Post Field Control" page?

#2077347
view1-2.jpg

yes, I have

#2078797

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As with the "xct" field you are using the between you need to set the "xct" field as number field which I already did and the query filter is set as:

xct is a number between URL_PARAM(wpv-xct_min), URL_PARAM(wpv-xct_max)