I am trying to: order listings by last name (which is a custom field, specifically set for this purpose).. capture.png
Link to a page where the issue can be seen: hidden link (capture2.png)
I expected to see: ordered by last name (capture4.png). Capture3.png shows my test site which is not yet updated to the newer version of toolset views which is causing the issue.
Instead, I got: some sort of random order.
One small extra update. I've now switched the view to order by post title... which works, so you won't see the error that was captured in the screen shots.
Hi, I'll be glad to help figure this out. Is it possible to update the test site to use the latest versions of the Toolset plugins, so we can replicate the problem and run additional tests to determine the cause? If that's okay with you, please provide login credentials to the test site where I can log in and see the issue occurring. I'll take a closer look and run some tests, disabling other plugins and so forth to help isolate the cause of the problem.
Okay I believe I have a temporary fix for this issue in place on Test. I have edited the View here:
hidden link
I added a Query Filter based on the Last Name (Ordering) field, such that the field is not equal to an empty string. This adds the field to the meta query and seems to fix the ordering issue. Screenshot attached showing the modification.
This filter should not be necessary. I've set up a similar View of Products in my local environment and was able to replicate the same problem, so I suspect this is a bug in the current software. I am escalating to my 2nd tier support team for additional investigation, and I'll let you know what I find out.
FYI I bumped up the memory allocation in the Test environment by adding this code to wp-config.php, because I ran into some fatal errors related to memory during testing:
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
Feel free to remove that code or adjust as needed.
Thanks! I've moved your fix onto my live site, and am happy with that solution. Of course if its a bug, and 2nd tier support provides another fix, so much the better.
Jesse
Okay good to hear the fix works on the live site. I will keep you posted here and let you know when this workaround has been patched in an upcoming release, or if there is any other information to share from the 2nd tier/developers.
Our developers have created a patch file for this issue. I've tested in my local environment and it seems to solve the problem without requiring the workaround I already described. You can download an archive containing the patch file here:
https://drive.google.com/file/d/1Z8qOFnPDe8FLfK3lzmn0f-btuftAmQRv/view?usp=sharing
To apply the patch, unzip it and upload the file it contains to replace the file with the same name in your Toolset Views plugin:
\wp-content\plugins\wp-views\application\models\WooCommerce\WcQuery.php
For those who use Toolset Blocks instead of Toolset Views, the file should be replaced in the Blocks plugin instead:
\wp-content\plugins\toolset-blocks\application\models\WooCommerce\WcQuery.php
Please apply the patch and let me know if the issue is not resolved.
My issue is resolved now. Thank you!
Hello, just a quick update to let you know our team is in the process of pushing out updates to several Toolset plugins including Blocks and Views. Once the updates are fully deployed, you will be able to use the automatic update feature in wp-admin > Plugins > Add new > Commercial tab > Toolset Installer panel to update automatically. You may need to click "Check for updates" to refresh the plugin list. The new versions of the plugins include the fix for this issue, so after updating to Views 3.5.2 / Blocks 1.5.2, you should no longer need the patch. Thanks for the report and for your patience while we worked to resolve this sorting problem.