Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Import problem

Quote Reply
Import problem
Hi:

I am having a problem getting my import to work (in the Links SQL 1 => 2 version)

Here is the error:

In Reply To:

CRITICAL ERROR OCCURED: Custom destination column `Links.ReceiveMail' has no equivelant import column. It will contain the default values for the column

CRITICAL ERROR OCCURED: Custom destination column `Links.ReceiveMail' has no equivelant import column. It will contain the default values for the column at import.cgi line 158
main::critical('Custom destination column `Links.ReceiveMail\' has no equivelant...') called at import.cgi line 148
main::warning('Custom destination column `Links.ReceiveMail\' has no equivelant...') called at import.cgi line 325
main::import_S1S2('HASH(0x82e427c)') called at import.cgi line 169
main::do_import('HASH(0x82e427c)') called at import.cgi line 138
main::main() called at import.cgi line 54
Database handle destroyed without explicit disconnect.
OK, I have a number of "custom fields", and when I built up SQL.pm, I made sure to have the same fields, with the same EXACT names and properties...

Besides, this field (ReceiveMail) is standard in both databases, isn't it?

Perplexed...

Dave

Quote Reply
Re: Import problem In reply to
Hi:

I have something else that may have a bearing on this... I DID use a prefix for the new tables. As, for the testing, I am running 1.13 and the alpha in the same database, I used the prefix "new_" for the alpha tests... yet the error shows the title of the table as just "Links" (as opposed to "new_Links"...)

Does this matter?



Quote Reply
Re: Import problem In reply to
OK, More info...

I have tried an SQL Dump, and then try to import (it is a 100 meg file!)... I used MySQLMan to make the dump.

When I use import.cgi for delimited import, my browser advances to a completely white page with this html:

In Reply To:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-7"></HEAD>
<BODY><XMP></XMP></BODY></HTML>
and no import happens at all...

I started importing category

dave

Quote Reply
Re: Import problem In reply to
Dave,

The problem here is that ReceiveMail is no longer a column of the Links table, it has moved to the Users table. The warning is generated because you have ReceiveMail has a non-standard table in the new Links SQL, but it is standard in the old Links SQL.

The script checks for any non-standard tables in the new database which are not in the old one, and it comes across "ReceiveMail", which is not standard, and so it looks at the old Links SQL's fields to see if a non standard field named "ReceiveMail" exists. Since ReceiveMail is standard, the check fails, generates a warning, and since you have critical warnings enabled, it becomes a critical error.

Simply dropping the ReceiveMail field from the new Links SQL table should correct the warning.



Jason Rhinelander
Gossamer Threads
Quote Reply
Re: Import problem In reply to
Jason:

Thanks so much for your VERY PROMPT reply... I appreciate it!

Yes, that worked, to a point. I did get SOME data imported.... that is all records, but only some of the data. I got this error now...

In Reply To:
WARNING: Custom import column `Links.Characters' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Music' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Awards' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Prod_Num' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Producer' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Voice' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Editor' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Studio' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Format' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Animator' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Director' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Writer' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Running_Time' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Production_Notes' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Characters' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Music' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Awards' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Prod_Num' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Producer' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Voice' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Editor' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Studio' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Format' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Animator' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Director' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Writer' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Running_Time' has no destination equivelant. It will be ignored

WARNING: Custom import column `Validate.Production_Notes' has no destination equivelant. It will be ignored

Import has been completed!
So all those "custom" fields (which are "chocked full o'data!") are now empty.

What should I do to get that data ALSO imported???

Dave

Quote Reply
Re: Import problem In reply to
Dave,

This error is happening because the following fields are in the old Links SQL database, but there is no equivelant in the new one:

Characters, Music, Awards, Prod_Num, Producer, Voice, Editor, Studio, Format, Animator, Director, Writer, Running_Time, Production_Notes

