On one of my sites I have created blueprints with multisite:sync.
With some records added I have decided to switch to multisite:true as I didn’t want to have same records on all of my sites.
After this change I have noticed that records are still (partially ?) synced and sometimes multiple relations are created.
Is this change from multisite:sync to multisite:true even supported? Documentation doesn’t mention this.
@daftspunk
I have tested this more and I am not sure if this is a bug or I do not understand how Tailor and Multisite should work together.
- I have created 3 separate Sites and every one has a different language
- I have:
-
- Simple Categories blueprint with
multisite:true
-
- Simple Records blueprint with
multisite:true and with relation to Categories
When I add a new Category (in primary site), 3 records are added to categories tailor table - one for each site.
When I add a new Record (also in primary site) and set the relation to category, 3 records are added to records tailor table - again one for each site.
And what is the most strange behaviour - relation between Record and Category is shown 3 times in Records list.
In tailor relation table (for Record blueprint) there are 3 rows with identical data in all columns (parent_id, relation_id, relation_type).
Am I doing something wrong or is this intended?
–
Hey @jan-vince
In tailor relation table (for Record blueprint) there are 3 rows with identical data in all columns (parent_id, relation_id, relation_type).
This definitely shouldn’t happen. Can I confirm are you on the latest version? Also, what are the step by step instructions from a clean install to arrive here?
Hi @daftspunk,
this is the latest 3.6.8.
I will try to reproduce this on a clean install as this site is almost 6 month live and I do not recall every step.
The only change in blueprints was from sync to true. Now I have set them to multisite: locale and duplication of records stoped.
Strange is that there is no site_id in relation tables (as shown on picture above).
I will dig deeper and let you know.
I have quickly tested it right now:
- Clean web install of OC (3.6.8) with SQLite DB
- Added 2 sites:
-
- Czech - czech locale, own template, URL prefix /cs
-
- English - english locale, own template, URL prefix /en
- Added simple blueprints (item + category) with
multisite:true
Records added to Czech site are duplicated to English site (and I think they shouldn’t be) and categories relations are multiplied exactly as shown on picture in previous post.
PS: Multiplication of categories happens only on create when I check a category. When Item is created without Category and Category is added in update, there is only one relation (as it should be).
@daftspunk I can move this conversation to GitHub issue if you think this is a bug in OC.
My blueprints files:
item.yaml:
uuid: a13be5c6-26f1-46a7-bf7a-02490ec97b22
handle: Reference\Item
type: structure
name: Reference
drafts: false
multisite: true
primaryNavigation:
label: Reference
icon: octo-icon-file
order: 900
navigation:
icon: octo-icon-pencil
order: 100
structure:
maxDepth: 0
showReorder: 1
showSorting: 1
fields:
content:
label: Content
type: richeditor
column: false
categories:
label: Category
type: entries
source: Reference\Category
category.yaml:
uuid: 9fd55c78-3952-4d36-b693-647bb6649322
type: structure
handle: Reference\Category
name: Category
drafts: false
multisite: true
structure:
maxDepth: 1
navigation:
parent: Reference\Item
icon: octo-icon-list-ul
order: 200
fields:
content:
label: Content
type: richeditor
column: false
references:
label: References
source: Reference\Item
type: entries
inverse: categories
column:
label: No of references
relation: references
relationCount: true
type: number
1 Like
Thanks for the detailed issue report. These example blueprints were helpful in locating the issue.
There is a fix coming for this in v3.6.9
1 Like