Make WordPress Core

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#13707 closed defect (bug) (fixed)

404 on all admin pages of main blog

Reported by: abbaanthony's profile 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)

#1 @abbaanthony
14 years ago

  • Cc godseygreg@… added

#2 @ocean90
14 years ago

  • Component changed from Administration to Multisite

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

#3 @abbaanthony
13 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.

#4 @abbaanthony
13 years ago

  • Priority changed from normal to high

#5 @ocean90
13 years ago

  • Milestone set to 3.0

For reviewing.

#6 @ryan
13 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?

#7 @nacin
13 years ago

[14517] WP_HOME and WP_SITEURL noop in MS.

#8 @abbaanthony
13 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.

#9 @nacin
13 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.

#10 @abbaanthony
13 years ago

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

#11 @abbaanthony
13 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.

#12 @abbaanthony
13 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.

#13 @nacin
13 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.

#14 @abbaanthony
13 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>

#15 @abbaanthony
13 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>

#16 @nacin
13 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]

#17 @nacin
13 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.

#18 @abbaanthony
13 years ago

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

#19 @nacin
13 years ago

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

#20 @abbaanthony
13 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.

#21 @abbaanthony
13 years ago

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

#22 @abbaanthony
13 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.

#23 @nacin
13 years ago

  • Milestone changed from Unassigned to 3.0

POW!

You're welcome :-)

Note: See TracTickets for help on using tickets.