Forum Replies Created

Viewing 15 replies - 1 through 15 (of 162 total)
  • Plugin Author Tim Reeves

    (@tim-reeves)

    A quick look at the code shows that load_plugin_textdomain() is added to the init action – and there are no other calls of this nature in the plugin. So I don’t see any problem…

    Thread Starter Tim Reeves

    (@tim-reeves)

    Thanks Mehmet, what follows is the reply from the Author of “WP Crontrol”:

    John Blackbourn wrote: Thanks for the report. This is due to the WP Statistics plugin only adding callbacks for its cron events when the request is not a request to the admin area. In the code you posted above, the calls to add_action are contained within a guard condition so the code only runs when !Request::isFrom(‘admin’) is true. This means that when you look at the Cron Events screen in the admin area, those events don’t actually have any actions registered and WP Crontrol is correct. Only when the code runs in a request that isn’t to the admin area do those events have callbacks registered. This is covered by the “Conditionally registered actions” section in the WP Crontrol documentation ( https://wp-crontrol.com/help/no-action-cron-events/#conditionally-registered-actions ), although this is the first time I’ve ever seen a plugin use a conditional check for an admin area request. That was a long way of saying that WP Statistics should move those add_action calls out of the !Request::isFrom(‘admin’) guard condition. There’s no reason for that code to be conditional. Post Link: https://ww.wp.xz.cn/support/topic/wp-crontrol-says-no-action-but-developer-says-yes/#post-18429923

    Thread Starter Tim Reeves

    (@tim-reeves)

    Thanks so much John for taking the time to explain!

    Thread Starter Tim Reeves

    (@tim-reeves)

    Sadly I’m still seeing similr (not identical) entries in my log. I’ve condensed the old and new entries to make them a bit easier to read:

    OLD:
    WHERE flt = ‘cron’ AND id NOT IN (
    SELECT id FROM…’ at line 1 for query DELETE FROM ‘b3wp_nxs_log’ WHERE flt = ‘cron’ AND id NOT IN (
    SELECT id FROM (
    SELECT id FROM ‘b3wp_nxs_log’ ORDER BY id DESC LIMIT 360
    ) foo
    ) made by do_action_ref_array(‘nxs_hourly_event’), WP_Hook->do_action, WP_Hook->apply_filters, nxs_do_this_hourly, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC_CallUnderlying->query, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_WpdbNew->default_query

    NEW:
    SELECT id FROM ( S…’ at line 1 for query DELETE FROM ‘b3wp_nxs_log’ WHERE id <= ( SELECT id FROM ( SELECT id FROM ‘b3wp_nxs_log’ ORDER BY id DESC LIMIT 1 OFFSET 150 ) foo ) made by do_action_ref_array(‘nxs_hourly_event’), WP_Hook->do_action, WP_Hook->apply_filters, nxs_do_this_hourly, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC_CallUnderlying->query, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_WpdbNew->default_query

    I’ve decided to deactivate the plugin, the site is hardly active in the respect covered anyway.

    Thread Starter Tim Reeves

    (@tim-reeves)

    Thanks @lacavernamx – I’ve applied your fix, can tell you tomorrow if all is good.

    Thread Starter Tim Reeves

    (@tim-reeves)

    Hi Marc,

    thanks for your reply. Yes I am using the latest version, and now I’m not seeing the problem. Perhaps it was something to do with my caching plugin compacting too much.

    Cheers, Tim

    Thread Starter Tim Reeves

    (@tim-reeves)

    So sorry – wrong plugin )-:

    Thread Starter Tim Reeves

    (@tim-reeves)

    I’ve looked at all the different content types listed on the “Titles & Meta” page – there are 33 (!) of them. For better or worse, my client likes BIG plugins, so I’ve got items from Thrive, from Tribe, and God knows what else there. Is there any way I can easily find out which if them is creating an incomplete WP_Post_Type without actually editing the code and having it output debugging info?

    Thanks!

    Thread Starter Tim Reeves

    (@tim-reeves)

    Thanks for your prompt help. I looked through ALL the settings under “Titles & Meta” and made sure that there was a default image set, and explicit images where an input field was available. However, the problem remains. I did notice the problem-causing request:

    request: “GET /podcast/ HTTP/2.0”

    Looking at the title and meta settings, there is Category (light grey background) of “Post + Podcast”, with the available categories Keywords and Podcasts, but neither of these offer an image setting, only Archive Title and Archive Description.

    So I’m a bit stumped…

    Could you not simply protect class-image.php from causing the warning?

    Plugin Author Tim Reeves

    (@tim-reeves)

    Sorry, but as you can see at the head of the description, I’m looking for someone to take over the plugin – I’ll be 69 in 2 weeks time. Enough is enough.

    What I can tell you is that the dropdown styles are stored as a single option value with key “tcs_addstyledrop” in the WordPress wp_options table. It’s an array like this:

    a:12:{i:0;a:7:{s:5:"title";s:15:"Block quotation";s:5:"block";s:1:"q";s:7:"classes";s:11:"asparagraph";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:1;a:6:{s:5:"title";s:16:"Inline quotation";s:6:"inline";s:1:"q";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:2;a:6:{s:5:"title";s:18:"Inline Attribution";s:6:"inline";s:4:"cite";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:3;a:7:{s:5:"title";s:10:"Hilite Div";s:5:"block";s:3:"div";s:7:"classes";s:9:"hilitebox";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:4;a:7:{s:5:"title";s:18:"Hilite Div Wrapper";s:5:"block";s:3:"div";s:7:"classes";s:9:"hilitebox";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:1;}i:5;a:7:{s:5:"title";s:10:"beforelist";s:8:"selector";s:1:"p";s:7:"classes";s:10:"beforelist";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:6;a:7:{s:5:"title";s:10:"textshadow";s:6:"inline";s:4:"span";s:7:"classes";s:10:"textshadow";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:7;a:7:{s:5:"title";s:14:"Inline smaller";s:6:"inline";s:4:"span";s:7:"classes";s:7:"smaller";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:8;a:7:{s:5:"title";s:14:"Block footnote";s:5:"block";s:1:"p";s:7:"classes";s:8:"footnote";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:0;s:7:"wrapper";b:0;}i:9;a:7:{s:5:"title";s:11:"Smiley-Icon";s:6:"inline";s:4:"span";s:7:"classes";s:10:"icon-smile";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:1;s:7:"wrapper";b:0;}i:10;a:7:{s:5:"title";s:10:"Frown-Icon";s:6:"inline";s:4:"span";s:7:"classes";s:10:"icon-frown";s:6:"styles";a:0:{}s:10:"attributes";a:0:{}s:5:"exact";b:1;s:7:"wrapper";b:0;}i:11;a:7:{s:5:"title";s:3:"\">";s:6:"inline";s:3:"\">";s:7:"classes";s:3:"\">";s:6:"styles";a:1:{s:3:"\">";s:3:"\">";}s:10:"attributes";a:1:{s:3:"\">";s:3:"\">";}s:5:"exact";b:0;s:7:"wrapper";b:0;}}

    Theoretically you could swap entries around by manual editing, but I think that would not be so easy… it’s the serialized representation of an array of associative arrays. Easier to write a mini-program or -plugin which allows you to manipulate the entry order. 🙂

    Alternatively, if you are a PHP programmer, please consider adopting this plugin.

    Plugin Author Tim Reeves

    (@tim-reeves)

    Hi @davidegiorgetta ,

    I’ve looked at the code. There’s no limit on the part of my plugin to the number of formats possible, it’s all just normal PHP arrays. The list of formats is passed by my plugin to TinyMCE with this call:

    add_filter( ‘tiny_mce_before_init’, ‘tcs_mce_before_init_insert_formats’ );

    If TinyMCE can’t display such a large list then I don’t see anything that I could do about that. You can try making a bug report to TinyMCE.

    One thing you can try, if not already so, is to check this option:

    Select to add your styles in a submenu ‘Custom Styles’ (otherwise added to top level).

    Good luck!

    Thread Starter Tim Reeves

    (@tim-reeves)

    66.249.69.186 – – [21/Jan/2023:16:11:59 +0100] “GET /wp-json/wp-statistics/v2/hit?_=1654885129&_wpnonce=b9de9124f8&wp_statistics_hit_rest=yes&browser=Googlebot&platform=Unbekannte&version=2.1&referred=https%3A%2F%2Ftimreeves.de&ip=66.249.64.195&exclusion_match=yes&exclusion_reason=CrawlerDetect&ua=Mozilla%2F5.0+%28compatible%3B+Googlebot%2F2.1%3B+%2Bhttp%3A%
    2F%2Fwww.google.com%2Fbot.html%29&track_all=1×tamp=1654892329¤t_page_type=category¤t_page_id=13&search_query&page_uri=/internet-technologie/kategorie/linux-server/&user_id=0 HTTP/1.1″ 403 107 “-” “Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.74 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

    I’ve also checked the version of WP Statistics via FTP, downlaoded it to my PC. The files are from 13.01.2023 15:06 and the readme.txt says Stable tag: 13.2.15

    I do have a lot of security stuff in my nginx config, but also this line to let WP Statistics off the hook:
    if ( $request_uri ~ “^/wp-json/wp-statistics” ) { set $susquery 0; }

    In WP Cerber the REST API namespace “wp-statistics” is explicitly allowed. This must work because normal visitors are getting a 200 reply.

    I’m out of ideas…

    Thread Starter Tim Reeves

    (@tim-reeves)

    Dear Mostafa, as you can see I’m using W3 Total Cache (which is pretty good at clearing its caches) and WP Cerber – and the current version of WP Statistics.

    I’ve manually cleared the cache anyway and emptied the log file. Now I must wait a bit for a few bots to come by, will give you an update soon.

    Again, many thanks!

    Thread Starter Tim Reeves

    (@tim-reeves)

    Hi Mostafa,

    just got round to looking at this again – prompted by my access logs still being too long. I’m using the current version 13.2.15 (and nginx btw).

    66.249.76.224 – – [21/Jan/2023:10:32:59 +0100] “GET /wp-json/wp-statistics/v2/hit?_=1657532437&_wpnonce=a497ad569d&wp_statistics_hit_rest=yes&browser=Googlebot&platform=Unbekannte&version=2.1&device=bot&model=Unknown&referred=https%3A%2F%2Ftimreeves.de&ip=66.249.64.192&exclusion_match=yes&exclusion_reason=CrawlerDetect&ua=Mozilla%2F5.0+%28compatible%3B+Googlebot%2F2.1%3B+%2Bhttp%3A%2F%2Fwww.google.com%2Fbot.html%29&track_all=1×tamp=1657539637¤t_page_type=post_tag&current_page_id=22&search_query&page_uri=/internet-technologie/tag/nginx/&user_id=0 HTTP/1.1” 403 107 “-” “Mozilla/5.0 (L
    inux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.74 Mobile Safari/53
    7.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

    When I call up the website myself, as a normal visitor, Firefox Console shows me a 200 reply, as expected.

    Do you have any ideas? I’ve just added /wp-json/ to robots.txt, which should save the plugin some work, but even so…

    Many thanks for your work for the community, really appreciated!

    Thread Starter Tim Reeves

    (@tim-reeves)

    I’m sure you’re right. Even so, defensive programming where one is being passed in data via parameters which may be simply wrong would be good practice, imho.

    I’ve used WP Crontrol to check all the WP Cron Jobs and removed those with warning triangles (i.e. nothing to execute). This has not helped.

    I’m also seeing a few warnings like this:

    PHP Warning:  Undefined  array key “flush-files” in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/better-wp-security/core/lib/class-itsec-scheduler-cron.php on line 54

    And I’m thinking that this is not a problem with PHP 8.2, I expect it happens independent of the PHP version (sorry but no time to test that just now). Hell, would it be so much trouble to check the arguments being passed in and log bad ones rather than trying to execute them?

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