Ticket #2498 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

faulty "referredby" in write post page

Reported by: sjoe Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.0.1
Severity: normal Keywords: bg|has-patch bg|dev-feedback
Cc:

Description

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

2498.diff (411 bytes) - added by technosailor on 02/27/06 01:33:27.
tests for the existence of $posts[0]->ID

Change History

02/24/06 19:27:24 changed by MarkR1

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)

Mark

02/27/06 01:33:27 changed by technosailor

  • attachment 2498.diff added.

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

02/27/06 02:56:07 changed by technosailor

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.

02/27/06 20:26:16 changed by ryan

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

02/27/06 23:59:08 changed by abrazell

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.

03/02/06 13:18:12 changed by davidhouse

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.

03/03/06 00:43:35 changed by error

  • keywords set to bg|has-patch bg|dev-feedback.

03/03/06 02:08:09 changed by ryan

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.

03/03/06 02:19:29 changed by ryan

[3602] for 2.0 branch.

[3600] and [3601] for trunk.

Does that help?

03/03/06 02:29:59 changed by ryan

  • milestone set to 2.0.2.

03/04/06 21:17:29 changed by ryan

Confirmed on the forums.

03/04/06 21:17:40 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

03/05/06 16:28:34 changed by technosailor

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

03/05/06 16:30:04 changed by technosailor

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

03/05/06 16:32:36 changed by davidhouse

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

03/05/06 16:33:46 changed by technosailor

No problem. :)

11/30/06 19:41:50 changed by

  • milestone deleted.

Milestone 2.0.2 deleted