Skip to content

defineMessages throws Uncaught Reference error when used in index.html of cspace#tenant #211

@atsakir

Description

@atsakir

Following the configuration docs I tried the vocabularyConfiguration example like so:

                <script>
                        cspaceUI({
                                basename: '/cspace/core',
                                prettyUrls: true,
                                tenantId: '1',
                                recordTypes: {
                                        collectionobject: {
                                                vocabularies: {
                                                        category: {
                                                                messages: defineMessages({
                                                                        name: {
                                                                                id: 'vocab.collectionobject.category.name',
                                                                                description: 'Toy category',
                                                                                defaultMessage: 'Toy category',
                                                                        },
                                                                        collectionName: {
                                                                                id: 'vocab.collectionobject.subcategory.collectionName',
                                                                                description: 'Toy categories',
                                                                                defaultMessage: 'Toy categories',
                                                                        },
                                                                }),
                                                                serviceConfig: {
                                                                        servicePath: 'urn:cspace:name(category)',
                                                                },
                                                                sortOrder: 0,
                                                        },
                                                },
                                        },
                                },
                        });
                </script>

using the installed cspace@8.0.0.min.js source with the default 7.2.0 collaborationSpace installation.
However ,although I can see that react-intl is included in the compiled source, I get an Undefined Reference for defineMessage.

How can this be resolved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions