WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#3934 closed defect (bug) (worksforme)

prev/next links and redirected domains

Reported by: davidmwilliams Owned by: westi
Milestone: Priority: lowest
Severity: trivial Version:
Component: General Keywords:
Focuses: Cc:

Description

Fundamentally, I have a domain (alivad.com) which redirects via DNS to my ISP web space (http://home.exetel.com.au/davidmwilliams). I set the WordPress URI to http://www.alivad.com and the Blog address to http://www.alivad.com - both are the same.

This works, in that WordPress shows links for posts, categories, pages, etc in the format I want, namely http://www.alivad.com/?blah

HOWEVER the previous and next page links at the bottom of the page are showing wrongly as http://www.alivad.com/davidmwilliams/index.php?paged=x (and, of course, these are invalid addresses).

I can't understand why the 'davidmwilliams' part is being added like that. It seems the next/prev page links are working out the address by a mixture of the blog address and the physical underlying directory. I am surmising it uses different code to generate the link than as used for posts, categories, etc.


I originally submitted this as ticket 3933 (http://trac.wordpress.org/ticket/3933) but that was prematurely closed. I do NOT believe the bug report should be closed. Unfortunately I do not have the authority level to append to tickets so I have no choice but to create a new one.

Responding to the comment by the premature closer: If I change the blog address then the links work in that they generate accurate links. However, they are no longer in the desired format - i.e. all page headings and all links show as http://home.exetel.com.au/davidmwilliams/... rather than http://www.alivad.com/...

Please understand, what I am trying to do is not obscure nor unreasonable nor ridiculous nor outlandish.

Let me restate the problem:

  • The blog address is www.blah.com
  • blah.com is a valid domain
  • blah.com is redirected via DNS to www.isp.com/foo
  • ALL page and category links are generated by WordPress as www.blah.com/... as expected and as desired
  • The prev and next links do NOT display in that format; they show as www.blah.com/foo/... and hence refer to non-existant pages

The implications of this are:

  • the prev/next link code is different to the code to generate links elsewhere
  • the prev/next link code is itself determining the underlying page address and is not respecting the blog address that has been specified

I believe this is a bug. Even if others feel what I am doing is somehow "strange" I am sure it can be appreciated that the prev/next link code is not consistent with other link code, and that in itself is a reason for wanting some tidying.

Change History (12)

comment:1 in reply to: ↑ description JeremyVisser7 years ago

Replying to davidmwilliams:

Unfortunately I do not have the authority level to append to tickets so I have no choice but to create a new one.

Since when?

comment:2 JeremyVisser7 years ago

Can you please not use Trac? Your previous ticket has been closed by the resident WordPress bug guru, so you should discuss it on the mailing list or forums.

comment:3 davidmwilliams7 years ago

Well, the trac site said I did not have the authority but yet allowed a new ticket to be opened.

If the person who closed the ticket is a "bug guru" then I am grossly disappointed by what passes as a guru. Indeed, I am really very surprised by how very friendly WordPress users and maintainers are until the point of asking questions about the software; I've found the responses to be aggressive and offensive. I am quite surprised.

If anyone seriously believes this is not a bug then I would be keen to know why. I do not believe it is sufficient to say "here's a bodgy workaround".

After all, it is quite evident that the code to generate prev/next links is working differently to the code which generates the page and category links - and they DO work in the way I would expect.

comment:4 davidmwilliams7 years ago

Let me ask this:

If I specify the blog address to be www.x.com but the software produces links - in just one area only, not in others - of the form www.y.com - is that not a bug?

comment:5 davidmwilliams7 years ago

Dudes, leave it with me.

I think WordPress is a great app. I'm a bit disappointed with the attitudes I've received by having the audacity to say I've experienced a problem.

I'll delve into the source code and work this out. I'll post my findings here for your consideration.

comment:6 westi7 years ago

  • Keywords reporter-feedback added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

I'm not sure which template functions you are talking about here.

I think you are talking about the post page links from next_posts/next_posts_link and previous_posts/previous_posts_link these use get_pagenum_link which is probably where we need to fix this issue.

Can you give more info / confirm this?

comment:7 davidmwilliams7 years ago

Thanks, westi, for the extremely helpful starting point !!

I will check those functions and get back to you soon. Much appreciated.

comment:8 westi7 years ago

See also #3930 for some improvements to get_pagenum_link which may help.

comment:9 davidmwilliams7 years ago

Hi Westi,

Thanks for the pointer where to look. I believe you are dead right; the issue is in get_pagenum_link. In particular, I'm thinking this line: $index = $_SERVER['PHP_SELF'];

Should that line actually be trying to retrieve the specified Blog address as set in the options screen?

comment:10 rob1n7 years ago

  • Component changed from Administration to General
  • Milestone changed from 2.3 to 2.4
  • Priority changed from low to lowest
  • Severity changed from normal to trivial

comment:11 follow-up: Nazgul7 years ago

  • Keywords reporter-feedback removed

Is this still a problem after #3930 was fixed?

comment:12 in reply to: ↑ 11 lloydbudd6 years ago

  • Milestone 2.4 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

Replying to Nazgul:

Is this still a problem after #3930 was fixed?

No response from bug reporter, closing as works for me w/o verification.

Note: See TracTickets for help on using tickets.