Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#1199 closed defect (bug) (worksforme)

Permalink /%category%/%postname%/ fails to generate

Reported by: anonymousbugger's profile anonymousbugger Owned by:
Milestone: Priority: normal
Severity: major Version: 2.0
Component: General Keywords: permalinks
Focuses: Cc:

Description

Permalink /%category%/%year%/%monthnum%/%day%/%postname%/ fails. %category% is replaced by none: %year%/%monthnum%/%day%/%postname%/. Error 404 - Not found

Change History (7)

#1 @anonymousbugger
19 years ago

  • Patch set to No

#2 @petrenkocomua
18 years ago

  • Keywords permalinks added
  • Severity changed from trivial to major
  • Summary changed from Permalink /%category%/%year%/%monthnum%/%day%/%postname%/ fails to Permalink /%category%/%postname%/ fails
  • Version changed from 1.5 to 1.5.2

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).

#3 @petrenkocomua
18 years ago

  • Milestone set to 2.0
  • Priority changed from normal to high
  • Version changed from 1.5.2 to 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 ;-)

#4 @petrenkocomua
18 years ago

  • Summary changed from Permalink /%category%/%postname%/ fails to Permalink /%category%/%postname%/ fails to generate

#5 @matt
18 years ago

  • Milestone changed from 2.0 to 2.1
  • Priority changed from high to normal

#6 @matt
17 years ago

  • Milestone changed from 2.1 to 2.2

#7 @rob1n
17 years ago

  • Milestone 2.2 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Works for me.

Note: See TracTickets for help on using tickets.