I'm not able to create or edit pages in Magento 2.2.0.

Magento 2 Data key is missing code-entity

2 Answers 2


Well this is a notable bug in Magento 2.2.0

This issue arises when you have enabled Google Analytics settings from store configuration and specify the option Enable Content Experiments you will find the same issue.

You can check the same settings and if it enabled you can disable it.

Also, you can look into the fix that has been committed in git source

in vendor/magento/module-google-optimizer/view/adminhtml/ui_component/cms_page_form.xml

Replace this code

<htmlContent name="html_content">
    <block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage">
            <argument name="code-entity" xsi:type="string">Magento\GoogleOptimizer\Block\Adminhtml\Cms\Page\EntityCmsPage</argument>
            <argument name="form-name" xsi:type="string">cms_page_form</argument>

It's a bug in your version, try to update or disable the Enable Content Experiments options.

Enable Content Experiments

Not the answer you're looking for? Browse other questions tagged or ask your own question.