Home › Forums › Bug Reports › Bug: ACF Pro 5.2.3 and WP Multisite › Reply To: Bug: ACF Pro 5.2.3 and WP Multisite
Upgrading to ACF Pro 5.2.3 is also causing Multisite issues for our installation (WP 4.2.1). We’re not using the Domain Mapping plugin, and the problem isn’t manifesting itself as a redirect loop, but it seems like this might be related to the above issue reports.
What I’m seeing is that WordPress’s PATH_CURRENT_SITE constant is incorrect when 5.2.3 is activated. The problem is very visible when looking at the Multisite “Network Setup” page (/wp-admin/network/setup.php) — for reasons unclear, PATH_CURRENT_SITE is listed there as the path to one of our child sites, not the actual top-level site path (e.g. it’s set to ‘/child-site/’ when it should just be ‘/’ as set in wp-config.php). Deactivating ACF Pro corrects this issue.
The wrong PATH_CURRENT_SITE seems to be wigging out things elsewhere in the WordPress admin dashboard, causing some of our other plugins to break (like WP Migrate DB Pro), where that plugin gets confused about why we’re running a Network-level plugin on a child site.
As a shot in the dark, I’d suspect that maybe the issue is in the change to ACF’s /admin/update.php, with the new acf_admin_update->network_admin_menu() method. It’s using restore_current_blog(), which I think actually just bounces WP back to the “previous” blog in the stack, not the “original” blog? Or in any case, the normal recommendation is to run it after every switch_to_blog() according to the docs: https://codex.wordpress.org/Function_Reference/restore_current_blog
In our case, the PATH_CURRENT_SITE is set to our next-to-last (based on site ID) child site’s path, so that seems to back up the restore_current_blog() theory…? Maybe.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.