Opened 16 years ago
Closed 14 years ago
#6627 closed enhancement (wontfix)
Canonization, individual editing of permalinks
Reported by: | synapsestudios | Owned by: | markjaquith |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.5 |
Component: | Canonical | Keywords: | needs-patch |
Focuses: | Cc: |
Description
It would be nice to see an option to view all permalinks available. Currently only one is shown even though multiple exist. Possibly using a method similar to Google calendar telling you "+4 more" which is a link that displays all the other ways to access that post/page.
Also, I am not sure if it is possible but it might be useful to some to be able to have different slugs for the same article.
Example:
-- slug of test exists in category-a
-- create a new post with a slug of test in category-a and category-b which becomes test-2 across the board
-- allow for user to specify category-a/another-test and category-b/test
Change History (25)
#3
follow-up:
↓ 4
@
16 years ago
With a post permalink, there can be multiple ways of accessing that post depending on how the permalink structure is created. For example, my permalink structure is as follows: /%category%/%postname%/
Which means when I have a post in more than one category, there is more than one way to access the same post.
Additionally, the same content can be reached via author/{authorName}/{postSlug}
#4
in reply to:
↑ 3
@
16 years ago
Replying to synapsestudios:
With a post permalink, there can be multiple ways of accessing that post depending on how the permalink structure is created. For example, my permalink structure is as follows: /%category%/%postname%/
Which means when I have a post in more than one category, there is more than one way to access the same post.
That is a deficiency in our canonical redirect code then.
Additionally, the same content can be reached via author/{authorName}/{postSlug}
That's not really a permalink. Perhaps canonical redirect should redirect author links containing post slugs to the post's canonical permalink.
#6
@
16 years ago
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
I'll handle the category situation for 2.7 The author situation seems contrived. WordPress would never generate those links.
#8
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Since [9193] my rewrite rules (Plugin : NextGEN Gallery) for post are not longer working anymore... I'm not sure if I done it in the past in a wrong way but the line
$redirect_url = get_permalink( url_to_postid( $requested_url ) );
Removes all my query args for posts. How should I add now additional args to the post url ?
#9
@
16 years ago
@alexrabe: I also have this problem for my WP-Email and WP-Print plugin, what I did was to have template redirect loads first before the canonical url. This is what I did
!php add_action('template_redirect', 'wp_print', 5);
#10
@
16 years ago
Thanks for the note GamerZ,
I'm not sure if I can use it in this way... I request the args with get_query_var() during my shortcodes are proceeded, don't thinks I can use here a template redirect. Maybe I understand this whole rewrite sytems not fully and I'm doing something terrible wrong. I will have a look for your plugins
#11
@
16 years ago
I see, I think I got what you mean. ShortCode are parsed at the the_content() level and hence I think the canonical url redirect has already taken place.
In canonical.php, if you comment out this line
add_action('template_redirect', 'redirect_canonical');
does it work?
I tried many methods, using the WP rewrite endpoints API and it seems that it will not detect other query vars except its own.
#12
@
16 years ago
Yes it works when comment out the redirect_canonical. If I hook into url_to_postid() I see taht it will now passed two times... the first time it return the correct query but due to the redirect it will then not longer contain my query args.
@markjaquith
Do we really need [9193] in WP 2.7 ?
#15
@
16 years ago
I'm a little bit confused about the problem you're having. I have no problem passing arbitrary query strings:
http://mark-mbp.local/~mark/wp/2008/11/private/?foo=bar
Does not redirect.
#16
@
16 years ago
Ah, you mean additional things on the path. Like:
http://example.com/2008/11/postname/gallery/
I can roll this back pending a more cautious fix. Maybe compare the canonical URL to the current URL to see if they are the same + some suffix. But this is fine to punt to 2.8
#19
@
16 years ago
Many thanks for your decision, let me know if I should change anything in my rewrite rules for 2.8
#20
@
16 years ago
- Cc janbrasna added
- Keywords permalink slug canonization added
- Summary changed from View all permalinks + individual editing of permalinks to Canonization, individual editing of permalinks
Related #3451 (see comments).
Do you mean post permalinks? There is only one permalink for a post. We go trough pains to make sure there is only one canonical permalink for a given post. That canonical link is the only one that should be used or displayed.