1

I have a site made in English and need to add another locale that will be almost identical to the original site. However while adding new locales everything bar the asset entries are being copied. This is a problem as there are already many articles with image asset fields and new articles are not copying assets across locales either.

I have tried making the asset field Translatable and Not Translatable. These fields are not in a matrix.

UPDATE: Solved - What was needed was to use the Update Asset Indexes tool in the settings of craft. If I do this just after creating a new Locale, before doing anything else, when my articles are created they know where to look for their assets. So relieved

  • as stated in my question, I had tried the suggestion laid out in the proposed duplicate and noted that my problem was not with a matrix but a normal asset field – Paul Mckenna Jan 13 '17 at 18:14
  • "new articles are not copying assets across locales either." – you have an assets field which is not set to be translatable and the assets selected are different between locales? I can hardly believe that tbh… – carlcs Jan 13 '17 at 18:45
  • I know right? It was working on my local version of the site but when I tried it on live it's still not working. I've tried every permutation I can think of. think it must be a bug – Paul Mckenna Jan 14 '17 at 9:41
  • 1
    Looks like you found a solution, @PaulMckenna. Would you mind adding that as an official answer instead of an edit to your original question? – Brad Bell Jan 15 '17 at 4:38
2

Solved - What was needed was to use the Update Asset Indexes tool in the settings of craft. If I do this just after creating a new Locale, before doing anything else, when my articles are created they know where to look for their assets. So relieved

Also noticed that to get a matrix to copy across locales (as well as setting the matrix field to NOT TRANSLATABLE and the fields within the matrix to TRANSLATABLE) it was necessary to do a slight change to the original matrix after creating a new asset (such as adding a space after the title). This forced the matrix to copy across.

Hope this helps someone else

| improve this answer | |
1

If the Asset field is set up to be not translatable, the selected assets should actually be the same across all of your locales.

If it is set up to be translatable, it doesn’t copy over the selection on the first save (or when a new locale was added) because of a Craft bug. See this question for more info: How do I get Matrix elements to copy their content across language Locales?

| improve this answer | |
  • Hi carlcs, thanks for responding! I have tried setting new locales with the fields set to not translatable as well as trying with the fields set to translatable (after seeing the question you linked). This still is not working, very strange – Paul Mckenna Jan 13 '17 at 17:00
  • See original post for solution to this particular problem, although everything carlcs said was right, I also needed to update my asset indexes directly after adding a locale. – Paul Mckenna Jan 14 '17 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.