Bug #23307 Bug Fixed

Unable to save content to fields added to channel after first fields were added

Version: 4.0.0 Reporter: Jeremy Gimbel - Conflux Group

I have created a number of channels and added fields from the Fields tab of the channel/edit screen. These fields works and save fine.

However, when I create a field later and add it to a channel, I’m unable to save any content to the field. I get a success message that the entry has saved and any of the original fields do save correctly, but the new fields do not.

This is a brand new fresh install of 4.0.0 downloaded today.

You must be signed in to comment on a bug report.

  • In system/ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php replace lines 479 - 494 with:

    $query->where($key_column, $this->getId());
    $result = $query->get();
    $query = ee('Model/Datastore')->rawQuery();
    // When a new entity is saved, this will be triggered by an
    // onAfterInsert event (else, we won't have id to link to).
    // The primary key can only be marked dirty on an insert event,
    // not an update.
    if ($result->num_rows())
        $query->where($key_column, $this->getId());
        $values[$key_column] = $this->getId();
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases