Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Best way to perform upgrade from links2

Quote Reply
Best way to perform upgrade from links2
I have just received the LinksSQL software. I want to keep the same directory structure as is currently running with Links 2. I would like to install it tonight, and keep the downtime of the site to a minimum.

I do have my database ready to go (using setup.cgi).

Should I leave the directory structure on the server, and upload the entire cgi-bin files, then my customized templates, then import the db files? Then build (will this work with all of my built html pages left on the server?)

Or is it best to clean off the server (saving the db files) and start clean?

Thanks,

Chad

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
What I would do is install Links SQL into a separate directory tree BOTH public and private. Once you get the program working at this new location, then edit the Links.pm file to reflect the old public directory, rebuild, and your users probably will not know the difference.



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Pugdog,

2 Questions...

1. Will the *new* build overwrite the *old* html files (when it is set to build in the "public" directory)

2. Can I use my old templates with the new LinksSQL? (I am sure I read the answer to this somewhere, I just don't remember)

Thanks for your reply!

Chad

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
1) Yes...when you set the directory in the Links.pm file to your old Links 2.0 directory, the files will be overwritten.

2) For the most part, yes...if you have defined new tags in the site_html_templates.pl file for Links 2.0, then you will have to re-define them in the HTML_Templates.pm.

Of course...you will need to also use the new template files, like subcategory.html and others.

Regards,

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Ok, I am trying to import my links data. I have used setup.cgi to create the tables. Now in admin.cgi, I use the import function and secify a root. I get the following error:

Aborting, too many errors!

Rows imported: 0
Errors with the following rows:

2: Failed validation. Error:
Title (Can not be left blank)
URL (Can not be left blank)
Add_Date (Can not be left blank)
Mod_Date (Can not be left blank)
CategoryID (Can not be left blank)
Hits (Can not be left blank)
isNew (Can not be left blank)
isChanged (Can not be left blank)
isPopular (Can not be left blank)
Rating (Can not be left blank)
Votes (Can not be left blank)
ReceiveMail (Can not be left blank)
Status (Can not be left blank)

.....This continues...

Any ideas? I figure I have forgotten something.


Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Did you try using the Import.pl script in the setup directory?

If you check the FAQ I set up before, you'll find a bunch of threads on ways to get around that.... it seems to be slightly different for everyone.

But, part of the problem is fields are defined as 'not null' that either don't exist in the old database, or are empty. You have to work around that.



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
You should try using the Import.pl script rather than the import options in the admin.cgi script.

Regards,

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Ok, I executed Import.pl from telnet. It ran through giving me tons of errors:

