<p>Im hesitant to say that this is by design because iam not entirely sure what you mean. Instead i'll explain something i think is comparible that happend to us. We have an entry channel with entries which act as the companies of users on the website. When we saved a company profile in Dutch, fields such as the description or company info would not pull across. We fixed this by listening to the onSaveEntry event and simply pulling the fields across manually. This isnt a very pretty or portable way to do it - but this was an incredibly case and website specific feature - we only wanted entries in this website and even just in this section to have this 'copying' feature. From memory the script looked something like the below: </p>

<p>One word of advise i would issue if of advice i would give is if you are working with other content editors is to listen to the <code>cp.entries.edit.right-pane</code> hook and build a small interface that allows them to select the locale and copy over the current locale to the new locale. The script below has one downside which is that it essentially sterilizes the localization function for craft for the affected entries - which in this projects case was crucial - but in yours probably isnt. </p>

<p>Let me know if anything is unclear. One word of notice - if you are working with a relations field which is what a pdf should be. Relations should be copied over IF you are using something like 'Save as a new entry'. If this isnt happening you've probably found a bug. </p>

<pre><code>craft()-&gt;on('entries.saveEntry', function(Event $event) {
        $entry = $event-&gt;params['entry'];

        // Does the entry section equal our companies section channel? 
        if (craft()-&gt;isLocalized() &amp;&amp; $entry-&gt;sectionId == 2) {

                // What locales are there? 
                foreach (craft()-&gt;i18n-&gt;getSiteLocales() as $locale)
                {
                    // Is this a foreign locale
                    if ($locale != $entry-&gt;locale)
                    {
                        // Get an entry that belongs to this with a sep locale, setup a model and save it. 
                        $otherLocaleEntry = craft()-&gt;elements-&gt;getElementById($entry-&gt;id, ElementType::Entry, $locale-&gt;__toString());
                        if ($otherLocaleEntry)
                        {
                            $otherLocaleEntry-&gt;getContent()-&gt;myFieldsStuff = $entry-&gt;getContent()-&gt;myFieldsStuff;


                            craft()-&gt;entries-&gt;saveEntry($otherLocaleEntry);
                        }
                    }
                }
            }
        }
    });
</code></pre>

CC BY-SA 3.0
2018-03-23T13:43:55.800Z
Thanks for the info.  I am working with relations field and it will copy over the relation for English but does not copy over for any other locale.  I will see if I can use onSaveEntry hook to see if I can catch what we need.
Chris
CC BY-SA 3.0
2018-03-23T20:03:34.170Z
@chris Alright cool, goodluck. If you need any help with modifying the above your welcome to contact me. One word i will say is that you might want to go to the craft cp, go to settings and go to the fields manager. Click the field you are describing - and check if the setting 'This field is translatable' is set to on.  If it isnt its probably worth testing if this is a solution to your problem
Gįëł Tėttëłæår
CC BY-SA 3.0
2018-03-21T20:27:54.590Z
2018-03-21T20:27:54.590Z
Gįëł Tėttëłæår
<p>I have a site with multiple locales.  I have some entries that will have some basic fields such as title, description, etc and also an asset field.  The asset field is translatable so I could have an English PDF and a French PDF for the entry.  We often copy over entries and I have noticed when we do it will copy over the English asset but not the French asset.  Often times some admins are not aware they have to go back and re-add the French asset which is causing issues.</p>

<p>I am wondering if this is by design, a bug or ideally is there any setting or workaround I could do to fix the issue.</p>

<p>I am doing this in the admin panel when editing an entry and clicking on the arrow on save and selecting save as new entry.</p>

<p>Thanks</p>

<assets><localization><admin><assets-field>
Not all assets copied over when copying an entry from admin panel
# Not all assets copied over when copying an entry from admin panel

(Asked by: username_0 on 2018-03-21)

I have a site with multiple locales. I have some entries that will have some basic fields such as title, description, etc and also an asset field. The asset field is translatable so I could have an English PDF and a French PDF for the entry. We often copy over entries and I have noticed when we do it will copy over the English asset but not the French asset. Often times some admins are not aware they have to go back and re-add the French asset which is causing issues.

I am wondering if this is by design, a bug or ideally is there any setting or workaround I could do to fix the issue.

I am doing this in the admin panel when editing an entry and clicking on the arrow on save and selecting save as new entry.

Thanks

**Tags:** assets, localization, admin, assets-field


---

## 1 answers

### Answer by username_1 on 2018-03-21. Score: 1 | Accepted answer

Im hesitant to say that this is by design because iam not entirely sure what you mean. Instead i'll explain something i think is comparible that happend to us. We have an entry channel with entries which act as the companies of users on the website. When we saved a company profile in Dutch, fields such as the description or company info would not pull across. We fixed this by listening to the onSaveEntry event and simply pulling the fields across manually. This isnt a very pretty or portable way to do it - but this was an incredibly case and website specific feature - we only wanted entries in this website and even just in this section to have this 'copying' feature. From memory the script looked something like the below: 
One word of advise i would issue if of advice i would give is if you are working with other content editors is to listen to the cp.entries.edit.right-pane hook and build a small interface that allows them to select the locale and copy over the current locale to the new locale. The script below has one downside which is that it essentially sterilizes the localization function for craft for the affected entries - which in this projects case was crucial - but in yours probably isnt. 
Let me know if anything is unclear. One word of notice - if you are working with a relations field which is what a pdf should be. Relations should be copied over IF you are using something like 'Save as a new entry'. If this isnt happening you've probably found a bug. 
craft()->on('entries.saveEntry', function(Event $event) {
        $entry = $event->params['entry'];

        // Does the entry section equal our companies section channel? 
        if (craft()->isLocalized() && $entry->sectionId == 2) {

                // What locales are there? 
                foreach (craft()->i18n->getSiteLocales() as $locale)
                {
                    // Is this a foreign locale
                    if ($locale != $entry->locale)
                    {
                        // Get an entry that belongs to this with a sep locale, setup a model and save it. 
                        $otherLocaleEntry = craft()->elements->getElementById($entry->id, ElementType::Entry, $locale->__toString());
                        if ($otherLocaleEntry)
                        {
                            $otherLocaleEntry->getContent()->myFieldsStuff = $entry->getContent()->myFieldsStuff;


                            craft()->entries->saveEntry($otherLocaleEntry);
                        }
                    }
                }
            }
        }
    });

> **Comments:**
> **username_0**: Thanks for the info.  I am working with relations field and it will copy over the relation for English but does not copy over for any other locale.  I will see if I can use onSaveEntry hook to see if I can catch what we need.  
> **username_1**: @chris Alright cool, goodluck. If you need any help with modifying the above your welcome to contact me. One word i will say is that you might want to go to the craft cp, go to settings and go to the fields manager. Click the field you are describing - and check if the setting 'This field is translatable' is set to on.  If it isnt its probably worth testing if this is a solution to your problem  

---

