[wp-trac] [WordPress Trac] #22985: Edit thumbnail image only - loses all sub sizes in attachment meta

WordPress Trac noreply at wordpress.org
Fri Jan 4 11:53:07 UTC 2013


#22985: Edit thumbnail image only - loses all sub sizes in attachment meta
--------------------------+---------------------------
 Reporter:  lewismcarey   |       Owner:  markoheijnen
     Type:  defect (bug)  |      Status:  assigned
 Priority:  high          |   Milestone:  3.5.1
Component:  Media         |     Version:  3.5
 Severity:  critical      |  Resolution:
 Keywords:  has-patch     |
--------------------------+---------------------------

Comment (by nacin):

 Went through a bunch of random ideas when talking to westi, regarding an
 upgrade routine. One is that  _edit_lock gets set when entering post.php.
 We can look for all attachments with an _edit_lock greater than December
 11, then individually run over those to fix their metadata. It's not
 foolproof, but it'll help a decent amount.

 _wp_attached_file also gets updated with a suffix on edit, -e followed by
 13 digits. The first 10 digits are time() and the last three are rand(100,
 999). So we can use the time instead (which would also last through an
 export/import).

 Next, we need to figure out how to fix these. The gist is nice to prevent
 saves as they occur. But what about once the sizes are missing? What is
 the best way to re-calculate and recover this data?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22985#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list