Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › widget produces duplicate content
This topic contains 13 replies, has 2 voices, and was last updated by depad 6 years, 10 months ago.
- AuthorPosts
- January 30, 2016 at 8:05 am #7492
Hi Ernest,
sorry to bother you again but I found another bug (?) or strange behavior:
I have inserted the search widget in every page I have. Now when I check my site using screaming frog it creates mass duplicate content on my site.
Because every url is accessible through domain.de/page/ and domain.de/page/?s=
So the widget creates urls by adding ?s= to the end. That means every page is accesible with the same content through the canonical url and the ?s= url.
If I deactivate the widget the dc is gone – only one url left to spider.Another thing: the statistics won’t show anything. I have activated them but no results.
Can you again have a look at my installation ? Many thanks…
Best Regards,
MarkusJanuary 30, 2016 at 5:06 pm #7493Oh, sorry – the statistics works. I think I made a mistake with the statistics. But the dc problem exists…
February 1, 2016 at 6:57 am #7497I found the problem in the search statistics: if you leave it to All it produces no statistics – if you select a specific search it shows the special statistics.
A possible bug ?February 1, 2016 at 3:46 pm #7517Hi!
Can you link me to a page where I can look at this problem? I don’t think I understand this issue at all. The search widget does not add any links anywhere, except the “try this” keywords but those are not linking anywhere.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 1, 2016 at 5:43 pm #7523Big sorry! I accidentally meant the search results of the categories (which are noindex.follow), So: no dc problem just my fault: I didn’t realize that these pages are noindex.
But the problem with the statistics is still there…if I set it to “All” I get no statistics.
Did you see the ticket in the “related posts” section ? I bought your other plugin and have a question…
Bet Regards,
MarkusFebruary 1, 2016 at 10:07 pm #7526No, the error with the duplicate content appeared again.
http://www.screamingfrog.co.uk/seo-spider/ this is a spider tool you can use for free.
Scan my homepage, go to “Internal” tab an click filter->HTML (see only pages and categories) and you will see what I mean:
you can reach every page (not only the categories) normal and with ?s= at the end. If you right click on a url you can open it in the browser.
Do this with the normal url and with the url/?s= at the end
You see its the same page reachable under 2 urls. Thats duplicate content.
If you open a category with ?s= at the end you see search results in this category – thats okay so far.
After this:
You can go to my admin area and remove the widget (design -> widgets -> page sidebar) and after this on top of admin area there is WP Rocket -> delete cache and after this, please spider my page again with screaming frog:
you see only half of the number of urls than before – the ?=s urls for the normal pages are gone!Many thanks for your help…
Best Regards,
MarkusFebruary 2, 2016 at 10:40 am #7535Hi!
This is actually a great spider tool, I like it.
I have found the cause, but it was only a cosmetic issue, no worries. The reason was that in the invisible results area there as the link for the “Show more results” and it had the default value of “?s=” without the search phrase parameter. Since it’s invisible, search engine don’t account for it. I removed that default value from the code, now it should not appear in the spider anymore.
I will look into that statistics bug as well later, because I’m planning to re-work that section anyways in a future release.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 2, 2016 at 10:37 pm #7565Hi Ernest,
I’m glad you found the error. Great to hear that it doesn’t affect the site and its only a cosmetic thing.
Many thanks for your great help…I have only a problem with the related plugin. But i wrote you another ticket because of this.
Best Regards,
MarkusMay 16, 2016 at 8:13 am #8671You cannot access this content.May 16, 2016 at 8:37 am #8672Hi Markus,
I did change that immediately. I just checked, and it’s changed on both the repository and test environments. Are you sure you are using the latest version (4.8.4)?
I run a test on http://wp-dreams.com/demo/wp-ajax-search-pro/ and I don’t see the duplications anymore. Everything appears to me correctly in the results with the SEO spider application.The change was done within the wp-content/ajax-search-pro/includes/views/asp.shortcode.results.php file, where line 43 should be this now:
<a><?php echo asp_icl_t("More results text" . " ($id)", $style['showmoreresultstext']); ?></a>
The
<a>
tag had the href parameter defined and it was causing the duplication. Now it’s removed and only an empty, invisible anchor remains. Can you please check that line? If that is correct, then it should work, as it was exactly the change I made before.
If by any chance you are using result templating feature, then also check this in your theme directory within the /asp/ folder.
Let me know if you find anything, we proceed from there.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 16, 2016 at 9:36 am #8673Hi Ernest,
thanks for your reply.
I’m using the latest version. I have added a 301 redirect in my htaccess to redirect urls with empty ?s= to the source url – now google gets a 301 instead a soft 404.
I hope this helps.
I don’t know how this could happen. I just want you to know I have soft 404 messages because of empty ?s=
So I think google will find the ?s= but I don’t know where it will come from.
I did the fix with the 301 redirect and now I will see if this helps.I will reply as soon as google will crawl these urls again and reports again a soft 404.
Many thanks for your help.
Best Regards,
MarkusMay 16, 2016 at 9:39 am #8675Oh, I saw that you have changed the shortcode file – did you change the behaviour of the widget, too ?
Or is the same code used in the widget ? Because I use 2 widgets and I think that’s the reason for the ?s=Best Regards,
MarkusMay 16, 2016 at 9:48 am #8676Yes it’s the same, the widget executes the shortcode itself, so it’s actually acting as if a shortcode was used within a widget.
I think you can safely remove that .htaccess rule, as it’s no longer neccessary for this version 🙂
Google crawl data can be delayed by weeks in my experience, but I’m not sure how accurate the report dates are to be honest. If you make sure that every cache is cleared, I believe these 404-s should disappear after the next crawl.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 16, 2016 at 4:09 pm #8687Ok, I will try it. Many thanks for your help.
Best Regards,
Markus - AuthorPosts
You must be logged in to reply to this topic.