We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Strange error from Channel Entry API: Submit New Entry

Development and Programming

RED When Excited's avatar
RED When Excited
6 posts
15 years ago
RED When Excited's avatar RED When Excited

We are getting a strange error when submitting a new entry via submit_new_entry. While the new data is being checked (_check_for_data_errors) to make sure all required fields are present, essentially ExpressionEngine runs a database query to get all the fields, and if it’s required but no data is available, reports missing field value and the name label for the field

if ($row['field_required'] == 'y')
                {
                    if ($row['field_type'] == "file" AND isset($data['field_id_'.$row['field_id'].'_hidden']) AND $data['field_id_'.$row['field_id'].'_hidden'] == '')
                    {
                        $this->_set_error('custom_field_empty', $row['field_label']);
                        continue;
                    }

                    if (isset($data['field_id_'.$row['field_id']]) AND $data['field_id_'.$row['field_id']] == '')
                    {
                        $this->_set_error('custom_field_empty', $row['field_label']);
                        continue;
                    }
                }

Obviously SOMETHING is missing as we get these errors BUT the field_label is blank. In addition, as far as we can see the data is there. It feels like something strange is coming back from the query, but so many people use this I can’t believe it’s our own defect. The real kicker… we have 2 reports of this using iExpression out of 100’s of sites using the module. One using 2.1 and one using 2.1.1 both using completely standard field types (i.e. no 3rd party extensions).

Any ideas or clues?

Alan

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.