rolfhuiber
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Mail Logging] Deprecated code PHP 8.1Add the following before the method:
#[\ReturnTypeWillChange]https://github.com/silexphp/Pimple/blame/main/src/Pimple/Container.php
https://php.watch/versions/8.1/ReturnTypeWillChange
https://make.www.ads-software.com/core/2022/01/10/wordpress-5-9-and-php-8-0-8-1/
I noticed someone wrote the plugin seems to be abandoned, also no reactions lately.
We will have to support the plugin by ourself.- This reply was modified 2 years, 4 months ago by rolfhuiber.
Forum: Plugins
In reply to: [WooCommerce Product Table Lite] “cookie cannot be set” messagesAs said I tracked it down to WCPT.
This is with
Wordpress 5.9.2
storefront 4.0.0, no functions.phpThe only activ plugins are:
WooCommerce 6.3.1
WooCommerce Product Table 2.5.0and running:
curl –fail –silent –show-error https://…/wp-cron.php?doing_wp_cronForum: Plugins
In reply to: [W3 Total Cache] Page Cache Evictions>This is not a configuration, but a behavior.
Not quite. A behavior is a set of actions. Here it is the semantics of a programming method. e.g.
public Memcached::set(string $key, mixed $value, int $expiration = ?): bool
Memcached::set() stores the value on a memcache server under the specified key.
The expiration parameter can be used to control when the value is considered expired.
The expiration parameter is a configurable option.
Forum: Plugins
In reply to: [W3 Total Cache] Page Cache Evictions>SO there is no algorithm or configuration to recreate the cache entry after an hour. The page is cached once visited. When the cache is purged, pages are cached again on a visit.
Well there is a configuration!
pgcache.lifetime: Maximum lifetime of cache objects, defaults to 3600
as used in Cache_Memcached::set( $key, $var, $expire = 0, $group = ” )The use of the term “cache objects” in the settings is confusing, as it correlates more to object cache settings, and not that it is a page caching setting.
The term “cache item” is more general and is also the term used by memcached.
I haven’t spent any further time into going deeper into the code. There are gc variables for dbcache, object-cache and page-cache. The question arises if pgcache.lifetime for all three cache types.
Forum: Plugins
In reply to: [W3 Total Cache] Page Cache Evictions>Are you seeing this in the expires header or are you checking the cache folder?
The creation time is some 5-7 seconds, from cache the page is retrieved within 100msec.Browser cache has never been enabled. The responses contain:
Cache-Control: max-age=0
This behavior is also wanted by us, we want to fully control the caching on the server.We disabled object cache and set fragment cache to “Please select a method” (it is unclear if this disables caching, please make it more clear in the settings).
The page cache purge policy settings at first were left at default, but also after unsetting all checkboxes:
The pages are still recreated exactly after one hour after their first visit.
Forum: Plugins
In reply to: [W3 Total Cache] Page Cache EvictionsWe are on a non-public staging server using the free version.
The pages get purged (recreated) exactly one hour after creation.
We observed several pages with a distance of 10 minutes firstly called. Until one hour they came from the cache. After exactly one hour they were recreated. The pages are recreated independent of each other.During the test the cron was disabled, no admin dashboard running and the test showed that the behavior is also seen for static pages.
Which algorithm/configuration is in place to recreate the cache entry for a page after exactly one hour?
What are the reasons/times that pages get evicted and recreated? Does object caching evictions influence page caching? Where can the behavior be changed, so that only on a manual cache purge the pages get evicted? I have read the github wiki, but couldn’t find any information. Can you please point me to a more in-depth explanation of w3tc.
Everything is working just fine when using the 3 plugins as is.
However when WooCommerce Dynamic Pricing & Discounts is active our debug.log gets filled without the patch https://www.ads-software.com/support/topic/is_page-is_singular-called-before-query-is-run/#post-14951679. Currently we have 35GB logs daily.
When the patch is active WooCommerce Wholesale Prices Premium does not convert the prices for other currencies correct.
The problem is with WooCommerce Dynamic Pricing & Discounts calling WOOCS in a way were is_single/is_singular complain.
We have also an issue that the conversion does not work: https://www.ads-software.com/support/topic/is_page-is_singular-called-before-query-is-run/
We have updated our issue but haven’t received a reply since.
Works. Thanks.
Sorry to bother again.
We are also using WooCommerce Wholesale Prices Premium.We changed from single products to variations last week.
With your patch https://www.ads-software.com/support/topic/is_page-is_singular-called-before-query-is-run/#post-14951679 we noticed that the wholesale prices for other currencies where not converted on the product page. Only the currency symbol changes. When added to the cart, the cart shows the correct conversion.
Without the patch all works fine. But with WooCommerce Dynamic Pricing & Discounts active it fills our debug.log.
Can you please have a look with your developers to have a sustainable solution.
- This reply was modified 3 years, 4 months ago by rolfhuiber.
Thanks, that fixed that the is_page and the is_singular are not logged any more.
Will the patch be implemented in a future release?
- This reply was modified 3 years, 5 months ago by rolfhuiber.
I am using the side switcher. Deactivating didn’t resolve the issue.
I was maybe to quick that the problem is with WOOCS, but it is in conjunction with WooCommerce Dynamic Pricing & Discounts (), when both plugins are active. Only have WooCommerce also active, all other plugins are inactive.
I deleted all rules in WooCommerce Dynamic Pricing & Discounts, but still received the error.
Added to wp-includes/functions.php
$message .= ‘ Backtrace: ‘ . wp_debug_backtrace_summary();[06-Oct-2021 16:46:02 UTC] PHP Notice: is_page was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://www.ads-software.com/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. Backtrace: require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, RP_WCDPD->on_plugins_loaded, require_once('/plugins/wc-dynamic-pricing-and-discounts/classes/rp-wcdpd-settings.class.php'), RP_WCDPD_Settings::get_instance, RP_WCDPD_Settings->__construct, RP_WCDPD_Settings->load_settings, RP_WCDPD_Settings::get_structure, get_woocommerce_currency_symbol, apply_filters('woocommerce_currency_symbol'), WP_Hook->apply_filters, WOOCS->woocommerce_currency_symbol, is_account_page, is_page, _doing_it_wrong (This message was added in version 3.1.0.) in /store/store0/www/dev/wp-includes/functions.php on line 5665 [06-Oct-2021 16:46:02 UTC] PHP Notice: is_singular was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://www.ads-software.com/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. Backtrace: require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, RP_WCDPD->on_plugins_loaded, require_once('/plugins/wc-dynamic-pricing-and-discounts/classes/rp-wcdpd-settings.class.php'), RP_WCDPD_Settings::get_instance, RP_WCDPD_Settings->__construct, RP_WCDPD_Settings->load_settings, RP_WCDPD_Settings::get_structure, get_woocommerce_currency_symbol, apply_filters('woocommerce_currency_symbol'), WP_Hook->apply_filters, WOOCS->woocommerce_currency_symbol, is_account_page, wc_post_content_has_shortcode, is_singular, _doing_it_wrong (This message was added in version 3.1.0.) in /store/store0/www/dev/wp-includes/functions.php on line 5665
In function woocommerce_currency_symbol, is_account_page is called, which calls is_page () (from where is_singular is coming I haven’t found out), when query is not open, throw error.
Sorry for the confusion, version 1.3.7
Forum: Plugins
In reply to: [Yoast SEO] Defensive Programming.
Forum: Plugins
In reply to: [Yoast SEO] Defensive ProgrammingYour update still produced errors.
As you are only hoping other plugins or the core fixes something that it doesn’t generate failures in your plugin, I had a look at your plugin and could fix the code to not produce errors anymore.As you haven’t been very constructive in this issue and “defensive programming” is not part of your “programming vocabulary”, I do not expect any changes from you part, you can close the issue and mark it as “resolved”.