Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translatable Matrix blocks not propagating across site entries on first save #3082

Closed
angrybrad opened this issue Jul 10, 2018 · 12 comments
Closed
Labels
enhancement improvements to existing features matrix 🕶️ features related to Matrix fields

Comments

@angrybrad
Copy link
Member

Description

If you have a multi-site in Craft 3 and have a translatable, say, rich text field, the content that you set up for Site A will also be there as the starting point for the Site B translation. This means that you don’t need to recreate all your work on Site B, and can instead just translate what is there.

This does not seem to be the case if the Matrix field has "Manage blocks on a per-site basis" checked in its settings, though. It would seem that a user would also want a clone of those matrix block elements to be there on the other Site entries so that they could use those as the starting point for the others sites’ translations.

It also feels weird that fields with Matrix blocks work so differently than other fields (from a user’s perspective).

Steps to reproduce

  1. Create a Site A and Site B.
  2. Create a Matrix field with a Rich Text field and check the "Manage blocks on a per-site basis" checkbox.
  3. Add that Matrix field to a section.
  4. Create an entry in that section on Site A and save the entry.
  5. Go to Site B and notice the content didn't get copied to Site B.

Additional info

  • Craft version: 3.0.15
  • PHP version: 7.1
  • Database driver & version: MySQL
  • Plugins & versions: n/a
@angrybrad angrybrad added the enhancement improvements to existing features label Jul 10, 2018
@angrybrad
Copy link
Member Author

@mildlygeeky ^

@brandonkelly brandonkelly added the matrix 🕶️ features related to Matrix fields label Jul 10, 2018
@mildlygeeky
Copy link
Contributor

Thanks @angrybrad — this feels like a pretty big issue for a multi-site, where basic content fields are seeded across sites, but matrix blocks are not cloned/seeded across the sites. Hoping this could have a fix soon, as we have a client who will be doing content entry on a multi-site and is going to be pretty bummed to see that they (as of now) have to do all of their Matrix work in triplicate.

@narration-sd
Copy link
Contributor

Indeed, must say there's quite a surprise waiting in this.

What I'm working on at the moment is a test multisite, but it's cloned out of a real civic information system design. Which can have multiple cities, and is shot through with Matrix content builders. Actually they began as Neo matrices, which may have the same problem it appears.

Memory may be faulty, but it seems Craft 2 did this content propagation on Matrix dependably, no?

Surely Brad is right in thinking content people would want to have this; it's the basis of content translation.

And I may have another problem of not-yet-found configuration at the moment, but in fact there are no entries present at all when I switch from a present site to another site while editing an entry, being told no entry/page found. When I similarly switch at the index page for such entries, the list is a blank,

I'll take this last part out if I can locate the issue in setup, but this used to be quite straightforward, and should be more so with all the nice Craft 3 Sites changes.

@narration-sd
Copy link
Contributor

narration-sd commented Sep 9, 2018

Ok, and I found the problem which gets you no Entries for a freshly added and set-up Site.

You have to manually save each prior Entry, before you will have it present for the fresh Site.

I can sort of see how you might have arrived at this behavior, but wouldn't something like a popup offering to do the resaves and thus provide the actual fresh Site entries sound a good move?

Then when you have, only the title will be filled in, with no propagation of other fields, underlining @angrybrad Brad's point for the Issue at the beginning here.

@rjgux
Copy link

rjgux commented Oct 8, 2018

@brandonkelly Will this be merged into an upcoming release? An idea of when we can update one our development sites to fix this would be great!

@brandonkelly
Copy link
Member

@rjgux Yep probably tomorrow.

@rjgux
Copy link

rjgux commented Oct 12, 2018

@brandonkelly @angrybrad This is working correctly if we add a new entry in one site, all of the associated matrix blocks are copied over to the other site on first save as expected.

However if I enable a section on a site, all of the entries are being propagated into that section from the main site, but the matrix block content is not being copied across like other fields are. (Craft 3.0.27)

@brandonkelly
Copy link
Member

@rjgux Yeah that’s expected, and pretty sure relational fields would have the same behavior. By the time the entries are getting propagated, the fields aren’t aware that they were just enabled for that new site. To them it just looks like the entry didn’t have any blocks (or relations), perhaps intentionally.

Feel free to submit a new issue, though, and maybe we can come up with something.

@rjgux
Copy link

rjgux commented Oct 12, 2018

@brandonkelly Thanks for the reply. Apologies for the thread on an existing ticket, the issue we have is trying to clone all entries (and matrix block content) from a number of sections on an English site, into a newly created German site (so that there is always content on the German version of the entry, even if it hasn't yet been translated).

Enabling the section for the new German site is propagating all of the entries, now we're just trying to clone the content. Do you have any recommendations or suggestions on how we may do this? I was wondering whether using something like Feed Me might be the answer.

Happy to submit a new issue if required.

@brandonkelly
Copy link
Member

@rjgux Yeah I could see the argument for Craft being able to do it. Just form a technical perspective it’s a different challenge than this issue, so would help if it had its own.

@ghost
Copy link

ghost commented Apr 14, 2019

@rjgux @brandonkelly Did this ever get opened in another issue of it's own and resolved?
Would very much appreciate being guided to that thread.
We're just opening additional sites within a primary site, with language-dependent sub-sites. We have quite a bulk of content to share across these sites, and the Matrix content is not propagating across as was the issue here. Duplicating this material by hand would pretty much mean 30 days of additional work for a 4 person team, and as you can imagine, I very much want to avoid that.

Best,

Andy

@brandonkelly
Copy link
Member

Nope never did. Feel free to open one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features matrix 🕶️ features related to Matrix fields
Projects
None yet
Development

No branches or pull requests

5 participants