File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -391,15 +391,18 @@ public function updateConfig($stateRequest)
391391 $ fields = [];
392392 $ stateRequest = json_decode ($ stateRequest , true );
393393 $ fieldsRequest = array_filter ($ stateRequest , function ($ field ) {
394- return isset ($ field ['type ' ]);
394+ return isset ($ field ['type ' ]) && $ field [ ' type ' ] !== ' title ' ;
395395 });
396396
397397 foreach ($ fieldsRequest as $ key => $ field ) {
398398 $ obj = (new FieldCore ($ field ))->setAttribute ('new_value ' , $ field ['value ' ]);
399399 $ fields [$ key ] = $ obj ;
400400 }
401401 $ this ->setConfigFields ($ fields );
402- $ this ->config = $ this ->generateJsonConfig ();
402+ $ existingConfig = json_decode ($ this ->config , true );
403+ $ newConfig = json_decode ($ this ->generateJsonConfig (), true );
404+ $ mergedConfig = array_merge ($ existingConfig , $ newConfig );
405+ $ this ->config = json_encode ($ mergedConfig );
403406 $ template_name = pSQL ($ stateRequest ['templateSelected ' ]);
404407 $ this ->setCurrentTemplate ($ template_name );
405408 $ this ->setDefaultParams ($ stateRequest ['default ' ]);
You can’t perform that action at this time.
0 commit comments