Opened 9 years ago
Closed 4 years ago
#36454 closed defect (bug) (invalid)
Post Status Transition hook error if title contains quotes or special chars
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4.2 |
Component: | Posts, Post Types | Keywords: | reporter-feedback close |
Focuses: | Cc: |
Description
Hi,
this is my fist bug report, so I hope doing it well :D
I think i found a bug.
I wrote a plugin which uses the 'draft_to_publish' hook. It usually works well, but I have some problems if the post title contains quotes or special chars.
Going more specific, I access the post with "$post = get_post($id)" inside my function, but if I try to access the post title with "$post->post_title" it gives me an empty string.
Moreover, this is very strange, if I use $wpdb->insert(), $wpdb->insert_id results null even if the insert is correctly executed.
If the title does not contains quotes or special chars all works well
Change History (4)
#3
@
4 years ago
- Keywords close added
Hello @mikylucky,
Does this issue persist today? If yes, please provide us with more details and feedback to help us investigate.
As boonebgorges notes, we need the following feedback:
Can you provide the relevant code from your plugin, along with sample data that can be used to reproduce the problem?
For now, marking this ticket as a close
candidate. Why? Not finding this issue reported elsewhere. As boonebgorges notes "not clear...why the post status transition would have anything to do with it." Likely due to a conflict from the stack including a plugin or theme. Will review when/if more feedback is given.
Hi @mikylucky - Thanks for the report, and welcome to WordPress Trac! (And sorry for the delay in responding to the ticket.)
Can you provide the relevant code from your plugin, along with sample data that can be used to reproduce the problem? It's not clear to me why the post status transition would have anything to do with it.