-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the Bug
It seems this bug has been closed by mistake #14801.
Adding the indexes, as suggested by you, is not enough for making it work, as the slug is still set to unique in database, so it still fails.
Dropping the index directly from the database is also not enough, as you can't use it along with the ensureIndexes option set to true, and also is not persistent as you can't deploy multiple instances of the code without making changes to the database.
Please re-consider this bug and possible fixes, such as being able to set unique to false when calling slugField() (so we can manually add the compound index), before the final fix that should be making it fully compatible with multi-tenant scenarios by default.
The referenced issue has more details of the line where the slug field is set to unique.
Link to the code that reproduces this issue
Reproduction Steps
- Install/configure multi tenancy plugin
- Create a collection with a slug field
- Create 2 different tenants
- Try to use the same slug for both tenants
Which area(s) are affected?
plugin: multi-tenant
Environment Info
Not relevant