[wp-trac] [WordPress Trac] #2681: Error on Inline Uploading after
deleting page with attached file
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 21 20:34:42 GMT 2006
#2681: Error on Inline Uploading after deleting page with attached file
----------------------------+-----------------------------------------------
Id: 2681 | Status: new
Component: Administration | Modified: Fri Apr 21 20:34:42 2006
Severity: normal | Milestone: 2.1
Priority: normal | Version: 2.1
Owner: anonymous | Reporter: ryanscheuermann
----------------------------+-----------------------------------------------
OK, here's how to replicate:
1) Create a page with test content
2) Publish the page
3) Edit the page
3) Upload an image in the inline iframe when on the edit screen for that
page
4) Click Manage->Pages
5) Delete the page
6) Click Write->Write Page
7) In the inline uploading iframe, click Browse All
8) You should see this error:
{{{
Warning: strtotime() [function.strtotime]: Called with an empty time
parameter. in wp-includes\template-functions-links.php on line 53
Warning: date() [function.date]: Windows does not support dates prior to
midnight (00:00:00), January 1, 1970 in wp-includes\template-functions-
links.php on line 65
}}}
The get_attachment_link function is trying to use a parent post that
doesn't exist. (template_function_links.php - around line 117)
SOLUTION: We should intentionally be orphaning attachments (update
post_parent to 0) when deleting pages/posts. Otherwise, we just have bad
data.
I'll submit a patch in a minute...
--
Ticket URL: <http://trac.wordpress.org/ticket/2681>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list