[wp-trac] [WordPress Trac] #5754: post.php?action=edit with no &post shouldn't result in "You attempted to edit a post that doesn't exist. Perhaps it was deleted?"

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 2 16:44:36 GMT 2008


#5754: post.php?action=edit with no &post shouldn't result in "You attempted to
edit a post that doesn't exist. Perhaps it was deleted?"
-----------------------+----------------------------------------------------
 Reporter:  lloydbudd  |       Owner:  anonymous
     Type:  defect     |      Status:  new      
 Priority:  lowest     |   Milestone:  2.6      
Component:  General    |     Version:           
 Severity:  trivial    |    Keywords:           
-----------------------+----------------------------------------------------
 post.php?action=edit with no &post shouldn't result in "You attempted to
 edit a post that doesn't exist. Perhaps it was deleted?"

 ENV: WP trunk r6705 (2.4-bleeding)

 When reporting #5753, I noticed that [[br]]
 http://localhost/wp/trunk/wp-admin/post.php?action=edit [[br]]
 results in [[br]]
 You attempted to edit a post that doesn't exist. Perhaps it was deleted?

 EXPECTED RESULT [[br]]
 Redirected to http://localhost/wp/trunk/wp-admin/edit.php [[br]]
 just like what happens with you visit http://localhost/wp/trunk/wp-
 admin/post.php

 ADDITIONAL DETAILS

 This bug suggests soft logic is used in post.php :

 {{{
 case 'edit':
         $title = __('Edit');
         $editing = true;
         $post_ID = $p = (int) $_GET['post'];
         $post = get_post($post_ID);

         if ( empty($post->ID) ) wp_die( __("You attempted to edit a post
 that doesn't exist. Perhaps it was deleted?") );
 }}}

 Severity set to trivial because I know of no real symptom other than the
 one exposed by #5753.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5754>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list