Irreversible error when trying to upload image (too big) in a clone In all of my node types I have several image fields. If I delete one image and then uploads a new one and then repeats this for a second and third image field, all works as expected.

BUT if I do this same thing in a clone of the node, WITHOUT saving the new node first, I get this message: 


  Irreversible error, Uploaded file probably exceeds the maximum file
  size limit (2 mb), supported by this server


(something like that, translated from my language), directly when I hit the delete button for the second image. Before I even try to upload this second image.

The workaround for the time being is to save the clone first and then delete the old images and upload the new ones.

But what is this? I have never seen this behaviour before. My Drupal version is 7.52 and I use the Node clone module, version 7.x-1.0, together with the Node clone tab module, version 7.x-1.1.
What module are you using to clone a node? I recommend the Replicate module A workaround on your case now would be to alter the replicate functionality for the replication of image fields. You can clear the images field in code or copy the files yourself.

Here is an example for the replicate module to copy the images so your nodes don't use the same images because then you have unwanted behaviour on delete of one of the nodes (deletes the images):

/*
 * Implements hook_replicate_field_FIELD_TYPE().
 */
function replicate_custom_replicate_field_image(&amp;$replica, $entity_type, $field_name) {
   // List of affected fields.
   $fields_list = array(
     'field_xxxx' =&gt; 'contenttype1',
     'field_xxxxx' =&gt; 'contenttype2',
     'field_xxxxxx' =&gt; 'contenttype3',
     'field_xxxxxxx' =&gt; 'contenttype4',
     'field_xxxxxxxx' =&gt; 'contenttype5',
   );

   if (in_array($field_name,  array_keys($fields_list))) {
     // Fetch field instance info.
     $field_instance = field_info_instance($entity_type, $field_name,           $fields_list[$field_name]);
     // Build destination path.
     $destination_path = 'public://' . $field_instance['settings']['file_directory'];
     foreach ($replica-&gt;{$field_name} as $language =&gt; $field) {
       foreach ($field as $key =&gt; $value) {
         // Fid can't be empty.
         if (!empty($value['fid'])) {
           $new_file = file_copy((object) $value, $destination_path);
           $replica-&gt;{$field_name}[$language][$key] = (array) $new_file;
         }
       }
     }
   }
 }