Closed amityweb closed 4 years ago
Currently only the "content" will be copied. The slug and the title is not a part of this in the Craft data model. When you first create an entry this data gets propagated automatically by Craft to all languages that's why you got the English titles in the Mexican and Columbian sites.
We'll evaluate this and add this as an option to keep the backwards compatibility.
Can you give any indication what is needed because when I copy a page I would expect it to copy the whole page not some. I am not sure what reasoning there would be for an entry to have its title and slug in another language, it would be a bit of a pain to have to manually update these after copying entries. Thanks a lot.
It probably won't be a biggie. We'll try to implement this this week. Is this okay for you?
If you need it earlier and want to fork it for the time being, you should add it to the `src/jobs/SyncElementContent.php`` On line https://github.com/Goldinteractive/craft3-sitecopy/blob/baad4257355bf8b83d1d044754a93133f3a62a14/src/jobs/SyncElementContent.php#L68 the field data will be set.
In the line before or after you should be able to set the title and slug to the element.
Hope this helps!
Thats great, thanks a lot
The change was just implemented in the new release https://github.com/Goldinteractive/craft3-sitecopy/releases/tag/0.5.0
Our default US site is English We then copied a page from English to Spanish, and changed all content including the title and slugs. Then we copied from Spanish to Mexican and Columbian. But the Mexican and Columbian sites titles and slugs were in English. The content was in Spanish though.
Is this a bug? I would expect the title and slug to be copied from the page we are copying, not a different or default site.
Thanks