Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

accessing external tables in 3.1.0? (broken globals after update)

Quote Reply
accessing external tables in 3.1.0? (broken globals after update)
Wow... been a while since I posted here!

Anyway, I have a directory I started building in '01 and back-burnered it for a "while" working on some other stuff. Wink

I'm back at it, so decided to just upgrade to the most recent version.

This seemed to break some globals I had written that accessed external tables I'd created and am trying to figure out how to correct it.

Before, to use an external table with Links, I would first create the table in MySQLMan (naming it Links_TABLENAME), create an empty .def file, then "resync" the table by surfing to:

http://yourserver.com/...do=editor_update_def

IIRC, this would populate the .def with the correct fields and such, then I'd manually add in the appropriate foreign key.

Now, I'm planning on switching hosting for my original domain anyway, so I decided to start completely from scratch (new installation on the new server) in order to work through some of these upgrade issues. So, after a brand new GLinks installation, I've created a new table called Links_External (I assigned "Links_" as the table prefix during setup). I uploaded a blank .def file called Links_External.def to /path/to/cgi-bin/dir/admin/defs. Then I pointed my browser to http://yourserver.com/...do=editor_update_def

However, instead of updating the .def file (like I remember it doing way back), it is returning this error:

Quote:

A fatal error has occured:
GT::Config (13941): Config file '/path/to/cgi-bin/dir/admin/defs/Links_External.def' did not return a hash reference. at /path/to/cgi-bin/dir/admin/GT/SQL/Table.pm line 197.



So I take it the newer versions of GLinks handle external tables differently? I THINK the version I was using previously was 2.0.3...

Any advice?

Thanks! Smile


PS: Here is an old post of mine addressing essentially the same issue for reference (however this no longer seems to work):
http://www.gossamer-threads.com/...rum.cgi?post=146534;;
Matt G
Quote Reply
Re: [Matt Glaspie] accessing external tables in 3.1.0? (broken globals after update) In reply to
I "solved" the current issue by using an old .def file from my previous install. I am still curious though, if there is a way to automatically create a .def file with the current version... any help is appreciated!

Thanks Smile
Matt G
Quote Reply
Re: [Matt Glaspie] accessing external tables in 3.1.0? (broken globals after update) In reply to
In the

my $table_creator = $DB->creator($table_name);
$table_creator->save_schema();

The save_schema() will update the .def files.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [Matt Glaspie] accessing external tables in 3.1.0? (broken globals after update) In reply to
Does your global still work? I used to access external tables but can no longer do it.
Quote Reply
Re: [Alba] accessing external tables in 3.1.0? (broken globals after update) In reply to
I'm not sure why you are having problems with that. I'd take a look if you want. I've pulled external tables in, from other areas. There are a few things you need to organize, but it works. So far.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.