joas8211 / payload-tenancy

Multi-tenancy plugin for Payload CMS
MIT License
122 stars 6 forks source link

2.0: Globals can't be localized #28

Open jackadair opened 8 months ago

jackadair commented 8 months ago

Steps to reproduce:

  1. Create a basic global
    
    import { GlobalConfig } from "payload/types";

export const Global: GlobalConfig = { slug: "Test", label: "Test", fields: [ { name: "name", type: "text", localized: true, } ] }


2. Have localization enabled with more than one locale
3. Save global entry in one locale
4. Switch locales, type to change field
5. Switch back to the original locale and you will see that it is overwritten

I am able to get the desired behaviour when I disable the tenancy plugin, for this issue I'm using my blank payload template (not my working project). This only appears to be happening on globals and not collections.

Demo:

https://github.com/joas8211/payload-tenancy/assets/54963231/709fec27-7a50-4a09-85d1-199bb120dce0