Solved

K2 Items to Joomla Articles

Posted on 2013-05-28
5
2,355 Views
Last Modified: 2013-05-30
Hi!

I'm building a client a new website. The old site used K2 for certain content. On the new instance, I'm making a clean break from K2, but I have about 300 k2_items records I'd like to migrate back to Joomla articles. I read an article that showed the following syntax to do what I'm after, but I keep getting syntax errors around the fulltext, both with and without single quotes. Can anyone tell me what is wrong with this query?

insert into srp_final.jos_content (title, alias, introtext, fulltext, state, sectionid, catid, created_by, metakey, metadesc, ordering) select title, alias, introtext, fulltext, 'published', '17', catid, '841', metakey, metadesc, ordering from selene2_srporg.jos_k2_items

Please note these are two separate databases, but they're on the same machine and MySQL instance. Any suggestions? Or does anyone know a clean way to accomplish this?

Thank you.

Bill
0
Comment
Question by:billium99
  • 3
  • 2
5 Comments
 
LVL 1

Author Comment

by:billium99
ID: 39202568
BTW - the 17 is my new article category and the 841 is the new user ID for the created_by value.

Thanks
0
 
LVL 12

Expert Comment

by:duttcom
ID: 39203159
You could try the code you already have to convert the K2 items in your old database to Joomla articles in the same database, to eliminate any potential problems caused by copying from elsewhere, and then export the newly created Joomla articles as an SQL file. Then you only need to do a search and replace on the SQL file in a text editor and replace the old table names with the new ones. Then you can run the SQL file in the new database to bring in the articles.

There is also a reasonably priced commercial solution to this problem - http://www.cms2cms.com/supported-cms/joomla-k2-to-joomla-migration
0
 
LVL 1

Author Comment

by:billium99
ID: 39204324
Hello - first I'm asking what is wrong with the syntax of my SQL query. I'm not getting a syntax error on database names. I'm getting a syntax error on "fulltext". Why? Does anyone see a problem with my SQL query? Here it is again.

insert into srp_final.jos_content (title, alias, introtext, fulltext, state, sectionid, catid, created_by, metakey, metadesc, ordering) select title, alias, introtext, fulltext, 'published', '17', catid, '841', metakey, metadesc, ordering from selene2_srporg.jos_k2_items

Thanks

Bill
0
 
LVL 12

Accepted Solution

by:
duttcom earned 500 total points
ID: 39206363
Hi Bill, I think the problem may not be the fulltext field, but the published one in your select statement. The single quotes are trying to insert the word published into the state field, which is expecting an integer.

Try removing the single quotes from the published field name in the select query.
0
 
LVL 1

Author Closing Comment

by:billium99
ID: 39209497
Thanks for the help!
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to use that sweet jQuery gallery plugin on your Joomla site but couldn't get it working due to jQuery conflicts or your lack of knowledge about what's under the Joomla hood? This article will step you through the process of impl…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now