Open f-osorio opened 1 year ago
This issue was automatically marked as stale.
This issue still prevents us from customizing user profiles on our platform. Is there anything we can do to help resolve it?
This issue was automatically marked as stale.
This issue was automatically marked as stale.
This issue was automatically marked as stale.
Package version (if known): v.10
Describe the bug
Invenio indexer fails when a user with custom profile belongs to a community. If a user with a custom profile is part of a community, further editing of the profile will cause the following:
ERROR/ForkPoolWorker-3] Task invenio_indexer.tasks.process_bulk_queue[d45d5785-3dea-45f1-9239-81b2f9c39c73] raised unexpected: BulkIndexError('4 document(s) failed to index.', [{'index': {'_index': 'berd-nfdi-communitymembers-members-member-v1.0.0-1681215677', '_id': '889b6c03-2021-4e20-83d7-63eca830dd80', 'status': 400, 'error': {'type': 'strict_dynamic_mapping_exception', 'reason': 'mapping set to strict, dynamic introduction of [...] within [user.profile] is not allowed'}
Steps to Reproduce
/account/settings/profile
Expected behavior
The indexer works without issue.
Additional context
We are adding some custom fields for the user profile. Everything seems to be working great except when the indexer tries to run. It only happens with accounts that belong to a community. If there is no community, there is no problem.
It looks like the schema for users and the schema for community members are at odds. The user schema has the a dynamic profile and the community member does not. At least, this is a best guess about what is happening
There is a test for a custom profile but it only checks that the new field is added.
Everything else seems to be working fine with the expanded profile.