enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

Content lib doesn't support new format of x-data when creating content #6534

Closed alansemenov closed 5 years ago

alansemenov commented 6 years ago
  var contentLib = require('/lib/xp/content');
  contentLib.create({
    name: 'mycontent',
    data: {},
    x: {
        "com-enonic-app-features": {
            "menu-item": {
                "menuItem": true
            }
        }
    }

When x-data is passed as a part of content object when creating a content via create method of the content lib, the operation will fail with an exception:

ERROR c.e.x.p.i.e.ExceptionRendererImpl - Mixin not found [com.enonic.app.features:menu-item] com.enonic.xp.web.WebException: Mixin not found [com.enonic.app.features:menu-item]

Can be easily reproduced with JS Libraries/Content helper in app-features.

GlennRicaud commented 6 years ago

@alansemenov: Not sure if this was a support ticket, but since it is a library fix also, tell them they will have to rebuild their application with the 6.15.3 libraries also