WordPress.org

Forums

[resolved] Enabling WP_ALLOW_MULTISITE breaks Static Pages (page_id=) (13 posts)

  1. not2bug
    Blocked
    Posted 5 years ago #

    Hi,

    When I first install WordPress 3, the About link on the blog homepage links to /blog/page_id=2 and works correctly. However once I enable WP_ALLOW_MULTISITE and configure it, the About link links to /blog/about/ and does not work (it just redirects to /blogs/).

    This behavior is the same for all static pages that I add via the dashboard.

    Any idea how to fix this?

    Thanks.

  2. Did you change your htaccess accordingly?

  3. not2bug
    Blocked
    Posted 5 years ago #

    Yup, I copied in what was displayed in the Network page. The normal permalink redirects work fine, but not the static pages (whose URLs are different from when multi-sites is disabled). I also tried using the original /blogs/page_id=2 instead of /blogs/about/ but that does not work either when multi-sites is enabled.

    I notice that WordPress added an empty block to it:

      # BEGIN WordPress
    
      # END WordPress
  4. Mark / t31os
    Moderator
    Posted 5 years ago #

    It could be that blog is one of the reserved words for using multisite(sure i remember reading a ticket along these lines), rename your blog page or home setting so it's something other than "blog" and see if the site then behaves as expected (if only for a minute to test).

  5. You must have pretty permalinks enabled as well. Got mod_rewrite on the server?

  6. not2bug
    Blocked
    Posted 5 years ago #

    It could be that blog is one of the reserved words for using multisite(sure i remember reading a ticket along these lines), rename your blog page or home setting so it's something other than "blog" and see if the site then behaves as expected (if only for a minute to test).

    It doesn't matter which blog it is. Each blog I create with multi-sites enabled (with different “directories”), has the same problem with all static pages.

    You must have pretty permalinks enabled as well. Got mod_rewrite on the server?

    Yes I suppose that would explain why /page_id=2 turns into /about (though I didn't actually configure anything, it happened automatically when I enabled multi-sites). Yes I do have mod_rewrite on the server and it works (I can tell because the .htaccess file that the Networks page says to create works).

  7. Did you go into the wp-admin/options-permalink.php page and turn on Permalinks, though?

    If not, then yeah, this will be weird.

  8. not2bug
    Blocked
    Posted 5 years ago #

    No I did not do that. It is automatically changed when I click the Install button on the Network page after enabling WP_ALLOW_MULTISITE in wp-config.php. From that point on static pages don't work, but regular pretty-permalinks (eg to posts and comments) do work.

  9. *huh* I've never not turned it on first. I'd turn it off and back on, just to see if that magically fixes something. Betimes, it gets tetchy.

  10. not2bug
    Blocked
    Posted 5 years ago #

    Yes, I tested and it seems that enabling multi-sites automatically sets pretty permalinks (which is off by default). If I then switch it off, static pages work correctly (eg /page_id=2) as do posts/comments/etc.

    I created a secondary blog and it defaults to pretty-links (because multi-sites is already enabled). Both posts and static pages work.

    I set the root blog (the one installed by default) back to pretty-links and it seems to work correctly.

    I’m going down for dinner in five seconds, but when I get back, I’ll wipe WordPress and see if I can reproduce the error again (or to be more accurate since I already reproduced it several times last week, determine exactly which step fixes the error; eg is it toggling the pretty-links setting or creating a secondary blog?)

  11. not2bug
    Blocked
    Posted 5 years ago #

    Okay I just tested.

    It seems that when you enable multi-sites in wp-config.php and install a network in the Network page, WordPress automatically changes the permalink setting from whatever it was to /blog/%year%/%monthnum%/%day%/%postname%/ (ie a “Custom Structure” in the parlance of the permalinks page).

    Simply opening the permalinks page and clicking “Save Changes” (without even requiring any actual changes, ie you can leave it set to what it was automatically changed to) fixes static pages.

    My guess is that the “Create a Network” function of the Network page is changing the permalink structure but not updating it correctly.

    I guess this is definitely a bug then, but I can’t seem to find a formal bug-reporting form anywhere.

    (I’ll test 3.0 RC1 right now…)

  12. I'm gonna bet it's toggling the pretty, personally :)

  13. not2bug
    Blocked
    Posted 5 years ago #

    Never mind, this bug is fixed in 3.0 RC1. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.