A solution to this is to create them in the new Links SQL Links table. (There is no Validate table in the new Links SQL, so you don't need to worry about it - just the Links table).

As long as the table structure is the same, there should be no problem importing them.

I am currently working on an addition to the import script that will automatically create the tables (assuming you give it the option to do so) which should be done shortly.

Jason

Jason Rhinelander
Gossamer Threads
Quote Reply
Re: Import problem In reply to
Jason:

Again, thank you for your prompt response!

I have, in fact, made those fields... when I go to Links/Properties, I see them there! (Just empty...)

I edited SQL.pm, so they are in there from the creation of the table.

Here is the Poperties display:

In Reply To:
Position Column
Name Column
Type Not
Null Default Form
Display Form
Type Form
Regex Search
Weight
1 ID INT Yes TEXT ^\d+$
2 Title CHAR(100) Yes TEXT 8
3 URL CHAR(150) Yes 000101 TEXT 1
4 Add_Date CHAR Yes 2000-01-01 TEXT
5 CategoryID1 INT No TEXT
6 Description TEXT No TEXTAREA 1
7 Contact_Name TEXT No TEXTAREA
8 Contact_Email TEXT No TEXTAREA
9 Hits SMALLINT Yes TEXT ^\d+$
10 isNew ENUM(Yes, No) Yes No SELECT
11 isPopular ENUM(Yes, No) Yes No SELECT
12 Rating FLOAT Yes TEXT ^\d+\.?\d*$
13 Votes SMALLINT Yes TEXT ^\d+$
14 Status SMALLINT Yes TEXT ^\-?\d+$
15 Date_Checked DATETIME No DATE
16 Characters TEXT(5000) No TEXTAREA 5
17 Director TEXT(2000) No TEXTAREA 3
18 Studio TEXT(100) No TEXTAREA 3
19 Format TEXT(100) No TEXTAREA
20 Production_Notes TEXT(5000) No TEXTAREA 3
21 Animator TEXT(2000) No TEXTAREA 3
22 Music TEXT(1000) No TEXTAREA 3
23 Prod_Num TEXT(15) No TEXTAREA
24 Awards TEXT(1000) No TEXTAREA 2
25 Running_Time INT(5) No TEXT
26 Producer TEXT(1000) No TEXTAREA 3
27 Editor TEXT(1000) No TEXTAREA 3
28 Voice TEXT(5000) No TEXTAREA 4
29 Writer TEXT(1000) No TEXTAREA 3
30 ReceiveMail ENUM(Yes, No) Yes No SELECT
31 isChanged ENUM(Yes, No) Yes No SELECT
32 Mod_Date DATE Yes DATE
33 isValidated ENUM(Yes, No) Yes Yes SELECT
34 Timestmp TIMESTAMP No TEXT
35 Username CHAR(50) Yes admin TEXT
See- they are all there! They are just NOT matching up properly...


Please let me know when the new script is available, I would love to give that a try!

Quote Reply
Re: Import problem In reply to
Dave,

Well, you found a bug! The problem was that not all of the variables had the prefix set at the beginning, so that is why you encountered the problems. The problems would not have shown themselves without using a prefix - can't believe I forgot to test that!

Anyway, the new version of the import script is finished and should be available soon - it now has support for creating missing columns, and a "data integrity" option which checks for duplicate Categories. Checking for each link is quite slow and will slow down the import alot, but should work fine for relatively small imports.

Jason Rhinelander
Gossamer Threads
Quote Reply
Re: Import problem In reply to
Jason:

Glad you picked it up! If you want to test anything, let me know.... I'll give you url's and passwords... Or I would be happy to give it a whirl and let you know!

Dave

Quote Reply
Re: Import problem In reply to
Jason:

Assuming Alpha10 is the new version, it does not quite work yet!!!

It did, in fact, create the correct fields, but they did not seem right (Under properties, only the original fields were numnbered, the "new" fields were not numbered... but, the weights for search were imported correctly. Go figure!)

Further, though it did create something with the correct names, it did NOT bring any data in at all. Nothing at all in any of those fields.

Sorry!

Dave

Quote Reply
Re: Import problem In reply to
Jason:

I forgot to mention... the errors were the same in Alpha10 as before.... that is:

WARNING: Custom import column `Links.Characters' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Music' has no destination equivelant. It will be ignored

WARNING: Custom import column `Links.Awards' has no destination equivelant. It will be ignored



etc etc etc...

Dave