Opened 22 years ago
Closed 20 years ago
#1199 closed defect (bug) (worksforme)
Permalink /%category%/%postname%/ fails to generate
| Reported by: | anonymousbugger | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.0 |
| Severity: | major | Keywords: | permalinks |
| Cc: | Focuses: |
Description
Permalink /%category%/%year%/%monthnum%/%day%/%postname%/ fails. %category% is replaced by none: %year%/%monthnum%/%day%/%postname%/. Error 404 - Not found
Change History (7)
#2
@
21 years ago
- Keywords permalinks added
- Severity trivial → major
- Summary Permalink /%category%/%year%/%monthnum%/%day%/%postname%/ fails → Permalink /%category%/%postname%/ fails
- Version 1.5 → 1.5.2
#3
@
21 years ago
- Milestone → 2.0
- Priority normal → high
- Version 1.5.2 → 2.0
http://wordpress.org/support/topic/51587#post-288444
Just installed WP2. The same problem.
My new observations.
In file template-functions-links.php
$cats = get_the_category($post->ID); - returns table (array), where categories matching post ID shoild be.
$category = $cats[0]->category_nicename; - should take from this table (array) first match nicename for category.
BUT in fact, it should take instead of [0] (means first row), row with category number. So, I understand, that function function get_the_category($id = true) in template-functions-category.php works incorrectly on some hosts or with some settings, selecting ALL categories, not the one.
I understand, that you are working hard on WP2, but now it is proved to be a bug in WP2 too ;-)
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The same problen in 1.5.2 Strayhorn.
Problem is in generation, not work.
If I put correct category in url - page opens correctly.
But, what I see: permalinks, that were previously generated correctly, generated in strange way:
Instead of creating link (in title and "more..") to http://wwwua.petrenko.com.ua/seen/graffity/chicken-little/ it creates link to http://wwwua.petrenko.com.ua//chicken-little/
In permalinks structure - /%category%/%postname%/...
Moreover, long link (http://wwwua.petrenko.com.ua/seen/graffity/chicken-little/) - works...
So, I experimented about for a while: made couple of fresh installs on different urls on the same server - the same situation - %category% is missing.
I have access to server configuration (VDS). May change of some settings help?
I want to stress: ALL PERMALINKS WORK CORRECTLY IF PROPERLY GENERATED or created (it is not problem in .htaccess rules; apache 2).