#2498 closed defect (bug) (fixed)
faulty "referredby" in write post page
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.1 |
Component: | Administration | Keywords: | bg|has-patch bg|dev-feedback |
Focuses: | 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 (1)
Change History (18)
#2
@
19 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
@
19 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
@
19 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
@
19 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.
#6
@
19 years ago
I too have this problem. What info do you need from me?
Permalink structure: /%category%/%postname%/
Example url I get transfered to after hitting "publish": http://friendlybit.com/wp-admin/%3Cdiv%20id=%5C'error%5C'%3E%09%09%09%3Cp%20class=%5C'wpdberror%5C'%3E%3Cstrong%3EWordPress%20database%20error:%3C/strong%3E%20%5BYou%20have%20an%20error%20in%20your%20SQL%20syntax;%20check%20the%20manual%20that%20corresponds%20to%20your%20MySQL%20server%20version%20for%20the%20right%20syntax%20to%20use%20near%20%5C')%20ORDER%20BY%20post_id,%20meta_key%5C'%20at%20line%201%5D%3Cbr%20/%3E%09%09%09%3Ccode%3ESELECT%20post_id,%20meta_key,%20meta_value%20FROM%20wp_postmeta%20WHERE%20post_id%20IN()%20ORDER%20BY%20post_id,%20meta_key%3C/code%3E%3C/p%3E%09%09%09%3C/div%3Ehttp://friendlybit.com/wp-admin/post.php?action=edit&post=48
Posts get saved and the site works fine, I just get transfered to that annoying url.
There is also a thread about this going on here: http://wordpress.org/support/topic/61431
#8
@
19 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.
#13
@
19 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
@
19 years ago
Correction. I see the confusion. abrazell and technosailor are the same person: me.
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