Skip Navigation

[Resolved] Latest Update Introduces Issues for Date Filtering

This thread is resolved. Here is a description of the problem and solution.

Problem:

After updating Toolset Blocks from version 1.6.14 to 1.6.15, the post date filtration functionality in multiple views on my site stopped working. The view loop output no longer displays any items in the updated environment, while it works correctly on the production environment with the older version.

Solution:

In the new version of Toolset Blocks, it is necessary to specify a value for the attribute in the date filter section of the view's shortcode. If no value is specified, the filter conditions are combined with an AND operation, resulting in no items being displayed. Removing the "meetingmonth" attribute or specifying a value for it in the shortcode resolves the issue.

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.

This topic contains 23 replies, has 4 voices.

Last updated by Christopher Amirian 3 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2711049

You should be able to access the page if you're logged in as an admin. It's possible the Restrict Content plugin might be interfering, so I've disabled it in the staging environment so you can review the page without having to be logged in.

It CANNOT be disabled in production since it's a mission critical component which is configured to keep the average user from accessing sensitive documents that are not intended for the public's eyes.

It is clear that there is a bug with that Restrict Content plugin that must be addressed, so I will be attending to that to ensure proper operation on production.

#2711050

I'm not sure if my previous reply made it through, but it either was a caching issue or simply because there was a bug with an older version of Restrict Content, but updating the plugin on production allows me to access the Board Member Resources pages. I've disabled it on staging to make things a little easier for you, however.

#2711385

Minesh
Supporter

Languages: English (English )

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

Can you be bit more specific now with what section of the following page:
- hidden link

What view is not working and with what date condition?

What is your expected results?

#2711916

Please see my comment from July 16th for the answers to your questions. I even provided screenshots.

The views in question are Resource Links and Resource Links (Grouped by Month).

#2712574

Minesh
Supporter

Languages: English (English )

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

I logged in as admin using the same access details to your production site.

When I try to access the page which is you shared on July 26:
- hidden link

It redirect back on login page and shows me message "Please login below to access the Board Member Resources.". Do I require to login as frontend user?

Also, I see on your production site you did not updated the Toolset plugin to latest version. Why?

Can I've two staging site, one that shows the expected result with problem URL and another staging site where I can see the issue with problem URL so I can compare both staging site working and not working and troubleshoot further.

The confusion arises because with your initial post you shared different problem URL page:
- hidden link

Also share all required information what views used and with what section on the page you have issue with and what is your expected results. Once I've all this information I will be troubleshoot with the latest problem URL you will share and guide you with the right direction.

I have set the next reply to private which means only you and I have access to it.

#2720079

I apologize if I haven't been super attentive to this ticket as I have been pushed to other priority tasks, but I will try to address your questions in the order you have asked them in your latest reply (your questions will be in bold and italics):

I logged in as admin using the same access details to your production site.

When I try to access the page which is you shared on July 26:
-
hidden link

It redirect back on login page and shows me message "Please login below to access the Board Member Resources.". Do I require to login as frontend user?

There was a bug with the Restrict Content plugin that was resolved in a later update (I tested this after I encountered the redirect issue you reported experiencing). It's possible that your browser has the old buggy redirect cached or something because accessing this link hidden link should give you the board member resources page in this screenshot: hidden link

You do not need a special login to access this page provided you're logged in with a user with an Administrator role (which the toolsetsupport user is already set as), but if the redirect operation still isn't working for you, you can temporarily disable the Restrict Content plugin to try and view the page just so long as you re-enable it when you're done.

Also, I see on your production site you did not updated the Toolset plugin to latest version. Why?

Toolset Blocks is not up to date on production because the fixes you reported are not fully functional, so I've dialed it back to a version in which the functionality was still working. I can't very well leave a municipal waterworks company's website in a broken state, now can I?

Can I've two staging site, one that shows the expected result with problem URL and another staging site where I can see the issue with problem URL so I can compare both staging site working and not working and troubleshoot further.

I'm creating a second staging environment which will be found at hidden link once WP Engine has finished creating the environment. I'll have to check on it after the weekend to see if everything migrated over properly because there may be a chance that could happen. This environment will be a carbon copy of the production environment with Toolset Blocks out of date and in working condition.

The hidden link environment will be up to date and not in a working condition with the view filter implementation in question.

The confusion arises because with your initial post you shared different problem URL page:
-
hidden link;

The View filter implementation appears to work as originally intended on the What We Do page after the fixes were applied, which is why I moved onto the Board Member Resources, which use a View that is a variation of the Views found on the What We Do page. The implementation on the Board Member Resources pages do not appear to work with the latest version of Toolset Blocks which is why I diverted attention to those pages. I apologize for the confusion.

Also share all required information what views used and with what section on the page you have issue with and what is your expected results. Once I've all this information I will be troubleshoot with the latest problem URL you will share and guide you with the right direction.

The Views in question are as follows:

  • Resource Links
  • Resource Links (Grouped by Month)

We're going to be focusing on the 2024 Board Member Resources page now, which uses the Resource Links (Grouped by Month) view, which is an altered version of the Resource Links view with similar query filter configurations utilizing the Post Date Filter.

  • Working example on production (Toolset Blocks version 1.6.14): hidden link;
  • Non functioning example on staging (Toolset Blocks version 1.6.16): hidden link;

At the time of this posting, the dev environment is still not fully copied over, but as a carbon copy of the production environment, the link to access the board member resources will be as follows (you will need to be logged in to access this page): hidden link

I have set the next reply to private which means only you and I have access to it.

There is no need. Administrator accounts have full access to these pages provided they are logged in. Your credentials should be the same on all three environments. If the Restrict Content plugin continues to interfere, simply disable the plugin (if you are on production, PLEASE re-enable the plugin once you're done troubleshooting).

I don't have much time left in my day to troubleshoot the new dev environment with WP Engine, so you're gonna have to deal with the Production and Staging environments I originally gave you access to until Monday. Either way, I hope I have provided enough information for you here to troubleshoot the issue and have provided answers to all of your questions.

#2723016

Christopher Amirian
Supporter

Languages: English (English )

Screenshot 2024-08-19 at 16.53.26.png

Hi there,

Thank you for the information. The problem that you are experiencing is because in the new version of Toolset Blocks you need to specify a value for the attribute that ou add in the data filter section.

I mean when you call the views shortcode you should have a value for the attribute, if not it will try to AND the two sections, and the result will be no item.

In the staging website, as soon as I removed the meetingmonth (because you did not specify any date for that as an attribute in the shortcode that called the view) the issue is fixed:

hidden link

If you want to have "meetingmonth" attribute, you need to specify a values for it in the shortcode.

Thanks.

#2725834

What if there were conditions where I needed to use the "meetingyear" attribute in one application and "meetingmonth" attribute in a different application of the same view? Make a copy of the view? My understanding, given the original configuration, was that the filter wouldn't affect the output of the view if the attribute it was tied to wasn't being used in the application of the view shortcode.

That said, I think I ended up not using the "meetingmonth" attribute in any of my implementations, so it's not that huge of a loss. I need to check though before I just disable that attribute willynilly.

[Update]: I checked all my applications of the Resource Links views, finding that I'm no longer using the "meetingmonth" attribute in any of my applications, so I removed the attribute as recommended, updated the Toolset Blocks plugin, and it appears that everything is working as it should.

#2729756

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I'm glad that you managed to fix the issue.

As a reference, yes, in the new version, you will need to provide a value for each attribute that you add.

Thanks.

#2733188

Ok, thank you for your help.