Error 500 with wpml plugin
Quote from thomas-b on July 8, 2019, 11:29 amHi,
I’ve just installed Asgaros forum on my website, which runs with the wpml plugin too, and I got an error 500 when I visit page on other language than the main one.
It seems that Asgaros modify the .htaccess each time a page is load and change it according to the wpml language.
.htaccess before :
RewriteEngine On RewriteBase /project/name/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /project/name/index.php [L].htaccess after :
RewriteEngine On RewriteBase /project/name/en/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /project/name/en/index.php [L]If I visit a spanish page, ‘es’ is add on the .htaccess, and so on… It results in an error 500.
Is this the normal behaviour of Asgaros ?
Thanks,
Thomas
Hi,
I’ve just installed Asgaros forum on my website, which runs with the wpml plugin too, and I got an error 500 when I visit page on other language than the main one.
It seems that Asgaros modify the .htaccess each time a page is load and change it according to the wpml language.
.htaccess before :
RewriteEngine On RewriteBase /project/name/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /project/name/index.php [L]
.htaccess after :
RewriteEngine On RewriteBase /project/name/en/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /project/name/en/index.php [L]
If I visit a spanish page, ‘es’ is add on the .htaccess, and so on… It results in an error 500.
Is this the normal behaviour of Asgaros ?
Thanks,
Thomas
Quote from Asgaros on July 8, 2019, 11:39 amHello @thomas-b
Asgaros Forum does not make any changes to the .htaccess on your server. Please have a look into your other plugins – especially WPML. I guess that WPML is adding those .htaccess adjustments automatically based on certain conditions.
Hello @thomas-b
Asgaros Forum does not make any changes to the .htaccess on your server. Please have a look into your other plugins – especially WPML. I guess that WPML is adding those .htaccess adjustments automatically based on certain conditions.
Quote from thomas-b on July 8, 2019, 12:30 pmGot an answer from the wpml plugin. Maybe Asgaros plugin call flush_rewrite_rules(true) too many times ?
=> https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/
Got an answer from the wpml plugin. Maybe Asgaros plugin call flush_rewrite_rules(true) too many times ?
=> https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/
Quote from Asgaros on July 8, 2019, 7:34 pmHello again @thomas-b
Usually Asgaros Forum makes exactly one call to the flush_rewrite_rules(false) function in case that the rewrite-rules are missing. In your case it seems that a component is removing/manipulating the rewrite-rules set by Asgaros Forum so that this function is called again. This can be caused by a conflict in combination with WPML or by a complete other extension as well.
Have you tried to use the workaround-code in the link you posted?
Hello again @thomas-b
Usually Asgaros Forum makes exactly one call to the flush_rewrite_rules(false) function in case that the rewrite-rules are missing. In your case it seems that a component is removing/manipulating the rewrite-rules set by Asgaros Forum so that this function is called again. This can be caused by a conflict in combination with WPML or by a complete other extension as well.
Have you tried to use the workaround-code in the link you posted?
Quote from thomas-b on July 8, 2019, 7:38 pmYes, the workaround code works as expected. I just wanted to warn you about this possible issue.
Thomas
Yes, the workaround code works as expected. I just wanted to warn you about this possible issue.
Thomas