WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Update to 3.5.1, Network site links broken (5 posts)

  1. morriswanchuk
    Member
    Posted 1 year ago #

    I updated to 3.5.1 today on a network installation and all looked to be well. However, I'm seeing an issue in the admin panel. When I list all sites (/wp-admin/network/sites.php), and try to visit one of the network sites via the mouseover Visit link, the site folder is not appended to the url and I'm redirected instead to the root site.

    Example, instead of http://www.example.com/subsite
    I'm linking to http://www.example.com

    Interestingly, some of the links work on the sites page. For example, edit site is:

    example.com/wp-admin/network/site-info.php?id=4

    However, the dashboard link does not work: example.com/wp-admin/

    Anyone else having this issue?

  2. morriswanchuk
    Member
    Posted 1 year ago #

    As a follow up, I can report that in my install the switch_to_blog() function is not working, which is why the urls are not being generated properly.

    The code that generates the site list (/wp-admin/network/sites.php) lives in /wp-admin/includes/class-wp-ms-sites-list-table.php. The links are generated calls that rely on the switch_to_blog() function that lives in /wp-includes/ms-blogs.php.

    In my case the following sample code does not yield the expected result:

    //blog_id=3  siteurl= http://example.com/subsite/.
    
    switch_to_blog(3);
    echo get_option('siteurl'); //should be http://example.com/subsite/
    restore_current_blog();

    Actual output is: http://example.com/, so it has not switched properly....

    No idea why this is happening suddenly...

  3. timoxxl
    Member
    Posted 1 year ago #

    same issue here

  4. morriswanchuk
    Member
    Posted 1 year ago #

    @timoxxl, are you running Total Cache on your site? We had a version of the plugin installed but not active on the site and removing it appears to have fixed the issue. However, I'm having a separate unrelated issue which prevents me from definitively saying this fixed our upgrade...

  5. W3TC totally did that. Remove it completely and reinstall it, boom, fixed :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.