mpserellis
Forum Replies Created
-
Hello,
Right, the video you provided does NOT replicate the issue I described which is why I kept replying to your comments. A number of times now I told you that it ONLY occurs when you ONLY use the price slider! The video you provided shows you selecting one of the check boxes!
I have just checked your demo site again and it is NOT working there, it still gives “Oops! That page can’t be found.”.
Please try it again on your site and use ONLY the price slider to filter. Go to page 3 of your demo site and then slide the max price down to 16. Do not select any other filter option. You WILL get page not found just as I do.
Please, I am asking you to re-read my comments describing how to replicate the issue.
Thank you
MarkI can assure you it is not in the latest version 1.2.2.1 !! That is the version I was using and is the version used in the demonstration I have set up!
It seems you are very unwilling to accept there is anything wrong. Tell me, have you seen the issue I have described? Have you been to the test site I set up specifically to prove the point? Have you checked the code I provided to fix the issue?
Hello,
This is how I have fixed the problem. I changed part of the function woof_get_submit_link() found in front.js by adding one line as shown below. The line I added removes the /page/x from the url before submitting:
if (Object.keys(woof_current_values).length === 2) { if (('min_price' in woof_current_values) && ('max_price' in woof_current_values)) { var l = woof_current_page_link + '?min_price=' + woof_current_values.min_price + '&max_price=' + woof_current_values.max_price;l = l.replace(new RegExp(/page\/(\d+)\//), "");if (woof_is_ajax) { history.pushState({}, "", l); } return l; } }This is something you do further down the same function if there are other options selected but in this case we only have min_price and max_price so before my fix your javascript was not returning to page 1.
If this helps anyone before the plugin author releases a fix and if you have enabled “Optimize loading of WOOF JavaScript files” found under Settings > Advanced then you will also need to change the front_comprssd.js script or disable the optimization so that it uses front.js.
Regards
Mark- This reply was modified 6 years, 8 months ago by mpserellis.
No, this is not a solution! But just to try your suggestion I set up a brand new WordPress site. All I did was install WooCommerce, import the sample products, and install your plugin latest (free) version.
The only configuration I did was to enable all items under Structure (search by price is set as “woo range-slider”). And under options I changed “set filter automatically” to “yes” and “Autosubmit” to “no”.
That’s it, there are no javascript optimization plugins and no caching. The problem still persists. Please go to http://woof-test.mpserellis-dev.co.uk/shop/page/2/. This is page 2 of the sample products.
- Click on the “magnifying glass” icon to expand your filter.
- Reduce the maximum price to £8
- DO NOT select any other filter options
- Click “filter” button
You will see “Oops! That page can’t be found.” instead of showing the 1 product that falls within that price range.
There is clearly a bug in your code and not necessarily anything to do with the javascript I initially highlighted. I am going to spend some time in your code trying to figure this out because you seem unwilling to take it seriously and I will post back here in case it helps anyone else.
Hello,
You don’t need that because the issue is present on your demo site as demonstrated previously. Have you checked? Have I not explained well enough that you can replicate it? I do not wish to put my link here.
Thank you
MarkLink and instructions how to reproduce issue was in my previous comment. After following instructions I provided above you will get:
https://demo.products-filter.com/page/3/?min_price=7&max_price=15
Hello,
Thank you for taking the time to do the screen capture video. After a lot of searching the problem still persists. I found that the problem is also present on your demo site:
Please go to page 3 on your demo site. Then using only the price slider change the maximum to $15 and click filter. I get page not found.
What I found was that if you use any other filter it works correctly, the bug is only present when filtering on price only.
Thank you
MarkHello,
I did that but it didn’t not solve the problem (it was previously set as -1). I have disabled caching plugins and force refreshed browser (developer tools also open with disable cache selected) so I can be pretty sure it is not a caching issue.
Please let me know if you have tested the issue as described because if you have and it returns to page 1 when the filter button is clicked then I need to investigate if there are any plugin conflicts that could be causing the problem. However, I do not think there are.
Thank you
MarkHello,
I wonder if you could take another look at this because I think the resolution you implemented for this ticket has caused a problem for us. In our case we using your plugin with a Variable product and the base product has no bulk prices only the variations have bulk prices. Because of that when the page is first loaded “wdp_bulk_table_content” now doesn’t exist in the dom and so when the variation is selected on the frontend the javascript doesn’t execute the ajax to fetch the table for the variation.
frontend.js (lines 7 to 13):
if (typeof jQuery('.wdp_bulk_table_content').attr('data-available-ids') !== 'undefined') { available_ids = JSON.parse(jQuery('.wdp_bulk_table_content').attr('data-available-ids')); } if ( available_ids.indexOf( parseInt( product_id ) ) === -1 ) { return; }Please let me know if you’d like any more information.
Forum: Plugins
In reply to: [Simple Google reCAPTCHA] Conflict with Contact Form 7Hi @minor,
Unfortunately it did cause a problem which is why I investigated it, not a major issue though because I upgraded in test first so live still happily uses the previous version.
I appreciate your reply and look forward to the next update.
Thank you for a great plugin.
MarkForum: Plugins
In reply to: [Sweet Captcha] SweetCaptcha analytics possibly affecting google analyticsRight, I have implemented a workaround therefore the failing page url given above will no longer report an error.
“All In One SEO Pack” plugin provides a filter when creating the analytics code snippet and so I was able to change the code so that it only executed after the page had loaded and made it use whatever was set as the GoogleAnalyticsObject (i.e. window[GoogleAnalyticsObject]), on pages with SweetCaptcha that was the sweetcaptchalyticsObj, on other pages that was ga.
I don’t pretend to know how the analytics script works but this workaround made the Tag Assistant extension happy so I think Google should be happy. I also don’t really know who should change their code so I will mark this topic as resolved.
Forum: Plugins
In reply to: [Sweet Captcha] SweetCaptcha analytics possibly affecting google analyticsPlease note: I made a mistake with the “Page that is failing” link in the post above. The destination of the link is correct the text displayed is not. I had some issues there and must have copied the wrong text. Sorry.
I can confirm that if I disable the SweetCaptcha plugin then the Tag Assistant reports all OK. Looking further into the analytics debug it says:
“Tracking script already loaded. Abandoning initialization.”
The page seems to load and run the SweetCaptcha analytics code first which loads the tracking script then it appears to run the snippet in the head which is generated by the All In One SEO Pack plugin and fails.
If anyone can point me in a direction to resolve this I would be very grateful.