Programically update node when visited by 'editor' role
I have replaced these 3 lines 

            $node_data = node_load($node-&gt;nid);
            $node_data-&gt;promote = '1';
            node_save($node_data);


with

            db_update('node')
                    -&gt;fields(array(
                        'promote' =&gt; '1',
                    ))
                    -&gt;condition('nid', $node-&gt;nid)
                    -&gt;execute();
            db_update('node_revision')
                    -&gt;fields(array(
                        'promote' =&gt; '1',
                    ))
                    -&gt;condition('nid', $node-&gt;nid)
                    -&gt;execute();
            db_query('DELETE FROM cache_entity_node WHERE cache_entity_node.cid = :nid', array ( ':nid' =&gt; $node-&gt;nid));


and it seems working :)