kunalnagar / custom-404-pro

🔗 A WordPress Plugin to override the default 404 page with any page from the Admin Panel.
https://wordpress.org/plugins/custom-404-pro/
GNU General Public License v2.0
8 stars 6 forks source link

Multi-language site #49

Closed EnricoMaioni closed 1 year ago

EnricoMaioni commented 3 years ago

Hi there, first of all thanks for your great plugin. Also, I apologize for my English, I know it’s not the best… I would like to fix this issue: I’ve created a custom 404 page in three languages, using WPML plugin. The problem is that always (in any language) the wrong URL is redirected to the Italian version of the custom page 404. Is there any way to fix it, please? Thank you.

kunalnagar commented 3 years ago

Hi @EnricoMaioni,

Thanks for using the plugin.

I've never tested this plugin with WPML. Before digging into the issue, I'd like to ask a few clarifying questions:

always (in any language) the wrong URL is redirected to the Italian version of the custom page 404

Does this mean that no matter what version of the site you are on, if someone enters a wrong URL, they get redirected to the 404 page on the Italian version of the site?

Also, I'm not entirely sure how the WPML plugin works, but is there a way to set the default language of the site? If so, have you set any default language?

EnricoMaioni commented 3 years ago

Hi @kunalnagar , thanks for your support. Yes, I confirm that no matter what version of the site you are on, if someone enters a wrong URL, they get redirected to the (custom) 404 page on the Italian version of the site. Also, yes: WPML has a way to set the default language. I set Italian as default language. Thank you.

kunalnagar commented 3 years ago

Thanks for the clarification, @EnricoMaioni - I'll dig into this over the next few days and let you know when I have an update.

EnricoMaioni commented 3 years ago

Hi @kunalnagar . Any news? I like your plugin, but f doesn't work with a multi-language site, I will search another one, I'm sorry...

kunalnagar commented 3 years ago

Hi @EnricoMaioni ,

I don't want to block you with this.

Please go ahead with another plugin if that suits your needs better. I'm planning on investigating this issue on the weekend and will post back my findings here. If you're still on the fence about it, perhaps revisit this plugin again 🙂

EnricoMaioni commented 3 years ago

Thank you @kunalnagar. To be honest, I found only one plugin as good as yours (https://en-gb.wordpress.org/plugins/404page/ ), but also that plugin doesn't work if WPML is installed. So, I hope you will be able to fix the issue. I will wait. Thank you very much.

kunalnagar commented 3 years ago

Hi @EnricoMaioni ,

After some debugging I've found out that this plugin does not have support for WordPress Multisite out of the box. I definitely believe this to be an important feature and have put it on the roadmap for development.

Unfortunately, I cannot promise a fixed deadline for this. And it does seem to be quite a bit of work to add support for Multisite and test it out as well, which may take a few weeks.

I will post back on this issue once I have an update.

kunalnagar commented 3 years ago

Hi @EnricoMaioni ,

I've just released 3.3.0 of the plugin with some Multisite Support. Could you upgrade and see if it fixes your problem?

EnricoMaioni commented 3 years ago

Hello @kunalnagar . Unfortunately, after update your plugin, the issue is still there. Anyway, I really want to thank you for your work. Just for your information, my website is www.guidedolomiti.com Grazie!

kunalnagar commented 3 years ago

Hi @EnricoMaioni ,

Thanks for trying out the update.

Is it possible for you to completely remove the plugin and set it up from scratch?

When I tried visiting an incorrect URL on a multisite environment, it redirected me to the correct site. If it still doesn't work, then maybe it's an incompatibility with the WPML plugin.

EnricoMaioni commented 3 years ago

Ciao. I tried, I completely removed the plugin and set it up from scratch, but not success. It's a pity, because WPML is one of the most popular plugin for multi-language (not multisite) websites. Anyway, thanks for your work. Ciao.