page-blocks icon indicating copy to clipboard operation
page-blocks copied to clipboard

FIX: CMS fields issue

Open a2nt opened this issue 8 years ago • 3 comments

This function won't work in case CMS was modified or in case extension extends an object: $fields->addFieldsToTab('Root.Main', array( $gridField ), 'Metadata');

a2nt avatar Aug 28 '17 12:08 a2nt

The extension was specifically designed to be added to Pages, not DataObjects (I don't think the publish page & blocks action is going with DataObjects…).

If you modify the fields, make sure your code modifies the fields before the extension applies its logic. You'll only run into problems when you remove the Metadata field before the extension is applied.

bummzack avatar Aug 28 '17 12:08 bummzack

why won't work I think will work ok with versioned DataObjects?

a2nt avatar Aug 28 '17 12:08 a2nt

Have you tried it? The PublishAllExtension that is being used for the "Publish Page & Blocks" action doesn't consider versioned DataObjects at the moment.

You can easily add page-blocks to your dataobject, but you should do so manually or with another extension, not by using the PageBlocks extension. Just use the GridFieldConfig_BlockEditor config and create a GridField with it…

bummzack avatar Aug 28 '17 12:08 bummzack