CMS MADE SIMPLE FORGE

CGContentUtils

 

[#11186] Saved value not loaded into contentblocks textinput en textarea

avatar
Created By: Freud (Freud)
Date Submitted: Fri Oct 14 03:55:02 -0400 2016

Assigned To: Robert Campbell (calguy1000)
Version: 2.1.5
CMSMS Version: 2.1.5
Severity: Major
Resolution: None
State: Open
Summary:
Saved value not loaded into contentblocks textinput en textarea
Detailed Description:
I have several types of CGContentUtils-blocks in a pagetemplate.
After editing a page, adding values/content to the blocks and saving the page, I
reopen the page.
All saved values/content are show except for the contentblocks of the type
textinput and textarea.

I figured out that something is wrong with the $adding-var in the function
GetContentBlockFieldInput (line 429 in CGContentUtils.module.php).
The line
$adding = ($adding || ($content_obj->Id() < 1)) ? TRUE : FALSE;
always results in $adding = true and then the default value/content is loaded,
not the saved value/content.

Changing the line to
$adding = ($content_obj->Id() < 1) ? TRUE : FALSE;
was a solution for me.


History