s9y v0.9-alpha4 - manage groups

Discussion corner for Developers of Serendipity.
Post Reply
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

s9y v0.9-alpha4 - manage groups

Post by gwilsonmail »

with a new install (using an existing 0.8.2 database) the manage groups admin screen shows the following error

Code: Select all

Warning: Invalid argument supplied for foreach() in W:\www\s9\include\admin\groups.inc.php on line 54
Adding a group shows the following errors

Code: Select all

Warning: Invalid argument supplied for foreach() in W:\www\s9\include\admin\groups.inc.php on line 54
 
--------------------------------------------------------------------------------

[b]Create [/b]
Name  
Group Memberships  admin  

Warning: Invalid argument supplied for foreach() in W:\www\s9\include\functions_config.inc.php on line 823 
Creating a new group causes the following error

Code: Select all

Warning: Invalid argument supplied for foreach() in W:\www\s9\include\functions_config.inc.php on line 823

Warning: Invalid argument supplied for foreach() in W:\www\s9\include\functions_config.inc.php on line 728

A new group #0, new group has been created
Group   

Warning: Invalid argument supplied for foreach() in W:\www\s9\include\admin\groups.inc.php on line 54 
The "new group" is not displayed on the manage groups screen.
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: s9y v0.9-alpha4 - manage groups

Post by garvinhicking »

I think this is the result of a failed upgrade of your Installation. See your parallel posting. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

hmm i'm getting the same error
my installation went correct.
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

MSB: How did you install? Does your table "serendipity_authorgroups" and "serendipity_groups" exist?

Did you read http://www.s9y.org/forums/viewtopic.php ... ght=#11013 which was the problem, and how did you upgrade?

My guess is that your installation went wrong as well, as you are not supposoed to install s9y into the same directory. That's what upgrading is for. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

I actually messed up somethign and had to do a clean install. So its a new installation not a upgrade.
I'll read that link u posted.
thankus :)
Image
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

garvinhicking wrote:MSB: How did you install? Does your table "serendipity_authorgroups" and "serendipity_groups" exist?
they don't exist :shock:
should i just create em
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

If they don't exist you seem to have installed s9y into the same folder as it was already installed in. In that case s9y will not upgrade it's installation.

Thus you'll have to backgrade your installation to the one before upgrading and do the upgrade by just dumping the new files into your directory and then you'll see the upgrader if you enter the admin panel.

An easier way for you, if you have write permissions, is to edit your serendipity_config_local.inc.php and set the "versionInstalled" string to the version you upgraded from. That would be 0.9-alpha1 or 2 or so - the "authorgroups" tables have been created in a very early 0.9 version...

Regards
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

when i did the clean install why does it say that all tables r already there and continues
shouldn't it tell me hey there r two more tables needed.
hmmmm

i can't believe i have been doing it wrong all this time. *sign*

I said what u said and it asked me that i'm using alpha4 and want to upgrade to alpha 5. I selected yes. then i get this

Code: Select all

I have found the following .sql files which needs to be run before you can continue normal operation of Serendipity:
db_update_0.9-alpha4_0.9-alpha5_mysql.sql
it did give me some error

Code: Select all

create table serendipity_access (
  groupid int(10) unsigned not null default '0',
  artifact_id int(10) unsigned not null default '0',
  artifact_type varchar(64) NOT NULL default '',
  artifact_mode varchar(64) NOT NULL default '',
  artifact_index varchar(64) NOT NULL default ''
);
/ Table 'serendipity_access' already exists
CREATE INDEX accessgroup_idx ON serendipity_access(groupid);
/ Duplicate key name 'accessgroup_idx'
CREATE INDEX accessgroupT_idx ON serendipity_access(artifact_id,artifact_type,artifact_mode);
/ Duplicate key name 'accessgroupT_idx'
CREATE INDEX accessforeign_idx ON serendipity_access(artifact_id);
/ Duplicate key name 'accessforeign_idx'and continued and the tables r still not created.
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

When you install s9y into the same directory, s9y thinks you know what you're doing and does not touch the tables so that your installation is not screwed up.

We describe how to upgrade in every announcement and in the documentation, so when people install a new s9y into the same directory we think they should know that this does not touch the DB. I'm sorry this caused confusion for you! :)

The duplicate errors you're getting seem to be because you may have already upgraded from alpha4 to alpha5 somewhen. The serendipity_authorgorups table was created in alpha2 or 3 or so! You can look in the sql/* files to see in which 0.9-alpha the tables were created...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

done
I upgraded from alpha 2 and now its fixed.
I can see the groups thingy

YAY thanks garvin. I understand those sql files much better now. :)

holy cow there is lot of options here. This is the fullfledge thingy isn't it.
nice very nice indeed.
Image
Post Reply