How to save a global set’s content? I’m trying to set data within a global set. I’ve tried the following without success:

$globalSetHandle = 'settings';
$globalSet = craft()-&gt;globals-&gt;getSetByHandle($globalSetHandle);

$globalSet-&gt;fieldHandle = 'value';

craft()-&gt;globals-&gt;saveContent(GlobalSetModel $globalSet);
Try using setContentFromPost, as mentioned in this answer from Brandon.

$content = array(
    'fieldHandle' =&gt; 'value',
);

$globalSet-&gt;setContentFromPost($content);
craft()-&gt;globals-&gt;saveContent($globalSet);