Opened 14 years ago
Closed 14 years ago
#15435 closed defect (bug) (invalid)
Network blog query returns wrong permalinks
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
When querying for posts on network blogs (i.e. a loop for all posts on all network blogs) the permalink of a post is relative to the current site (or top site -- not sure).
The following returns http://xyz.example.com/%post_name% for all posts, no matter what their subdomain is.
So a post usually found at http://abc.example.com/hello-world/ outputs as http://xyz.example.com/hello-world/
query_posts( 'blogid='. $blogid ); while (have_posts()) : the_post(); echo get_permalink(); endwhile;
All other post data is intact. The titles, categories, etc. all match the post. Only the permalink is incorrect.
Change History (10)
#3
@
14 years ago
Odd. The rewrite rules won't be reset (as seen in the other two tickets), but the URLs should be fine (based on the original blog's rewrite rules), I imagine.
#4
follow-up:
↓ 5
@
14 years ago
I see no evidence whatsoever (neither in Codex nor in source) that query_posts
accepts blogid
as a parameter. Is query_posts( 'blogid='. $blogid )
a valid example?
#5
in reply to:
↑ 4
@
14 years ago
Replying to SergeyBiryukov:
I see no evidence whatsoever (neither in Codex nor in source) that
query_posts
acceptsblogid
as a parameter. Isquery_posts( 'blogid='. $blogid )
a valid example?
I think you're right about nothing being officially supported and I can't find it in the source either. However, it still works ... to an extent. The blogid parameter is being used by query_posts and finding the correct posts. It just isn't writing the permalinks as they should be.
If it isn't "officially" supported it certainly should be.
#7
@
14 years ago
Indeed it was. How embarrassing.
Can you guys consider adding this parameter in 3.2?
These tickets may be related #12040, #13530.