qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
545 stars 103 forks source link

Error with Slug active #1373

Closed sviluppomania closed 9 months ago

sviluppomania commented 9 months ago

Greetings, I use the All In One WP Security Plugin and among these I also use the anti-brute force setting by renaming the access URL, never had any problems between Qtranslate-XT and All In One WP Security, but now if Integration remains active Slugs translation it causes me error when accessing the login page with custom url, the following error:

**PHP Fatal error: Uncaught TypeError:** QTX_Module_Slugs::home_url(): Argument #2 ($path) must be of type string, null given, called in ./.../.../wp-includes/class-wp-hook.php on line 310 and defined in ./.../.../wp-content/plugins/qtranslate-xt/src/modules/slugs/slugs.php:531
--
Stack trace:
#0 ./.../.../wp-includes/class-wp-hook.php(310): QTX_Module_Slugs->home_url()
#1 ./.../.../wp-includes/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 ./.../.../wp-includes/wp-includes/link-template.php(3456): apply_filters()
#3 ./.../.../wp-includes/wp-includes/link-template.php(3402): get_home_url()
#4 ./.../.../wp-includes/wp-content/plugins/oauth2-provider/library/class-wo-api.php(44): home_url()
#5 ./.../.../wp-includes/wp-content/plugins/oauth2-provider/wp-oauth-server.php(112): include_once('./.../...')
#6 ./.../.../wp-includes/wp-includes/class-wp-hook.php(310): wpoauth_server_template_redirect_intercept()
#7 ./.../.../wp-includes/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#8 ./.../.../wp-includes/wp-includes/template-loader.php(104): apply_filters()
#9 ./.../.../wp-includes/wp-blog-header.php(19): require_once('./.../...')
#10 ./.../index.php(17): require('./.../...')
#11 {main}
thrown in ./.../.../wp-content/plugins/qtranslate-xt/src/modules/slugs/slugs.php on line 531

It should be noted that in addition to this error I had another similar one with the same integration but with another "Burst Statistics" plugin which obscures the statistics and this appears: Server error: The response is not a valid JSON response.

The appearance of errors is not caused by the Qtranslate-XT Plugin itself, but solely by the SLUG integration (if active).

Debug info: "PHP_VERSION": "8.2.8", "WP_VERSION": "6.3.1", "QTX_VERSION": "3.15.2",

spleen1981 commented 9 months ago

This is already fixed in #1363

spleen1981 commented 9 months ago

It should be noted that in addition to this error I had another similar one with the same integration but with another "Burst Statistics" plugin which obscures the statistics and this appears: Server error: The response is not a valid JSON response.

This part is discussed in #1273, where I asked a feedback but didn't get any reply

sviluppomania commented 9 months ago

Da notare che oltre a questo errore ne ho avuto un altro simile con la stessa integrazione ma con un altro plugin "Burst Statistics" che oscura le statistiche e appare questo: Errore del server: La risposta non è una risposta JSON valida.

Questa parte è discussa in #1273 , dove ho chiesto un feedback ma non ho ricevuto alcuna risposta

Hi, this solution #1363 fixes both this BUG and the BUG previously reported here: #1273. Thank you! :-)