herrvigg
Forum Replies Created
-
Forum: Plugins
In reply to: [Cloudflare] Fatal Error on plugin activationSimilar problem here with PHP8.1 with fatal errors coming up in my theme:
Fatal error: Declaration of Psr\Log\NullLogger::log($level, Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::log($level, $message, array $context = []) in /var/www/html/wp-content/themes/<my-theme>/vendor/psr/log/src/NullLogger.php on line 26
The reason is because cloudflare is using an obsolete version of psr/log that is loaded before the one I would like to use… From cloudflare/composer.json:
"psr/log": "^1.0"
Here is a more recent one with the API that we need: https://packagist.org/packages/psr/log#3.0.0. Cloudflare should bump it to a compatible version but it may break some very old PHP versions.
See also: https://github.com/php-fig/log/blob/master/src/LoggerInterface.php
I agree this is not optimal, it was mostly a workaround solution for @opialm that could be tested.
For a clean solution it should be done with a filter on the user value. In any case, the translation has to be done before it is passed to
sprintf
.It could even be done by the builtin wordpress hooks such as
option_{$option}
but this depends on how the value is handled on the settings page.https://developer.www.ads-software.com/reference/hooks/option_option/
What is the value of
$plural_text
?
It seems very unlikely the problem comes from__( '%s images', 'foogallery' )
.My guess is that
$plural_text
is not going through the translation of qTranslate-XT.
QTX(-T) adds a hook on gettext so any call to__( xxx)
will be translated.If you have :
$plural_text = "[:en]%s images[:sk]%s obrázkov[:]"
Just try something like this:
$plural_text = __("[:en]%s images[:sk]%s obrázkov[:]", 'whatever-source')
You should get a translated string with a single
%s
thensprintf
should work.hi,
qTranslate-X is a dead project but qTranslate-XT took over (github only so far).qTranslate-XT handles those strings correctly when they are parsed for translation. The problem is rather that your raw string has multiple
%s
so it’s quite obvioussprintf
is going to fail if you pass a single argument on the raw string.If you use that with QTX you’d have to translate first and call
sprintf
on the translated string containing only a single%s
left. So this rather looks like a problem of integration specific to your setup.- This reply was modified 3 years, 6 months ago by herrvigg.
Forum: Plugins
In reply to: [WPBruiser {no- Captcha anti-Spam}] errors in PHP 8Weird I don’t have the problem with the wakeup but I have two errors with spl_autoload_register.
Notice: spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw in /var/www/html/wp-content/plugins/goodbye-captcha/includes/MchGdbcLibAutoloader.php on line 33 Notice: spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw in /var/www/html/wp-content/plugins/goodbye-captcha/goodbye-captcha.php on line 134
Fixed by passing
true
to the second argument ($throw
).
It’s been already 1 month. The plugin authors should release a fix, it does not seem difficult to solve.Forum: Plugins
In reply to: [All-In-One Security (AIOS) – Security and Firewall] Undefined index: path@antipole which version do you use? Apparently they fixed it in version 4.4.8.
Actually, regardless of the current values (set or not), more checks should be done to be sure the relevant fields are only read when the related option is selected (e.g. bg color vs bg image). Some fields are shared, but some are specific. Those are a potential source of bugs until better checks are added.
- This reply was modified 3 years, 9 months ago by herrvigg.
Great to read!
This ticket can be marked as resolved.Support for Google Site Kit released in qTranslate-XT 3.9.2.
I made some tests and it works both in production and localhost in dev mode. No more disconnections.
@lampir please let us know if the fix also works for you.A fix has been merged in our master branch so it’s already available. New release to come soon.
Big thank you to @adamsilverstein and @reneesoffice, your help has been very valuable, much appreciated! If all the plugins staff were active like you, everything would be much easier ??
Forum: Plugins
In reply to: [Classic Editor] js error Edit Post page Broken After Update to WP 5.6@azaozz could this issue be related to this fix you have been working on?
@lampir just to be sure the solution works, can you test it by adding this hook temporarily? It doesn’t matter where it’s done since there is no dependency other than WP get_otion.
add_filter( 'googlesitekit_canonical_home_url', function( $url ) { return get_option( 'home' ); } );
- This reply was modified 3 years, 10 months ago by herrvigg.
hello,
thanks for getting in touch with qTranslate-XT (it is supposed to become a real plugin at some point)! The change proposed by Adam is very small, we will put it in the next release. I’ll let you know when this is available.Forum: Plugins
In reply to: [Classic Editor] Edit Post page Broken After Update to WP 5.6New thread for the follow-up: https://www.ads-software.com/support/topic/edit-post-page-broken-after-update-to-wp-5-6-2/
Forum: Plugins
In reply to: [Classic Editor] js error Edit Post page Broken After Update to WP 5.6hello,
I’m the maintainer of qTranslate on github and we are also encountering a case that looks related, it is a major issue. This seems to occur quite randomly, but so far I observed it only in combination with WP5.6, Firefox, and the Visual Editor – using the Classic Editor that many, many people still use. Sometimes the problem disappears just by reloading exactly the same page in a different tab…
For reference: https://github.com/qtranslate/qtranslate-xt/issues/931I observed one interesting event: for some reason (due to WP 5.6 + Firefox?), a listener i have on window.load even does not trigger all the time as it should, though i’m sure the addEventListener is called. If i add another dummy listener on window.load, this one is called all the time, which looks quite insane. Why would a window.load not be triggered?
A few elements grabbed from the previous thread:
> The issue seems to be that:
> wp.oldEditor.initialize() is no longer firing and many plugins/blocks looking for this > event are no longer functioning.Could this be related to what I observed with window.load not firing properly in some event listener?
> Uhh, I just reverted to an older jquery via a plugin – and that fixed it. :/
That seems to confirm something is going wrong with some event.