EEConf 2024 is around the corner! EEConf 2024
EE Core Version: 2.7.0
I have a channel group where if I add a File Field then upload a pdf, it just reloads the channel entry page instead of saving. There are no error messages. Channel field is not updated in the database. Also, this seems to add random empty p tags to the RTE in the channel entry too.
The channel group has 2 fields - a RTE field and a File field with All file types allowed.
As soon as I delete the File field from the channel group, the channel entries page goes back to saving properly.
Cheers,
This appears to be a Core only problem - have reproduced on a fresh Core install with no modifications.
Steps to reproduce:
The page just reloads the channel entry page instead of going to the confirmed page.
Thanks, DigitalDoctors. It seems the dev preview build was missing a couple commits, strange quirk with Git that we noticed with commits closely-grouped together in time. If you make these modifications, it should be fixed:
Open system/expressionengine/libraries/File_field.php, find this code on line 265:
$filename = '';
And REPLACE it with this:
$filename = $_POST[$field_name] = '';
Open system/expressionengine/libraries/api/Api_channel_entries.php, find this code on line 1006:
unset($data['field_id_'.$row['field_id'].'_hidden']);
And DELETE it.
Then add these two unsets below that “if ($this->autosave” statement above the existing unset so it looks like this:
}
unset($data['field_id_'.$row['field_id'].'_hidden_file']);
unset($data['field_id_'.$row['field_id'].'_hidden_dir']);
unset($data['field_id_'.$row['field_id'].'_directory']);
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.