WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#5017 closed defect (bug) (fixed)

Endless Redirect

Reported by: chaoticmortalcom Owned by: chaoticmortalcom
Milestone: 2.7 Priority: high
Severity: critical Version: 2.3
Component: General Keywords: redirect
Focuses: Cc:

Description

I don't know if this counts, but it's giving me endless redirects for index.php. I think it may be a problem with my web host?

I didn't want this on the support forums because it is relating to a pre-release version.

Attachments (1)

canonical.php (7.8 KB) - added by chaoticmortalcom 7 years ago.
wp-includes/canonical.php

Download all attachments as: .zip

Change History (34)

comment:1 markjaquith7 years ago

Which version of 2.3? What is the URL of your blog?

comment:2 chaoticmortalcom7 years ago

URL of my blog is my username: chaoticmortalcom. AKA chaoticmortal.com.

Please help. I'll be switching to 2.2 in thirty minutes.

And it's 2.3 RC1.

comment:3 chaoticmortalcom7 years ago

Does this have anything to do with permalink?

If it does, it's chaoticmortal.com/index.php/YEAR/MO/DA/samplepost/. More info? I'll give. Anything to fix.

comment:4 markjaquith7 years ago

Can you e-mail your FTP user/pass to me? I'd like to try to debug this issue.

mark.wordpress -AT- txfx.net

Downgrading to 2.2 isn't going to work, FYI... but I can get 2.3 working for you -- I just want to figure out why you're having the problem first.

comment:5 chaoticmortalcom7 years ago

  • Owner changed from anonymous to markjaquith

comment:6 chaoticmortalcom7 years ago

  • Owner changed from markjaquith to chaoticmortalcom

comment:7 chaoticmortalcom7 years ago

Oops. Hehehe...

comment:8 chaoticmortalcom7 years ago

  • Keywords redirect added

Also, I noticed that the Admin works perfectly well, but the site doesn't display.

comment:9 chaoticmortalcom7 years ago

  • Priority changed from normal to high
  • Summary changed from Endless Redirect to changed wp-config file

I've uploaded a new wp-config.php with nothing but new values for db, user, pass, and host so it works for my old database. I changed it about a week ago, and it should not affect anything.

comment:10 chaoticmortalcom7 years ago

  • Summary changed from changed wp-config file to Endless Redirect on Frontpage

Oops. So that's what the summary is for...

comment:11 chaoticmortalcom7 years ago

  • Summary changed from Endless Redirect on Frontpage to Endless Redirect

comment:12 chaoticmortalcom7 years ago

I just activated a plugin called Site Unavailable and it now shows up on the front page. This proves that Wordpress is obviously taking the request, it's just not taking it properly and giving information back.

Forgive me if I am wrong. I'm an amateur.

comment:13 Nazgul7 years ago

Yes. We can even tell you in which function it's probably going wrong (redirect_canonical), but these issues are extremely hard to diagnose from the outside.

That's why markjaquith asked for access to the box (in comment 4), to be able to diagnose the problem.

comment:14 chaoticmortalcom7 years ago

Okay, I am a total amateur when it comes to stuff that deep. I know about the loop, plugins, the kind of stuff that makes you feel all fuzzy and smart and able to test something like WP 2.3 and now look. Hmm...

Thanks, markjaquith and Nazgul for helping me in figuring out my problem.

chaoticmortalcom7 years ago

wp-includes/canonical.php

comment:15 follow-up: chaoticmortalcom7 years ago

I just attached canonical.php if it's helpful, because Nazgul mentioned it? But then again, maybe not. After all, I haven't touched it since I downloaded 2.3.

comment:16 in reply to: ↑ 15 foolswisdom7 years ago

Replying to chaoticmortalcom:

I just attached canonical.php if it's helpful

No, that won't help. We have as many copies of the code as we like.

Without trusting (set a temporary passwd) lead developer markjaquith to live debug the issue, you probably won't be able to resolve the issue short of just disabling canonical.

comment:17 chaoticmortalcom7 years ago

Oh. Sorry. I told you, I'm not that good at coding Wordpress. Yeah, I know PHP and HTML and that good stuff...

Does markjaquith really need a FTP or can I give him a temp. admin username on my blog?

comment:18 chaoticmortalcom7 years ago

I'd just like to say thanks to everyone who is helping me out with my problems and such with 2.3. I think it's wonderful that everyone has taken the time to enlighten me with the fact that there are helpful people working...

