WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13707 closed defect (bug) (fixed)

404 on all admin pages of main blog

Reported by: abbaanthony Owned by:
Milestone: 3.0 Priority: high
Severity: major Version: 3.0
Component: Multisite Keywords: reporter-feedback
Focuses: Cc:

Description

Hello all,

I am using 3.0-rc1-15112 and I think I found a bug. Before I explain, I have cleared my caches and cookies and reset the computer and was still able to recreate this bug.

It seems that whenever I log in to my site, the first time I click on anything in the backend, I get a 404 page. I can hit refresh and it will take me to the correct page, but the first click will almost always take me to a 404 first.

I am using 3.0-rc1-15112 as a multi-site set to subdomains. My permalinks are /2010/06/03/sample-post/. I am on a linux server using Apache 2.2.11, Perl 5.8.8, MySQL 5.0.90 and PHP 5.2.8.

I can recreate this bug on all the backend pages. I first noticed it though in the plugin pages when switching from all plugins to recently active, inactive or active. But since this latest nightly update, it seems to do it on any link I click on the backend. Strangely, it does not seem to affect any of the other blogs, just the main one. And it does not affect the frontend at all.

Thanks for all your hard work and for the great software!

Greg

Change History (23)

comment:1 @abbaanthony5 years ago

  • Cc godseygreg@… added

comment:2 @ocean905 years ago

  • Component changed from Administration to Multisite

Do you have plugins activated? Is the 404 page server generated? Do you updated your .htaccess?

comment:3 @abbaanthony5 years ago

I have tried with plugins activated and with all of them deactivated and it seems to make no difference. The 404 page is the wordpress 404 page not server generated. I do no manual updates to my .htaccess file.

comment:4 @abbaanthony5 years ago

  • Priority changed from normal to high

comment:5 @ocean905 years ago

  • Milestone set to 3.0

For reviewing.

comment:6 @ryan5 years ago

What do the admin links on the main blog look like? How about on the other blogs? Do you notice a difference in how they are structured?

Go to /wp-admin/ms-sites.php and click "Edit" for the main blog. In the "Site options" section what are Siteurl and Home set to?

In wp-config.php, what are DOMAIN_CURRENT_SITE and PATH_CURRENT_SITE set to? Are WP_HOME or WP_SITEURL defined?

comment:7 @nacin5 years ago

[14517] WP_HOME and WP_SITEURL noop in MS.

comment:8 @abbaanthony5 years ago

Ok, the admin links are identical in both the main blog and all the subdomain blogs.

In the ms-sites page, the main blog siteurl is set to http://www.taac.us/ which is my main site address and home is the same.

In wp-config, domain_current_site is set to taac.us and path_current_site is set to /. WP_HOME and WP_SITEURL are not located in wp-config.

comment:9 @nacin5 years ago

  • Keywords reporter-feedback added
  • Milestone changed from 3.0 to Unassigned

I'm wondering if we all missed this:

I do no manual updates to my .htaccess file.

You need to update your .htaccess file after installing MS. Additionally, you need a virtual host configuration and wildcard DNS set up for subdomains.

I'm inclined to close this and point you to the support forums -- http://wordpress.org/support/ -- as many of us have similar generic server setups and don't have any problems.

comment:10 @abbaanthony5 years ago

I should point out that I was using WPMU and upgraded to 3.0 RC1.

comment:11 @abbaanthony5 years ago

I should also point out that it worked fine as WPMU. I have the wildcard domain set up and have for some time.

comment:12 @abbaanthony5 years ago

Ok. Maybe I have something here. I tried something to see what would happen. Originally I had the permalinks set to Day and name (i.e. http://www.taac.us/2010/06/11/sample-post/). I changed them to Default (i.e. http://www.taac.us/?p=123). Using day and name permalinks sends me to the WP 404 page when I click on a link in the admin section. Using default permalinks sends me to the main page of the blog when I click on an admin link.

I don't understand this, but maybe one of you do.

comment:13 @nacin5 years ago

Sounds like an issue with your htaccess file. Can you paste the WP relevant rules here?

We really should enable Tools > Network for MU-originated blogs so the 3.0 rewrite rules can be shown, but for the most part they don't apply to MU-originated blogs.

comment:14 @abbaanthony5 years ago

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule (.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule
(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} .*/wp-admin$
RewriteRule
(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule
([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

comment:15 @abbaanthony5 years ago

Sorry, try this again.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

comment:16 @nacin5 years ago

Just for kicks, can you try the new subdomain rules:

RewriteEngine On
RewriteBase /trunk/
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]

comment:17 @nacin5 years ago

Obviously with the proper rewrite base.

And yes, this is the entire rule set for subdomains. Most of the original rules were for subdirectory handling, while the async upload bit doesn't work on a lot of servers so we removed that from regular WP a long while ago.

comment:18 @abbaanthony5 years ago

Replace everything in the .htaccess with what you posted above or only a section? If only a section, which section?

comment:19 @nacin5 years ago

Everything you posted with everything I posted. Back up yours for reference. Replace my "RewriteBase /trunk/" with "RewriteBase /" to match yours.

comment:20 @abbaanthony5 years ago

After I typed the comment I realized that you meant for me to replace everything in the file with yours. I did that and still have the issue.

comment:21 @abbaanthony5 years ago

And I should also note, cleared the browser caches and restarted the browsers before checking on the changes. Still no joy.

comment:22 @abbaanthony5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Never mind. Took a second for the .htaccess file to take effect. It is all well now! Thank you so much for the help!

This is why I stick with WP. You guys are great.

comment:23 @nacin5 years ago

  • Milestone changed from Unassigned to 3.0

POW!

You're welcome :-)

Note: See TracTickets for help on using tickets.