4

I accidently created two channels ( news & press-releases ). They share the same custom-fields - how do I merge them ( news into press-releases ) ?

Tried this ( 23 being the id of press-releases and news is 1 )

UPDATE exp_channel_data SET exp_channel_data.channel_id=23 WHERE exp_channel_data.channel_id=1

But my News-entries are is still showing up under the edit news in the control panel.

Any ideas ? ( hope I don't have to do it manually :) )

2 Answers 2

7

If the item uses the same field_group, you can generally switch channels via the edit menu.

Go to the 'Edit' Menu, Select the Entry, while in the Entry, Select the Options Tab. The choice of channels you can move the item to is listed. See image.

edit_menu_option

Additionally, if you were going to do it via query, you need to update multiple database tables: exp_channel_titles and exp_channel_data being the two primary. Based on your query, the titles are still the old channel and the data is now associated with the new channel.

3

You have to update the exp_channel_titles table too.

2
  • So just run these 2 queries UPDATE exp_channel_data SET exp_channel_data.channel_id=X WHERE exp_channel_data.channel_id=Y UPDATE exp_channel_titles SET exp_channel_titles.channel_id=X WHERE exp_channel_titles.channel_id=Y
    – Paul Frost
    Commented Feb 18, 2013 at 16:32
  • Apologies for the above, I forget that hitting enter submits the comment, and then ran out of time to edit it whilst I tried to find out how to format code. I hate this comment system. I'm not a Markdown user.
    – Paul Frost
    Commented Feb 18, 2013 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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