Elxis CMS Forum

Support => Database => Topic started by: forgetms on October 14, 2009, 07:30:50

Title: Bug: Postgresql 8
Post by: forgetms on October 14, 2009, 07:30:50
Not sure if this is the right place for bug reporting but...

bug 1: The errors occur during the installation shows "postgre 7" but it is "postgresql 8" that was chosen.

Bug 2: The error occurs after login as administrator:

ERROR:  column "session.username" must appear in the GROUP BY clause or be used in an aggregate function at character 8
STATEMENT:  SELECT username, time, userid, usertype, gid, ip FROM session GROUP BY ip ORDER BY time DESC LIMIT 10 OFFSET 0

[attachment deleted by admin]
Title: Re: Bug: Postgresql 8
Post by: datahell on October 14, 2009, 09:06:15
Sorry for tis.
Open installation/includes/elxisinstaller.php
Go to line 1080
Change this:
if (!preg_match('^'.$this->_config['dbprefix'].'', $pg_table)) { continue; }
to this:
if (!preg_match('#^'.$this->_config['dbprefix'].'#', $pg_table)) { continue; }

This problem affects only Elxis installation under postgres. The Elxis release was updated with this fix.
Title: Re: Bug: Postgresql 8
Post by: forgetms on October 14, 2009, 10:14:33
Many thanks for the fast response!

I have modified that statement as you instructed.

More issues follow after the modification:

ERROR:  invalid input syntax for integer: "" at character 82
STATEMENT:  UPDATE menu
   SET checked_out='0', checked_out_time='1979-12-19 00:00:00'
   WHERE id=''

ERROR:  relation "idx_section" already exists
STATEMENT:  CREATE INDEX idx_section ON content (sectionid)
ERROR:  relation "idx_access" already exists
STATEMENT:  CREATE INDEX idx_access ON content (access)
ERROR:  relation "idx_checkout" already exists
STATEMENT:  CREATE INDEX idx_checkout ON content (checked_out)

ERROR:  relation "published" already exists
STATEMENT:  CREATE INDEX published ON newsfeeds (published)
LOG:  duration: 74.964 ms  statement: CREATE TABLE poll_data (
   id                       SERIAL,
   pollid                   INTEGER DEFAULT 0 NOT NULL,
   text                     TEXT,
   hits                     INTEGER DEFAULT 0 NOT NULL,
                    PRIMARY KEY (id)
   )
Title: Re: Bug: Postgresql 8
Post by: datahell on October 14, 2009, 12:44:03
First empty your database and then re-try.
Title: Re: Bug: Postgresql 8
Post by: forgetms on October 19, 2009, 18:52:29
First empty your database and then re-try.
Just dropped the database, unzip'ed elxis, modified elxisinstaller.php, re-ran installation, and got the errors and warnings from PostgreSQL log as in the attachment.

[attachment deleted by admin]