Error: <ul><li>Rating (Invalid format)</ul>
1259: 1287 Astronaut Training - Mannequin Maddness http://weboflife.arc.nasa.gov
/stellar/Activities/astronaut/Mannequin Madness/MannMadnes.html 13-Jan-2000 Sc
ience/Intermediate_3-5/Earth_Science Mannequin Maddness is one of three related
STELLAR activities in which students imagine they are astronaut trainees and do
"astronaut" performance tests that would help them function even if they became
dizzy or got motion sickness during space flight: jeff moss jeff@alfy.com 78 No
No No 0 Yes
Error: <ul><li>Rating (Invalid format)</ul>
1260: 1288 The Solar System on a Smaller Scale http://rip.physics.unk.edu/Astron
omy/PlanetDistance(2-8).html 13-Jan-2000 Science/Intermediate_3-5/Earth_Science
Through this hands-on activity students explore the distances between the planet
s. jeff moss jeff@alfy.com 234 No No No 0 Yes
Error: <ul><li>Contact_Name (Too long. Max length: 50<li>
Rating (Invalid format)</ul>
1262: 1290 G Forces http://www.tnea.org/pages/tsw/p35.htm 13-Jan-2000 Science/Hi
gh_School_9-12/Earth_Science Science/Intermediate_3-5/Earth_Science|Science/Midd
le_School_6-8/Earth_Science|Science/Primary_K-2/Earth_Science Students will demo
nstrate an understanding of the effects of gravity. jeff moss 18 No No No 0 0


--------------------------------------------

I have no Ideas....



Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Pugdog, I have read the FAQ at postcards.com. No luck.

Thanks for your help tonight.

Chad

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Ok, I guess that even with ALL of the errors, It did import most of the categories, and about half of the links. How can I get the rest? I would post my error.txt but it is almost as big as my entire links.db.

Here is the beginning of the err.txt (produced from telnet> perl Import.pl . err.txt)
In Reply To:
Error: can't find category id for 'Math/High-School 9-12/Geometry'
Error: can't find category id for 'Social Studies/Primary K-12'
Error: can't find category id for 'Technology/Primary K-2'
Error: can't find category id for 'Technology/Intermediate 3-5'
Error: can't find category id for 'Technology/Middle School 6-8'
Error: can't find category id for 'Seaonal Activities'
Error: can't find category id for 'Seaonal Activities'
Error: can't find category id for 'Seaonal Activities'
Error: can't find category id for 'Seaonal Activities'
Error: can't find category id for 'Writing/6 Trait'
Error: can't find category id for 'Writing/6 Trait/Ideas'
Error: <ul><li>Rating (Invalid format)</ul>
1: 20 5 Short Lessons http://artswire.org/kenroar/lessons/early/early7.html 6-Nov-1999 Visual_Arts/Primary_K-2 Need some fun activities for those things laying around the house...toilet paper rolls, film canisters, bottle caps, etc? Here are some lessons for you! jen teach@seqnet.net 343 No No Yes 0 Yes
Error: <ul><li>Rating (Invalid format)</ul>
2: 21 Primary Color Mixing http://artswire.org/kenroar/lessons/early/early8.html 6-Nov-1999 Visual_Arts/Primary_K-2 Introduce young students to the world of mixing paints in a fun and non-messy way! jen teach@seqnet.net 108 No No No 0 Yes
Error: <ul><li>Rating (Invalid format)</ul>
4: 13 SNIPS http://artswire.org/kenroar/lessons/early/early1.html 6-Nov-1999 Visual_Arts/Primary_K-2 Teach children to cut and construct fun pictures. jen teach@seqnet.net 117 No No Yes 0 Yes
Error: <ul><li>Rating (Invalid format)</ul>
5: 14 Morning Pictures http://artswire.org/kenroar/lessons/early/early2.html 6-Nov-1999 Visual_Arts/Primary_K-2 This lesson introduces children to variety in lines. jen teach@seqnet.net 110 No No Yes 0 Yes
Error: <ul><li>Rating (Invalid format)</ul>
6: 15 Fun with Painting http://artswire.org/kenroar/lessons/early/early3.html 6-Nov-1999 Visual_Arts/Primary_K-2 Introduces students to a variety of ways to paint. For instance, wetting the paper and then painting on it. jen teach@seqnet.net 111 No No Yes 0 Yes
Error: <ul><li>Rating (Invalid format)</ul>
It continues with the "rating (invalid format)" for about 1000 links, then ends.



Quote Reply
Re: Best way to perform upgrade from links2 In reply to
Ouch.

I had that problem, and Alex fixed something, or did something that corrected it on my import at least.

It has to do with the way links 2.0 stored the category name in the link, and each link is then mapped to the new category via a hash entry.

You can wait for the next release of links to do a full import (I'm sure this has been fixed with the upgraded tools).

Or, you can try a long work around, that may or may not work.

1) Using mysqlman edit all the fields in the database Links to be "null"

2) Using the Links Admin edit all the field definitions (in the def file) to be Null also. (Not Null --> yes)

3) Do the same for the Category table.

4) Try the Import.pl again.

5) If that doesn't work, import your Category list into the Category table.

6) Try the import again.

7) If that bombs on the category set up, then edit that sub routine in the Import.pl to just read in the categories, create the hash entry, but _not_ insert them into the category table (they are already there).

Good luck!

BTW... you need to leave the ID fields in the TABLE itself as "Not Null"
because they are primary index fields. But, each link and category has an ID so that field won't be a problem.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Best way to perform upgrade from links2 In reply to
pugdog,

Thanks for the reply. I figured that I got off topic (since you guys got me past the first hump), and posted the *new* problem under a new post.

I don't have a whole lot of time, so I will let that one sit today, and see if Alex will post the fix. If not, I will probably just have him fix it.

Thanks again!