2

As per the docs at https://craftcms.com/docs/3.x/extend/element-types.html#saving-custom-field-values When saving values on a custom field, always use the setFieldValue() or setFieldValues() methods rather than directly accessing the field handle as a property on the element object. This ensures the value is normalized and marked as dirty for delta saves. $...


1

I figured it out. You have to create a separate block and it somehow figures out it's a child based on the level you specify. So something like this: [ 'new1' = [ 'modified' => 1, 'type' => 'parentBlock', 'enabled' => 1, 'collapsed' => 0, 'level' => 0, 'fields' => [ 'theme' =&...


1

You should see your commands when using the Craft CLI. First thing to check would be that the module is registered in app.php, both in the modules and bootstrap arrays. Craft's documentation on that is here. I find the best way to quickly validate that your module is registered, is by dumping something out from the module init() function. Craft::dd('...


1

I believe you're looking for this instead. Event::on( Entry::class, Element::EVENT_AFTER_SAVE, static function (ModelEvent $event) { $entry = $event->sender; if ($entry->status === 'disabled' && $entry->propagating && $entry->resaving && ElementHelper::...


Only top voted, non community-wiki answers of a minimum length are eligible