Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter 762mm

    (@762mm)

    Given that I have that code in functions.php and these searches are still happening (yet the other ones with no search term from my previous are not), where could these be originating from?

    Thread Starter 762mm

    (@762mm)

    These were happening before, I just didn’t notice because they were relatively rare compared to the other formats of slow queries. I’m guessing they are coming from the bad URLs Googlebot is crawling.

    Should this code that blocks the other queries with no search term block these?

    add_filter( 'relevanssi_search_ok', function( $ok, $query ) {
      return empty( $query->query_vars['s'] ) ? false : $ok;
    }, 10, 2 );

    All of them seem to have the same post exclusions, but I don’t know where they would come from. Assuming those are post IDs, there are 683 of them in the query, but only 11 of them correspond to actual posts in wp_posts. Those 11 posts don’t appear to be related to each other in any way.

    Thread Starter 762mm

    (@762mm)

    Thanks! That worked.

    It may seem like searches without search terms would be rare, but for some reason googlebot is crawling malformed urls that are causing thousands of these each hour on my site.

    I also had a fatal error with the update. Fortunately, it doesn’t seem to affect users who are not logged in.

    To fix it I replaced the plugins/enhanced-tooltipglossary/ directory with the previous version from a backup. Then I disabled auto-updates for this plugin.

    I just did this manually. If you don’t have ssh access or don’t know Linux commands, perhaps you can do it through your control panel or your host can help you.

    If you don’t have a backup, you can just disable the plugin for now. You can simple rename (or delete) its directory or do it via the database:
    https://wordpress.org/support/article/faq-troubleshooting/#how-to-deactivate-all-plugins-when-not-able-to-access-the-administrative-menus

    I am using InnoDB and am not seeing this message. YARPP has created FULLTEXT indexes of the post_title and post_content columns in my wp_posts table.

    What version of MySQL are you using? The above is true for me on both a server running MySQL 5.6.35 and one running MariaDB 10.0.29.

    The issue with my IP being blocked was fixed (thanks mitcho!), and at first this seemed to solve this problem. But when the latest update to Yarpp came down (3.5.5), my settings were reset again. Since then they continue to be reset a few times a day.

    So the root cause to this issue of Yarpp settings being reset lies elsewhere. My guess is it has to do with WP caching the plugin options, and I will post again if I figure it out.

    Mitcho – I think I finally figured out the root cause. It seems like mitcho.com is blocking my server, so the current version check fails. Perhaps clearing my IP (sent via pm) from your firewall/block list will resolve this issue.

    I’m not sure what it actually returns once it times out, and why that changes settings on occasion. Looking at the code it looks like it should handle this situation gracefully. However, that won’t really be an issue if the server starts returning the correct data for me.

    I continue to have this problem. The settings have been resetting a couple times a day for the last few days.

    I am currently running 3.5.3, so at the top of my yarpp settings page it says:
    Yet Another Related Posts Plugin Options 3.5.3

    When the settings reset it then also says the following near the top of the page:
    There is a new version of Yet Another Related Posts Plugin available. View version 3.5.3 details or update automatically.

    However, as mentioned I am already running 3.5.3. If I click the “update automatically” link, it confirms this by saying “The plugin is at the latest version.”

    Any idea why it would say there is a new version available, when I am already at that version? Is there any code related to the version check that would update the settings? Please give me any pointers/suggestions on where to look in the code so I can help debug this.

    Thanks!

    Yes, updating and saving the settings works. Yes, they reset themselves without revisiting the settings page.

    Sometimes they reset a few times a day, but other times it goes weeks without a problem.

    Yes! This beta fixes it!

    I tested a post with ID=0 in the cache where “no related posts” was displayed, and it now displays the related posts.

    Thanks! I will test out the beta and report back.

    I don’t know *how* you would ever get such structure of data, but…

    Previously I always found the date for all the data for one reference_ID in the cache to be the same, so the ID=0 is being created at the same time as the other data. However, I just located some where it is a second or two later than the other data. Perhaps it is always being generated just after the other related data, but it isn’t usually noticeable since it happens within the same second.

    It is NOT a situation where there are related posts but no related pages, because I see the ID=0 situation even when there are both related posts and related pages listed in the cache.

    In this example, ID 7155 and 9732 are pages, where the rest are posts.

    28720 0 0 2012-09-14 22:25:04
    28720 4149 23.4 2012-09-14 22:25:04
    28720 4266 27.1 2012-09-14 22:25:04
    28720 7155 3.2 2012-09-14 22:25:04
    28720 9732 3.9 2012-09-14 22:25:04
    28720 12611 23.7 2012-09-14 22:25:04
    28720 14788 23.3 2012-09-14 22:25:04
    28720 23162 23.5 2012-09-14 22:25:04
    28720 25085 33.8 2012-09-14 22:25:04
    28720 27918 23.9 2012-09-14 22:25:04
    28720 28210 26.5 2012-09-14 22:25:04

    Mitcho- Thanks for the response.

    No one else has access to the settings. I run two wordpress sites (both use yarpp), but only one is having this problem. I always update the core and plugins to the latest release, so right now I am running WP3.4.2, but I’ve been having this issue for a while.

    I backup the files and DB directly, so I do not have any backup plugins. Here is a list of the plugins used:
    Akismet
    All in One SEO Pack
    Allow PHP in Posts and Pages
    Google XML Sitemaps
    Regenerate Thumbnails
    Term Management Tools
    User Role Editor
    Wonderm00n’s Simple Facebook Open Graph Meta Tags
    WP Super Cache
    WP Widget Cache
    and of course: Yet Another Related Posts Plugin

    Most of these are also used on my other site that doesn’t have this problem, so we can probably eliminate most of them as a potential cause. If we do that, the only ones left are:
    All in One SEO Pack
    Regenerate Thumbnails

    Both of those have been installed on my site for a long time, even before yarpp was installed, so they were definitely around before this issue started with yarpp. (I believe it began around January, but I am not totally sure.)

    I know I tried installing some beta versions of yarpp around that timeframe to try to fix problems I was having with random posts showing no related.

    Here are a few things I have tried, which have not solved this problem:

    1) Uninstalled yarpp and reinstalled.
    2) Deleting all transient data from the DB.
    3) Making basic adjustments to my yarpp settings just to be a little different (i.e. raising or lowering the match threshold a little.)

    Mitcho – Thanks for the response. The strange thing is that there is other related data in the cache even when there is the ID=0 item.

    i.e. I limit it to 8 related posts in my settings, and in the cache there will be a total of 9 related for a post with one of them having the ID=0.
    Deleting just that one post allows the 8 related ones in the cache to be displayed without it having to regenerate the data. If I delete all 9 it does regenerate the same 8 valid related items in the cache. (When I have regenerated the data, I have never seen it generate one of these ID=0 values.)

    I have not seen any pattern to it. As mentioned, if I flush the cache data for a particular post that is affected, I don’t see it regenerate the ID=0 data, so it doesn’t seem related to the particular post. It really seems quite random, but I didn’t notice this happening at all until a yarpp update around January.

    I’ll try to track things better and let you know if I spot any patterns. The two sites where I am experiencing this issue are on different servers and both of them have very fast cpu and IO subsystems, plenty of RAM, and always have a low load, so I don’t think it is a lack of hardware resources.

    I’ve been having this same issue for quite a while as well. Without warning, some of the yarpp options get reset, and removing/reinstalling and everything else I have tried has not fixed it. No other plugins I’m using have this problem.

    When it resets it stops using my custom template file, so the related posts are displayed very poorly on my site. Additionally, it makes it so that Bodies and Tags are “do not consider,” so the related posts are not very relevant.

    To fix it I simply access the options through the WP dashboard, switch them back, and save the changes. However, there is no telling if it will switch back later that day or some random time weeks later.

    When it does this, there is also an update message about a “new version of this plugin” at the top of the yarpp settings page, even though I already have the latest version installed. Could it be that it is getting confused about what version it is / is the latest (perhaps if the latest version checking fails) and then it is running some upgrade part of the code because it thinks these are new options were just added and need to be initialized?

    I’ve been having this issue (random posts with no related) on multiple sites since a yarpp update back around 9 months ago. Looking through the forums it looks like many other people are having the same issues.

    While investigating this I noticed rows in wp_yarpp_related_cache that had an ID of 0, which would be invalid if the ID was supposed to be the ID of a post. (These rows also had a score of 0.) Even though there were other valid related items in the cache for the same reference_ID, apparently yarpp returns nothing as related when it encounters this bad data.

    Deleting these rows fixed things, so as a workaround I made a script that periodically removes this bad data and everything has been working fine.

    mitcho – Perhaps the above might lead to a solution. If this is indeed bad data, you can find out where it is coming from. Since it seems to occur randomly (deleting all data related to a reference_ID and regenerating it doesn’t cause the bad data to come back), it may take a little while to track it down. In the meantime you can easily block invalid data like this (any with ID==0) from being written to the cache and/or ignore it when you get bad data when creating the related posts to do the best job possible at creating the related list even with corrupt data.

Viewing 15 replies - 1 through 15 (of 15 total)