• Resolved John Sundberg

    (@bhwebworks)


    Just updated Stream on most of my sites to 1.4.2, and I’ve noticed a growing number of these entries…

    “timestamp” setting was updated

    “expiration” setting was updated

    …by various authors and from various IP addresses.

    At this rate these are going to bloat the logs pretty fast. Any idea what they are and why they’re there?

    https://www.ads-software.com/plugins/stream/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Hi John,

    Which authors does Stream list?

    If it’s the same authors each time, you could consider including them in your Exclude rules.

    Could you post a screenshot?

    Thread Starter John Sundberg

    (@bhwebworks)

    Hi Luke,

    Those two summaries are linked with a variety of authors: myself (as the admin on each site), my clients (as editors and authors), and N/A.

    N/A has a variety of IP addresses, depending on the website, and sometimes it’s using my IP, my clients’ IPs, or my server’s IP, as well as other IPs I don’t recognize, such as these:
    150.70.172.202
    109.201.152.244
    64.125.188.26
    69.41.14.215

    So excluding the authors would exclude everybody, which would then make this plugin not as useful.

    Here’s a sanitized screenshot from a client’s site: https://db.tt/6qeqzpus

    Hey John – thanks for that. My feeling is that you’ve got a plugin that has created these settings, and is updating them occasionally. The author / IP is just whoever is using your site at the time.

    Could you list your plugins here, and we’ll try to figure out which one it could be?

    Or it can be some custom code in your theme, and as @luke has said, author/IP represents the session owner, not necessarily that he initiated the action himself, but instead plugin/theme code would be responsible for this while the user is on the website.

    I’ve just created an issue to track such problems even better:
    https://github.com/x-team/wp-stream/issues/467

    However, i think you can narrow the suspect code base by using the following shell command in the root of your site:
    grep -r ‘update_option.*expiration’ /root/to/your/site

    Thread Starter John Sundberg

    (@bhwebworks)

    I just checked 23 of my sites that are using Stream, and two out of all those sites don’t show any “timestamp” and “expiration” entries. Those two sites are still using Stream 1.3.1. All the others were using 1.4.2, and are now updated to 1.4.3.

    I checked the database for one of the sites using 1.4.3, and in the “stream_meta” table I found that each of these entries has a meta_key > option with a meta_value of ithemes-updater-cache.

    The one plugin I install on every site is BackupBuddy by iThemes.

    So having identified that, I don’t see a way to exclude only those entries in Stream > Settings. If I exclude “Settings” in either “Connectors” or “Contexts” then it’s going to exclude everything, and not just those iThemes-related entries.

    Hey John,

    I’ve created this gist to help you out. You’ll want to adjust the code a little to suit your particular needs – in particular you’ll need to run it twice (once for timestamp and once for expiration).

    https://gist.github.com/lukecarbis/11381175

    Drop that in your functions.php file in your theme and let me know how it goes.

    Thread Starter John Sundberg

    (@bhwebworks)

    Luke,

    Thanks for pointing me in the right direction, though your code didn’t quite work.

    $option == $recordarr['meta']['option']

    should have been

    $option == $recordarr['meta']['option_key']

    I forked it on GitHub and simplified it by removing the action condition and changing ‘timestamp’ to ‘ithemes-updater-cache’, which took care of both entries that I mentioned earlier.

    I also added a condition that removes WP Help plugin entries, which I previously had to block by excluding an IP address that they synced with.

    My modified code is here: https://gist.github.com/bhwebworks/11384243

    John

    Nice one, John! I’m marking this one as resolved.

    With v2.0, I think this code doesn’t work anymore. My Stream is again filled with BackupBuddy “timestamp” and “expiration”.

    Does anyone else see the same? And do someone have an updated code to filter those away from Stream?

    Thread Starter John Sundberg

    (@bhwebworks)

    Fredelig,

    Changing the variable $recordarr to $records seems to filter out the BackupBuddy entries again.

    John

    Thread Starter John Sundberg

    (@bhwebworks)

    Or maybe not. I just noticed that I’m still seeing those entries.

    Frankie or Luke, can you offer any advice for updating this code for v2?

    Hey John, we’ve got a feature planned (that was inspired by this forum thread) that will send a debug backtrace of every call that was made for each record and save it to the PHP error log, for debugging purposes.

    I just created a PR for this yesterday and it works, so you are welcomed to try out the code seen there on your install. With that filter enabled, just leave it running for a few days and then check your error log for the “timestamp updated” entries.

    add_filter( 'wp_stream_debug_backtrace', true );

    @john I’ve just made the filter better so you can set it to only create logs for certain records you may be interested in. I’ve used your use case as the example.

    https://github.com/wp-stream/stream/pull/660#issuecomment-63199981

    Thread Starter John Sundberg

    (@bhwebworks)

    @frankie,

    Thanks for working on this and adding that new filter. Now that I’m seeing these records in the error log, I’m still stuck on how to revise the wp_stream_record_array filter to work with Stream 2.x. and exclude entries from the Stream records.

    I’ve looked through 2.x and 1.4.9, and I can see how the code in the plugin has changed, but I’m not sure what I need to do to tweak the filter for the new version.

    Hi John, please try this out and let us know if it works for you.

    https://gist.github.com/fjarrett/12bd7b39b3efdd6d905e

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘"timestamp" setting was updated’ is closed to new replies.