Error Saving Media Attachment. Wordpress 3.4.1
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “Error saving media attachment.” in Media Library up vote 1 down vote favorite After uploading a normal jpg or png (anything) to the media library, we get the above error. I've seen many posts on this topic and tried everything but still stuck. I'm not the regular user, but I see dozens of other pictures have been uploaded, and suddenly we're getting this error. I checked the server, there is disk space, the permissions for Uploads and Images folders are writable (777) and I've confirmed that I can upload through the Plex control panel. I also tried deactivating all the plugins. There are a couple things I'm also curious about, but I'm not sure if they are related: 1) One said to make sure "Always use HTTPS" is checked, but I do not have that option which is talked about here: http://en.support.wordpress.com/https/ 2) If I go to wp-admin/network/settings.php I get the WordPress message "You do not have sufficient permissions to access this page," even though I have a user with the Administrator role. Is there another hidden user with greater permissions? Still not sure if that would help though, since everything was fine until recently. Edit: I found the cause, however I don't know why it happened or how to prevent it from happening in the futu
tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us WordPress Development Questions Tags Users Badges Unanswered Ask Question _ WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to Fix HTTP Error When Uploading Images? up vote 8 down vote favorite 7 I am http://stackoverflow.com/questions/16018445/error-saving-media-attachment-in-media-library using WordPress 3.4.1 on Ubuntu 12.04 using Apache and PHP 5.3.X When I login to the dashboard and add a new post. Then try uploading an image to set as a featured image, I get a red box with a message "HTTP Error". I have read about people saying to not use the flash uploader and just use the browser uploader, but when I try that, I just get a 500 Internal Server Error. I have tried adding AddType x-mapp-php5 http://wordpress.stackexchange.com/questions/59763/how-to-fix-http-error-when-uploading-images .php at the top of my .htaccess file, with no luck in change. Disabling ALL plugins had no effect. I tried a fresh install. No luck. post-thumbnails uploads attachments media media-library share|improve this question asked Jul 26 '12 at 17:05 Michael Ecklund 2,47332866 add a comment| 4 Answers 4 active oldest votes up vote 8 down vote accepted After troubleshooting with @Wyck in chat, we have narrowed to the underlying issue. The issue was related to my server configuration not having the proper amount of memory allocated to Apache/PHP. If anyone has this same problem, please try verifying that you have enough (64MB+) server memory allocated to Apache/PHP in your server configuration settings. You can also add this to your wp-config.php file: define('WP_MEMORY_LIMIT', '64MB'); If the above solution does not work, read this article (Image/Media Uploader problems?) for further trouble shooting. try adding one by one or all of the following .htaccess tweaks to the .htaccess file in the root directory of your WordPress installation. Seriously, try one of each of the solutions below so you know which one did the trick. Don't just paste them all in your .htaccess file immediately. Try this line: AddType x-mapp-php5 .php mod_security might be causing problems. Disable it to see if that is the problem. To do this, make an .htaccess file in your wp-admin directory. Add this to it:
a New Ticket Search: LoginNotifications Context Navigation ← Previous TicketNext Ticket → Opened 6 months ago Last modified 3 weeks ago #36534 reopened defect (bug) Media Upload Issue Since 4.5 Upgrade Reported by: unicornbacon Owned by: joemcgill Milestone: https://core.trac.wordpress.org/ticket/36534 Future Release Priority: normal Severity: major Version: 4.5 Component: Media Keywords: needs-testing needs-patch Focuses: https://core.trac.wordpress.org/ticket/22868 Cc: Description Here is my problem: Since I updated to 4.5 yesterday, I can't upload certain image files. Every time I try, I get an error stating: Fatal error: Maximum execution time of 30 seconds exceeded in /home2/scarlett/public_html/germany/wp-includes/class-wp-image-editor-imagick.php on line 358 I finally figured out that the problem is with the photograph's dimensions. All error saving of the photos that won't upload were rotated from landscape to portrait on import. Their dimensions are 3000x4000 rather than 4000x3000 like the photos that I can still upload. After trying to save the photos without their metadata, turning off all plugins, and various other edits and experiments, it turns out that for some reason I only get the "imagick"" error on the photos that have a error saving media dimension of 3000x4000. Changing it to 2250x3000 (or anything less than 4000 for the height) allows me to upload them. I had no problem uploading files with this designation before I updated to 4.5. Everything else about the files is identical, and the file sizes do not conform to any kind of pattern and are not particularly large or small. As test, I tried to re-upload a photo that had this exact same ratio that I had uploaded successfully yesterday, and it would not upload today. This leads me to believe that there is something going on WP's end, since nothing has changed on the server side in the last 24 hours (and sadly my auto-backup was turned off somehow so now I am stuck with this). Attachments (2) 36534.diff (859 bytes) - added by joemcgill 6 months ago. 36534.2.diff (1.2 KB) - added by joemcgill 4 months ago. Use FILTER_BOX during resizing Download all attachments as: .zip Oldest first Newest first Threaded Comments only Change History (97) #1 @adamsilverstein 6 months ago Milestone Awaiting Review deleted Resolution set to invalid Status changed from new to closed Hi @unicornbacon thanks for the bug report (and awesome handle!) The error Maximum execu
a New Ticket Search: LoginNotifications Context Navigation ← Previous TicketNext Ticket → Opened 4 years ago Closed 4 years ago Last modified 4 years ago #22868 closed defect (bug) (fixed) broken compat attachment attributes save Reported by: geminorum Owned by: nacin Milestone: 3.5.1 Priority: normal Severity: normal Version: 3.5 Component: Media Keywords: has-patch Focuses: Cc: Description cannot save data via attachment_fields_to_save filter. probably because wp_ajax_save_attachment_compat() expects $_REQUESTattachments? which not provided by save-attachment-compat js sender. there are only post_id, id (attachment_id), and the changes. Attachments (2) media-bug.php (1.9 KB) - added by geminorum 4 years ago. sample plugin 22868.diff (563 bytes) - added by nacin 4 years ago. Download all attachments as: .zip Oldest first Newest first Threaded Comments only Change History (17) #1 @dd32 4 years ago To make it easier for others to test and debug, can you please post some code which can be used to trigger it, or a plugin name (and version) which can be used to duplicate it? #2 @geminorum 4 years ago wp.media.model.Attachment.saveCompat sends id, post_id, nonce and the new changes. wp_ajax_save_attachment_compat() expects attachments or attachmets id. so cannot use attachment_fields_to_save to save extra data. it triggers by my theme framework, not published yet. unfamiliar with new js workflow, and sorry, don't know how to build a patch. Last edited 4 years ago by geminorum (previous) (diff) #3 @geminorum 4 years ago Summary changed from broken backward attachment attributes save to broken compat attachment attributes save @geminorum 4 years ago Attachment media-bug.php added sample plugin #4 @geminorum 4 years ago the attached works on WP 3.4.2, but not on WP 3.5 #5 @crocro 4 years ago I'm experiencing this problem as well : this occurs because of the checkboxes and jQuery's serializeArray function. Further explanation : when the checkbox goes unchecked, the serializeArray function (at line 4139 of media-views.js) won't take it into account (the function is designed to work like a browser : when the checkbox is unchecked, no info is sent via HTTP POST requests). As a consequence, when wordpress receives the AJAX request, the post parameters will look like that : action save-attachment-compat id 34872 nonce a1b5113007 post_id 34865 Whereas it's expecting something like this to work (just like when a classic text input is empty) : action save-attachment-compat id 34872 custom_checkbox_field (empty) nonce a1b5113007 post_id 34865 Therefore, it won't even bother calling "atta