Created by: Julian Kovalsky ([email protected]) on 2015/03/19 18:25:13 +0000
Votes at time of UserVoice import: 8
A number of times I have ran into having to move an entry to different Structure and not being able to without manually editing the database or copy pasting.
Here's some PHP code that can make it easier, in lieu of built-in support for moving entries between sections: http://craftcms.stackexchange.com/questions/4433/move-entry-from-one-structure-to-another-with-parenting/4467#4467
(We do hope to make it possible from the UI at some point though!)
@angrybrad do you happen to have a similar script for moving categories between groups in Craft 3?
Hello,
I am trying to move channel entries from one section to another in Craft3 multisite by directly updating the DB table and it is not working. Please help me what I am doing wrong. Below are the details of my steps:
I am in process of implementing Craft3 multi-site for our existing website in Craft3. To avoid recreating entries for the new sections, I am thinking to move entries from old section to new sections. I have both channel and structure type sections. First, I am trying to move channel entries from old sections to new by editing the MySQL db as per the recommendation is this blog: https://craftcms.stackexchange.com/questions/2021/move-entries-between-sections . So far I have just updated one entry but the entry is not showing in the new section. Below is little more details of what I did:
Old sectionId is 10 and old typeId is 13. Below is the entry before the change in the entries table:
+-----+-----------+----------+--------+----------+---------------------+------------+----------------------+-
| id | sectionId | parentId | typeId | authorId | postDate | expiryDate | deletedWithEntryType | dateCreated | dateUpdated | uid |
+-----+-----------+----------+--------+----------+---------------------+------------+----------------------
| 144 | 10 | NULL | 13 | 1 | 2017-11-27 14:33:00 | NULL | NULL | 2017-11-27 14:33:04 | 2018-12-07 14:55:57 | fefe3db7-ab34-4796-9898-0ac0b0bf2fd8 |
New sectionId is 58 and typeId is 106.
| 2686 | 58 | NULL | 106 | 31 | 2019-04-01 16:38:00 | NULL | NULL | 2019-04-01 16:38:48 | 2019-04-30 13:32:34 | b66e6381-221c-4733-8794-80f3fe5afc4c |
| 2687 | 58 | NULL | 106 | 31 | 2019-04-30 13:47:00 | NULL | NULL | 2019-04-30 13:47:55 | 2019-04-30 13:47:55 | 4d1f5999-84ea-46a9-99b3-5c5fe2691f56 |
+------
Problem is I don鈥檛 see the updated entry in Craft dashboard at all. Could you please help me understand what did I do wrong or missing here?
Thanks.
Most helpful comment
@angrybrad do you happen to have a similar script for moving categories between groups in Craft 3?