Ticket #905 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

DM2: Uploading more than one file fails

Reported by: flack Assigned to: bergie
Priority: critical Milestone: 8.09.6 Ragnaroek
Component: MidCOM component Version: 8.09 Ragnaroek
Keywords: fileupload Cc:

Description

In the last couple of weeks, I noticed that file uploads in DM2 randomly fail. When you upload just one file at a time, it usually works, but uploading to or more file in the same datamanager form almost never works.

For example, if I have a DM2 schema with a video widget, I have two upload fields, one for a screenshot, the other for a video. When I create a new article with a schema like that and upload an image and a video, I see the thumbnail and the filename in the creation form, but when I click save to create the article, both are gone.

The same happens when I exchange the video widget with a photo and a downloads widget. The same also happens in the edit form: Exchanging or uploading one file usually works (but not always), exchanging or uploading more than one file almost always fails.

Tested on r20774 and Debian 5 Stable

Change History

03/05/09 16:02:28 changed by flack

Here are the interesting parts of the midcom log when I upload both a video and a screenshot with the DM2 video widget to an already existing article (the result is that both the video and the screenshot get lost):

	[debug] Start of MidCOM run: edit/7c20205e099211de87ae0f6eb9e2a467a467/
	[debug] midcom_services_cache_module_content::_check_hit: POST variables have been found, setting no_cache and not checking for a hit.

	[info] midcom_helper_datamanager2_type_blobs::delete_attachment: Failed to delete the attachment record: The identifier is unknown.
	[debug] midcom_baseclasses_database_attachment::_create_attachment_location: Created this location: D/B/db633478b420446ba6af0fd889b41aea

	[info] midcom_helper_datamanager2_type_blobs::delete_attachment: Failed to delete the attachment record: The identifier is unknown.
	[debug] midcom_helper_datamanager2_type_video::_auto_convert_to_web_type: $this->_original_mimetype: image/png
	[debug] midcom_helper_datamanager2_type_video::_auto_convert_to_web_type: $conversion=
	[info] midcom_helper_datamanager2_type_blobs::delete_attachment: Failed to delete the attachment record: The identifier is unknown.
	[debug] midcom_baseclasses_database_attachment::_create_attachment_location: Created this location: 2/2/222fd4831c20b5376a677a4628668c61

	[debug] midcom_baseclasses_database_attachment::create: Failed to create the record, last Midgard error: Object already exist
	[info] midcom_db_article::create_attachment: Could not create the attachment bild_1.png at the object midcom_db_article 7c20205e099211de87ae0f6eb9e2a467a467: Creation failed.
	[debug] midcom_db_article::create_attachment: Last Midgard error was: Object already exist
	[debug] midcom_db_article::create_attachment: Return code was:
	[info] midcom_helper_datamanager2_type_blobs::add_attachment_by_handle: Failed to create attachment record, see above for details.
	[debug] midcom_helper_datamanager2_type_blobs::add_attachment: Failed to create attachment, see above for details.
	[error] midcom_helper_datamanager2_type_video::_set_image: Failed to process the conversion batch 2 (derived images) for the uploaded file bild_1.png in /tmp/php8F7zSK, aborting type processing.

	[info] midcom_helper_datamanager2_widget_video::on_submit: Failed to process image video.

	[debug] midcom_application::relocate: Relocating to 1236263562/

03/05/09 16:03:27 changed by flack

  • priority changed from major to critical.
  • summary changed from DM2: File upload randomly fails to DM2: Uploading more than one file fails.

changed title and priority since this happens to me reproducibly every time I try to upload more than one file

03/05/09 22:09:07 changed by flack

See also #925

(follow-up: ↓ 5 ) 03/07/09 00:38:20 changed by flack

See also #935

(in reply to: ↑ 4 ) 03/07/09 00:39:03 changed by flack

Replying to flack:

See also #935

that should read #934

03/07/09 00:43:45 changed by flack

After updating to r20908 and also recompiling Midgard to the latest revision, this seems to work now, at least I was able to upload two files simultaneously in a quick test. Will try again with real data and see how that goes

03/11/09 17:25:32 changed by flack

Further testing revealed that this still happens quite often. Maye it has something to do with the file size: When uploading a larger file (like 40MB video) and a smaller file (like 300kb image) at the same time, one of the two is usually dropped (independet of the selected DM2 widget)

03/12/09 12:31:04 changed by flack

  • keywords set to fileupload.

03/12/09 19:18:33 changed by bergie

  • milestone changed from 8.09.4 Ragnaroek to 8.09.5 Ragnaroek.

04/29/09 11:04:57 changed by bergie

  • milestone changed from 8.09.5 Ragnaroek to 8.09.6 Ragnaroek.

06/11/09 17:38:57 changed by flack

  • status changed from new to closed.
  • resolution set to fixed.

Cannot reproduce any longer with current SVN, so marking as fixed