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.
In system/ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php
replace lines 479 - 494 with:
$query->where($key_column, $this->getId());
$query->from($field->getTableName());
$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->set($values);
$query->where($key_column, $this->getId());
$query->update($field->getTableName());
}
else
{
$values[$key_column] = $this->getId();
$query->set($values);
$query->insert($field->getTableName());
}
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```