Hi,
In order to have my own edit form of a CCK node (with imagefield), I registered in my template.php file a template called "node-product-edit". In node-product-edit.tpl.php file, I do only the following:

print drupal_render($form['title']);
	print drupal_render($form['body_field']); 
	print drupal_render($form['field_picture']);

Now, when I go to node/add/product, I see my form, everything seems fine except that when I upload the file, I get this error:

An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (2 MB) that this server supports.

My file is only 20K, it's not the problem. Moreover, the file actually gets uploaded (it is in sites\default\files directory) but new content is not created (nothing written in the node table).
Any hint will be greatly appreciated.

Comments

markus_petrux’s picture

Status: Active » Fixed

If that's all you're rendering about the form, then the basic stuff is missing. After rendering parts where you wish, you probably need to do the following to render the rest of the form.

print drupal_render($form);

Also, make sure the HTML generated is correct. I mean, you should see the form HTML element somewhere in the page, check that all those hidden elements in node forms, such as form_id, token, etc. are there, nothing else is missing, all opened tags are closed, etc.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

phpberlin’s picture

hey

i get the same error

An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (254 MB) that this server supports.

iam using cck fiel field and image.
drupal 6

this occour even uploading very small images (9kb)

max_ values in the php.ini are increased like the
maximum file size shown in the error msg

and i use firefox 3.6 on windows vists and ubuntu

thanx for any suggestions
stef

karens’s picture

This is a closed issue. Your problem is related to filefield not cck. If you have a problem with filefield, file an issue on the filefield issue queue.

KaterinaMR’s picture

I have the problem resolved after removal of the module subdomain (http://drupal.org/project/subdomain)