Fritex
Forum Replies Created
-
Required because? I don’t see the answer, however marking as solved.
Forum: Plugins
In reply to: [Advanced Media Offloader] Add Prefix to Bucket PathMay I ask if this is already implemented or not for WordPress and Cloudflare R2 bucket to keep the path as uploads/year/month/ ? Thank you
Forum: Plugins
In reply to: [Yoast SEO] High CPU usage on serverMaybe the databse does some work regarding re-analyzing/re-indexing the text and URLs again? Or you’d have to re-run it again using Yoast Test Helper.
However, not a great experience, if so, on a Website using Yoast SEO with a lot of articles like +40k.
I agree. More feedback needed if it’s compatible with 8.0 or even 8.1.
I plan to upgrade to PHP 8 or 8.1 in November-December this year once the long-term support is end-of-life for PHP 7.4.
I don’t want to experience the same stress as I already had in few moments with Yoast breaking the WordPress admin and throwing errors just like that, because.
- This reply was modified 2 years, 3 months ago by Fritex. Reason: adding a sentence from the experience since before past
Greetings @vmarko!
Thank you very much for your reply!
Kindly, if it is somehow possible to realize that in 2022 at least.
Unfortunately, it becomes a necessary and a need as far as for users who are in a situation where it would be good to consider having and using API Tokens for each Website with required permissions (which can be selected and noted which are needed for the W3TC plugin – like zone management, purge cache, SSL, etc. – read or write) rather than using Global API key (all domains under the same, or not Cloudflare Account) as far as it the Global API key could get compromised by that way of usage and took over all the domains from that user, change settings, delete, etc., and all that only if one Website get’s malware or some other “bad person” stealing and sniffing out where it could be stored/saved (or it isn’t saved and stored in some table in the database?), etc.
It’s preventive in terms of security measurements.
Thank you for considering this idea and opening the ticket.
Patiently will watch out for the further release of your great cache plugin for WordPress with this kind of feature!
Take care and stay healthy as much as you can be
Sincerely,
Tomislav
CroatiaForum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorGot it, thanks!
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorOkay, added “feed/” (without quotes) under the stated fields to exclude the “feed/” from caching …
Maybe, the /feed/ is not “registered” as sitemap.xml URL, so the W3TC does not know?
Also, https://www.racunalo.com/feed/ – on FireFox it gives me the option to download it as a file because the conte-type HTTP header returned is “application/rss+xml; charset=UTF-8”.
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorEither, do not know if the RSS is valid but still the default WordPress one has “empty 1st line”:
– https://www.racunalo.com/feed/So, supossing I have to somehow, modify the rss.php of the default WordPress?
Or how to exclude sitemaps completly from Page, Database, Object and browser cache?- This reply was modified 4 years ago by Fritex.
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorAnd after that modification, it works perfectly and valid:
– https://imgur.com/a/t5X4kvgBut, as saying, the Google XML Sitemaps default sitemap.xml plugin had also had the same problem.
Then, changed the stated values on the fields few replies above, the error dissapeared.Kind of a strange situation … some bug or due to the hm …
Nevermind, maybe someone finds it helpful to disable page cache and/or browser cache for sitemap.xml when using that plugin with W3TC.
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorOr maybe I should change something here in rss.php file:
– https://pastebin.com/8nm2MWLwThe extracted code from above link:<?php /** * Template Name: Google News Feed RSS */ //$postCount = 50; //$posts = query_posts('category__not_in=1,46&showposts=' . $postCount); $args_gnr = array( 'post_type' => 'post', 'post_status' => 'publish', 'category__not_in' => array(1), 'showposts' => 50, 'orderby' => 'date', 'order' => 'DESC', 'post_status' => 'publish', 'post_type'=>'post' ); $query_gnr = new WP_Query( $args_gnr ); header('Content-Type: '.feed_content_type('rss-http').'; charset='.get_option('blog_charset'), true); echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
Moved the above code few lines below …
And added:define('DONOTCACHEPAGE', true); define('DONOTCACHEDB', true); define('DONOTCACHCEOBJECT', true);
So, the final code modification for rss.php for my custom generated “googlenewsfeed” looks like:
<?php /** * Template Name: Google News Feed RSS */ define('DONOTCACHEPAGE', true); define('DONOTCACHEDB', true); define('DONOTCACHCEOBJECT', true); header('Content-Type: '.feed_content_type('rss-http').'; charset='.get_option('blog_charset'), true); echo '<?xml version="1.0" encoding="UTF-8"?>'; ?> <rss version="2.0" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:media="https://search.yahoo.com/mrss/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/" <?php do_action('rss2_ns'); ?>> ... ... <?php $args_gnr = array( 'post_type' => 'post', 'post_status' => 'publish', 'category__not_in' => array(1), 'showposts' => 50, 'orderby' => 'date', 'order' => 'DESC', 'post_status' => 'publish', 'post_type'=>'post' ); $query_gnr = new WP_Query( $args_gnr ); if($query_gnr->have_posts()): while($query_gnr->have_posts()): $query_gnr->the_post(); ?> <item> <title><?php the_title_rss(); ?></title> ... ... <?php rss_enclosure(); ?> <?php do_action('rss2_item'); ?> </item> <?php endwhile; endif; wp_reset_postdata(); ?> </channel> </rss>
- This reply was modified 4 years ago by Fritex. Reason: Working after disabled page cache with define() php
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorAlso, index.php of the WordPress has already got the code:
function ___wejns_wp_whitespace_fix($input) { $allowed = false; $found = false; foreach (headers_list() as $header) { if (preg_match("/^content-type:\\s+(text\\/|application\\/((xhtml|atom|rss)\\+xml|xml))/i", $header)) { $allowed = true; } if (preg_match("/^content-type:\\s+/i", $header)) { $found = true; } } if ($allowed || !$found) { return preg_replace("/\\A\\s*/m", "", $input); } else { return $input; } }
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorSo, when not logged-in and considering all options above:
– https://imgur.com/a/eSjPCucWhen logged-in WordPress:
– https://imgur.com/a/zDGeDTaDifference:
Error because “empty start line” and cached version for all visitors/bots/Google when no logged-in WordPress?
VS
No error when logged-in WordPress as user/admin?Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorAlso, have to mention, behind the CloudFlare Pro package …
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorCan I try it, wow can I exclude URL https://www.racunalo.com/google-news-sitemap/ from Page Cache and/or somewhere else?
Because under “page_enhanced” folder i have “googlenewsfeed” – so it caches it regarding the value “googlenewsfeed/” added under the field “browsercache_no404wp_exceptions” and field “pgcache_reject_uri” and also checked to purge feed “googlenewsfeed” under the field “pgcache__purge__feed__types”?
Because, still “1st line empty” when “not logged-in”:
view-source:https://www.racunalo.com/googlenewsfeed/Whil being “logged in” the 1st line starts fine with <?xml> and it’s not empty.
Either, that is again, new registered feed in functions.php, not a “page” …
Or maybe my code is bad for the new feed “google-news-sitemap/”.
Or maybe not the code itself, maybe in functions.php of the theme I am calling something somewhere, some file, which has “the white space”, and after calling the .php file I am actually calling to register the new rss feed “google-news-sitemap”?
Not sure about it …
- This reply was modified 4 years ago by Fritex. Reason: explanation
- This reply was modified 4 years ago by Fritex.
- This reply was modified 4 years ago by Fritex.
- This reply was modified 4 years ago by Fritex. Reason: empty 1st line for public page cache, but not so when logged-in <1st line starts with ?xml
Forum: Plugins
In reply to: [W3 Total Cache] W3TC and Google XML Sitemaps – XML declaration errorAlso, under “pgcache__purge__feed__types” there are checked:
– rdf, rss, rss2, atom, googlenewsfeed (and the new RSS feed registered inside functions.php)