Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2498 closed defect (bug) (fixed)

faulty "referredby" in write post page

Reported by: sjoe's profile sjoe Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.1
Component: Administration Keywords: bg|has-patch bg|dev-feedback
Focuses: Cc:


hi guys,

i use as permalink structure "/%postname%/". in this case the reciving of the referer on the writing page (wp-admin/post.php) failed (only if you edit a existing post and is must be a draft).
in consequence you will redircted to an not existing page.

Attachments (1)

2498.diff (411 bytes) - added by technosailor 18 years ago.
tests for the existence of $posts[0]->ID

Download all attachments as: .zip

Change History (18)

#1 @MarkR1
18 years ago

I have also experienced this.

Sometimes it's hard to see this problem as it causes an error message to appear inside a hidden form field.

Perhaps wpdb::print_error needs to be fixed so that this is more obvious (and also logs on PHP error log and doesn't continue processing the page)


18 years ago

tests for the existence of $posts[0]->ID

#2 @technosailor
18 years ago

It happens because $post_id_array() does not exist. The $posts array only has a post_date member in this context and therefore fails the resulting SQL. Patch tests for the existence of at least one post ID as well before continuing execution.

#3 @ryan
18 years ago

Why would it have only a post_date member? get_posts() is checking the ID before it calls update_post_caches(). If this is broken, we probably need to fix it in get_posts().

#4 @abrazell
18 years ago

You very well could be right, Ryan, but I spent the better part of two hours trying to track this bug because it is affecting a dozen of our blogs, and this was the best I could come up with.

#5 @davidhouse
18 years ago

Huh? Is anyone else really confused? Abrazell hasn't had anything to do with this bug, so I have no idea what you mean when you say "this" is the best you could come up with.

And we're not going to commit tickets that don't fully solve the problem. If your patch works for you, by all means use it. We'll have a better patch within a few days.

#7 @error
18 years ago

  • Keywords bg|has-patch bg|dev-feedback added

#8 @ryan
18 years ago

This explains it. I think we just need an if empty check on this->posts right after we get_results. I'll put commit a hopeful fix to the 2.0 branch for everyone to test.

#9 @ryan
18 years ago

[3602] for 2.0 branch.

[3600] and [3601] for trunk.

Does that help?

#10 @ryan
18 years ago

  • Milestone set to 2.0.2

#11 @ryan
18 years ago

Confirmed on the forums.

#12 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#13 @technosailor
18 years ago

"Huh? Is anyone else really confused? Abrazell hasn't had anything to do with this bug, so I have no idea what you mean when you say "this" is the best you could come up with."

I'm sorry if you think I have nothing to do with this bug. Perhaps you meant that I didn't submit it? Or maybe something else? I don't sit on Trac waiting for tickets precisely for this reason - when I've submitted patches, I get snide comments like this.

As it happens, I DO have something to do with this because it affects my 90 blogs that I am responsible to maintain. If the funnel effect spoken about in the hackers mailing list is in play, then let it vet the diff out. This is no way to get contributions.

And now I'm lurking on the Trac mailing list so I'll be happy to respond to further comments when they become available in this ticket.

#14 @technosailor
18 years ago

Correction. I see the confusion. abrazell and technosailor are the same person: me.

#15 @davidhouse
18 years ago

Heh. I did have my suspicions. Thanks for clearing that up; there was nothning snide about my comments whatsoever and I'd hate random passers-by to think that there was.

Okay, confusion over :)

#16 @technosailor
18 years ago

No problem. :)

#17 @(none)
17 years ago

  • Milestone 2.0.2 deleted

Milestone 2.0.2 deleted

Note: See TracTickets for help on using tickets.