Thanks so much..

comment:19 DD327 years ago

Does markjaquith really need a FTP or can I give him a temp. admin username on my blog?

He'd need access to modify some files AFAIK, which cant be done from within WP.

Its impossible to tell whats causing the problem from the outside(or from the WP-Admin), modifying and tinkering with WP files is the only way to determine whats causing it to fail.

Its likely that if your having problems now, that others will have the problem when 2.3 is released..

Another option might be to change your password temporarily to allow mark access?
If you dont want to provide access via ftp at all(Which is understandable) then maybe theres some debug stagements that could be put in there?

comment:20 chaoticmortalcom7 years ago

I think I'll just leave at FTP, which I've already emailed him.

Also, a strange thing has happened: nothing works! I can't even get into control panel, and the only thing that shows is my Site Unavailable thing. Surely something happened, or is Mark still at work fixing things?

comment:21 chaoticmortalcom7 years ago

  • Severity changed from major to critical

By control panel I mean /wp-admin

comment:22 chaoticmortalcom7 years ago

Also, I thought it was possible to edit from within the admin interface with edit.php (Manage > Files) ? Am I wrong? Or is it just something else..

comment:23 DD327 years ago

Also, a strange thing has happened: nothing works! I can't even get into control panel, and the only thing that shows is my Site Unavailable thing. Surely something happened, or is Mark still at work fixing things?

Actually it looks like your site unavailable plugin is affecting everything and refusing to allow you access to the admin.

as for mark, I dont know, He might not even be available right now given he hasnt posted back

Also, I thought it was possible to edit from within the admin interface with edit.php (Manage > Files) ? Am I wrong? Or is it just something else..

Hm, Your right, i thought that was limited to plugins and themes, but if the server config allows you can edit any WP file..

If you'd like to get your blog back and working, Then you can disable the canonical redirections for now.

Remove your site unavailable plugin, then edit the file:

wp-includes/canonical.php

At the bottom of the file theres this line:

add_action('template_redirect', 'redirect_canonical');

If you comment it out as such:

//add_action('template_redirect', 'redirect_canonical');

then that should disable the redirection, it doesnt fix the problem code, its just a work around until mark can get back to you.

comment:24 chaoticmortalcom7 years ago

I will disable the plugin soon, even though the Site Unavailable plugin is supposed to only block index.php...

I can't do it right now because I'm at someone else's house and they don't have an FTP installed and the stupid online interface is all buggy and I can't get to my wp-content folder. I really should switch to Media Temple...

Anyways, remind me again before I do the steps listed: What does the canonical redirection function do? If it supplies the permalinks, then no links will work on my site, because everything is already on top of Mod_Rewrite... or whatever it was.

Thanks for your help DD32, markjaquith, foolswisdom, and Nasgul. Without your help, nothing would have happened!

comment:25 mossyblog7 years ago

It's the same bug as I logged here. It has to do with USER_COOKIE not being set...

http://trac.wordpress.org/ticket/5024

comment:26 markjaquith7 years ago

mossyblog, that's not related to this issue.

comment:27 markjaquith7 years ago

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

(In [6143]) Remove trailing /index.php fixing from canonical.php ... Thanks chaoticmortalcom. fixes #5017

comment:28 markjaquith7 years ago

chaoticmortalcom,

I fixed your site. Thanks so much for giving me access. The issue was that your server makes $_SERVER['REQUEST_URI'] '/index.php' for requests to '/' An endless redirect followed, because it was trying to strip that off, but the server was telling it is was still there.

Unfortunately, it doesn't appear that there is any way on your server to differentiate between the two, so I've had to remove that feature of canonical.php

I may revisit this in 2.4

comment:29 chaoticmortalcom7 years ago

Gee, thanks SO much. I'll be putting up a thank-you message.

comment:30 markjaquith6 years ago

  • Milestone changed from 2.3 to 2.8
  • Resolution fixed deleted
  • Status changed from closed to reopened

Bumping this issue. Netfirms was the only host that has had this issue. Will have Matt contact them and ask for an update.

comment:32 markjaquith6 years ago

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

(In [9203]) Strip trailing /index.php in Canonical, fixes #5017. fixes #7173.

comment:33 westi6 years ago

  • Milestone changed from 2.8 to 2.7
Note: See TracTickets for help on using tickets.