Multisite issue
-
Hi,
Polylang support advised me to reach out to you regarding this issue. I just wanted to duplicate the information about the problem here for your reference
https://ww.wp.xz.cn/support/topic/multisite-issue-64/#post-18632201The issue appeared in version 3.7, and translation strings are no longer displaying correctly.
After investigating, here’s what I found:
$settings = Polylang_Theme_Translation_Settings::getInstance()returns the wrong settings, because it always pulls from blog_id = 1, while I’m actually on blog_id = 2.The problem seems to come from the global
$wpdbvariable. It doesn’t switch to the correct blog, so$wpdb->optionsalways points towp_optionsinstead ofwp_2_optionswhen trying to fetch the settings.I suspect
switch_to_blog()(andrestore_current_blog()) might be involved and not being used correctly anymore.Could you please check your commits to see where this behavior might have been introduced in 3.7?
The topic ‘Multisite issue’ is closed to new replies.