Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Import Links into 2.04

Quote Reply
Import Links into 2.04
I'm trying to move some links into the 2.04 version from a text file. I notice I have to include the category and category ID.
" You must also include the Category ID and Category Name of the category the link will be imported to."

I've included the info but keep getting the
'Unable to find Category ID column in header!' error.

I've tried naming the column CategoryID, Category ID, Category_ID, ID, and still get the error.

Help!

Thanks.



Quote Reply
Re: Import Links into 2.04 In reply to
Figured it out myself.

Category.ID, Category.Name

Sorry, tried to delete the message but it wouldn't let me.

RWhite

Quote Reply
Re: Import Links into 2.04 In reply to
Which brings up a question for me...

Is it possible to import using Category.ID _or_ Category.Name?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Import Links into 2.04 In reply to
Hello!

I am trying to import from a text file and I cannot.

How did you make it?

Would be thankful if you could share your experience!

The import/exports are really a big problem.

Quote Reply
Re: Import Links into 2.04 In reply to
rajani:

I import from a text file on a regular basis- a couple of hundred items at a time. The easiest way I have found is this:

Since when I add, I might add 20-50 items to a single category, I added a new field called "CategoryNum". As the name suggests, it is the number of the Category I want the link imported to. I then arrange the data in EXACTLY the same order as in Links. If they are new items, leave ID blank, but make sure there is a field for it. I use pipe "|" as a seperator.

My DB runs mod_perl. Now, for some strange reason, if I import with Mod_Perl active, it crashes... so I comment out the mod_perl startup in httpd and restart. (If someone can solve this problem, I would love that! It is a step I would love to avoid!)

Then, in MySQLMan, I go to links, then Import, put the path in to the text file (checking replace if I am updating data!!!) and let 'er rip!

Finally, if this is new data being inserted, go to sql monitor, and run this:

insert into CatLinks (CategoryID,LinkID)
Select XXXX,ID from Links
where Links.CategoryNum = 'XXXX'

where XXXX is the Category number for each category you are adding to. I would think if you were only adding one or two to each category, it might be easier to just rebyuild tables, and move things when it displays orphaned links (thanks for that addition, Alex!)

Anyway, it is kinda involved, but it works for me!

Dave

Quote Reply
Re: Import Links into 2.04 In reply to
Oh- I did not make this clear...

I added CategoryNum to the table Links (do not want that confused!)

Also, make sure to replace BOTH XXXX's. And ONLY run that if it is new data- that is, data without ID's. Otherwise you will have every link in the category doubled.

Oh, yeah, I just remembered this, too. If there are other links in links with that CategoryNum, it woill double them up, too... so make sure to clear the CategoryNum field for all the links in a category you are adding to, or you will see two of all of them, too!

dave