upon enabling the modules in modules admin, when I hit save, this is the message, it appears to be at this URL:
admin/build/modules/list/confirm


Fatal error: Call to a member function debug() on a non-object in /var/www/sparcs/sites/all/modules/mappingkit/geodata/google_projection.inc.php on line 13

Hitting the back button puts me back in the modules admin with all mods checked and everything looks ok.

in this case, I am using Drupal 6.6 on PGsql 8.3.x and postgis 1.3.x on Ubuntu 8.10, apache2 and php 5.6
D6 contrib mods in use: Admin role, Views, mapping kit.

I will attempt to recreate the error on similar stack in windows later today.

Comments

spydmobile’s picture

refreshing the admin modules page after this shows that the enabling of the modules did not actually occur.....
trying one at a time in this order,mapping kit, map client, map context, openlayers map client, geodata



    * warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "geodata" already exists in /var/www/sparcs/includes/database.pgsql.inc on line 138.
    * user warning: query: CREATE TABLE geodata ( nid int NOT NULL default 0, vid int NOT NULL default 0, geodata_type int NOT NULL default 0, minx double precision default -1, miny double precision default -1, maxx double precision default -1, maxy double precision default -1, srid int NOT NULL default -1, data_owned smallint, data_path varchar(256), geometry_type varchar(30), geometry_column varchar(256), data text, PRIMARY KEY (nid, vid) ) in /var/www/sparcs/includes/database.inc on line 515.
    * warning: mkdir() [function.mkdir]: File exists in /var/www/sparcs/sites/all/modules/mappingkit/geodata/geodata.install on line 17.

this looks simply like this part was successfull the first time.
next was wms, then map layer, then left it at that. seems to be installed.

spydmobile’s picture

The geo data module is coming up as : Geodata Geodata requires a PostgreSQL database.

It has a PostGIS-Postgresql back end, so it is becuase I am using 8.3 instead of 8.2? I cant downgrade BTW since much of the rest of my system is based on 8.3 and I know many drupal authors have had issues with changes in 8.3.x

jpulles’s picture

Assigned: Unassigned » jpulles

The fatal error on the non-object is due to a logger object which is not defined. This happens when geodata is installed as the first module of the mappingkit and will be solved.

Your #1 comment is correct; you can ignore the warnings because the table and folder were already created.

Comment #2 surprises me. The postgresql version does not make a difference and you don't need to downgrade. The message 'Geodata requires a PostgreSQL database' is only given when the scheme part of the db_url is NOT equal to 'pgsql'. You may want to check the geodata_requirements function in the geodata.install file to check what happens in your case.

spydmobile’s picture

Hi John,

My comment #2 stems from a series of problems created by a recent change to the postgres SQL language between 8.2 and 8.3 it has been a problem for many module authors and even core authors, I only meant that it might be related to that, and it seems that it is not. Since you actively develop on postgres (thank you so much for your contributions, your work will be the foundation of mine) this is not I belive a valid concern for mapping kit.

my big problem right now is the geodata module which continues to report Geodata requires a PostgreSQL database even thought it is configured. May I point out that you provide us an example beneath the geodata database configuration field that reads :

Enter database connection url's for postgis databases in format 'name=user:password@host[:port]/database'. These will be available in addition to the ones defined in the Drupal settings file.

what is name? is name pgsql?
Should we use quotes or not?
is it one entry per line?
you reference the line in the settings.php but this is not the same format.
the format in settings is: $db_url = 'pgsql://username:password@localhost/databasename'

Your excellent documentation on http://aardbodem.nl seems only weak in one area, geodata.

I have a postgis database called geodata on a machine called localhost, owned by a user called mapper with a password of mapper.
i have tried all of these with no success:

  • pgsql=mapper:mapper@localhost/geodata
  • 'pgsql=mapper:mapper@localhost/geodata'
  • testname=mapper:mapper@localhost/geodata
  • $db_url = 'pgsql://mapper:,apper@localhost/geodata';
  • $db_url = 'pgsql://mapper:,apper@localhost/geodata'

I still cannot seem to solve the issue.

spydmobile’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

Hi John,
I am on the dev version now and same problem.
Franco

jpulles’s picture

Hi Franco,

The dev and 1.1 versions are not much different. The non-dev version only do not change too frequently.

True that the geodata is not well documented but I sofar didn't have much indication of it being used by others than myself; I expect that the main use is the map viewer part.

For geodata you can enter one database per line, without quotes:
A line as

geodata=mapper:mapper@localhost/geodata

will be equivalent to a settings.php definition as

$db_url['geodata'] = 'pgsq://mapper:mapper@localhost/geodata';

Apparently, this doesn't work as it should be, so you could for the time being try to put the 2nd line in the settings file and change the default $db_url into $db_url['default'].

John.

jpulles’s picture

Title: Installing Module on d6.6 on pgsql8.3.x causes fatal error » Installing geodata module causes fatal error

Changed title.

jpulles’s picture

I submitted a possible fix to cvs for the dev release. Problem seems to be that if parse_url gets a database url with line feeds in it, it doesn't correctly parse the database url. Adding a trim() function solves this.

spydmobile’s picture

Thanks John,
we are back to work monday and will try it out and report back then.
franco

spydmobile’s picture

Title: Installing geodata module causes fatal error » Geodata DB config not working: Geodata requires a PostgreSQL database.

Hi John,

I installed the latest Dev release, ran the update script. and set my config to:
geodata=mapper:mapper@localhost/geodata

and still get the error.

I also tried the more intricate suggestion of:

put the line:
$db_url['geodata'] = 'pgsq://mapper:mapper@localhost/geodata';

in the settings file and change the default $db_url into $db_url['default'].
This is good workaround, but the config mechanism is still broken.
For now though I can at least use the geodata module!