Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Ability to move entries between Sections, and categories between Category Groups. #946

Closed
angrybrad opened this issue Jan 31, 2017 · 3 comments
Labels
enhancement improvements to existing features

Comments

@angrybrad
Copy link
Member

Created by: Julian Kovalsky (julzmon@gmail.com) 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.

@angrybrad
Copy link
Member Author

Posted by Brandon Kelly (brandon@pixelandtonic.com) on 2015/03/06 03:54:45 +0000


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!)

@brandonkelly brandonkelly changed the title Ability to move entries between Structures. Ability to move entries between Sections, and categories between Category Groups. Mar 13, 2017
@kristianserrano
Copy link

@angrybrad do you happen to have a similar script for moving categories between groups in Craft 3?

@brandonkelly brandonkelly added enhancement improvements to existing features and removed feature labels Mar 5, 2019
@snagelia
Copy link

snagelia commented May 3, 2019

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:

  1. 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 |

  2. New sectionId is 58 and typeId is 106.

  3. So I went to entries tables and updated the the sectionId and typeId of entry with id=144. See below the entry in entries table after the change:
    ----------+--------------------------------------+
    | id | sectionId | parentId | typeId | authorId | postDate | expiryDate | deletedWithEntryType | dateCreated | dateUpdated | uid |
    +------+-----------+----------+--------+----------+---------------------+------------+----------------------
    | 144 | 58 | NULL | 106 | 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 |

| 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’t see the updated entry in Craft dashboard at all. Could you please help me understand what did I do wrong or missing here?
Thanks.

@craftcms craftcms locked and limited conversation to collaborators Jun 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement improvements to existing features
Projects
None yet
Development

No branches or pull requests

4 participants