You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(35) |
Nov
(38) |
Dec
(112) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(20) |
Feb
(24) |
Mar
(47) |
Apr
(18) |
May
(28) |
Jun
(17) |
Jul
(15) |
Aug
(40) |
Sep
(14) |
Oct
(5) |
Nov
(26) |
Dec
(31) |
| 2003 |
Jan
(8) |
Feb
(14) |
Mar
(38) |
Apr
(34) |
May
(33) |
Jun
(32) |
Jul
(24) |
Aug
(9) |
Sep
|
Oct
(20) |
Nov
(43) |
Dec
(22) |
| 2004 |
Jan
(23) |
Feb
(25) |
Mar
(15) |
Apr
(3) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(3) |
Dec
(5) |
| 2005 |
Jan
|
Feb
|
Mar
(16) |
Apr
(24) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(4) |
Oct
|
Nov
(3) |
Dec
(2) |
| 2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: 'Chris Winters' <ch...@cw...> - 2002-08-22 14:00:41
|
* Chris McDaniel (Chr...@te...) [020822 10:03]: > I have a new question - from reading the SPOPS::DBI module docs, it seems to > me that an object is meant to be sync'd with the database after a save, but > I can't seem to make that work - I have this code in a test class on my > server: > ... > Note that I am using the database auto increment for the id field, not the > OpenInteract one. Anyway, I don't get anything back when I ask for the ID. > Can anyone help? This had me scratching my head for a second, then it hit me: we can't sync the record with the database because we can't fetch the record from the database since we don't have an ID to fetch it with! If you just add 'increment_field => 1' to your configuration, SPOPS will use the MySQL auto-increment feature to get the ID of the record you just inserted. All the SPOPS auto-increment adaptations just wrap around the built-in database feature. This is very important since SPOPS is frequently used on top of existing datastores. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
|
From: Chris M. <Chr...@te...> - 2002-08-22 13:50:48
|
Thank you, that helps!
I have a new question - from reading the SPOPS::DBI module docs, it seems to
me that an object is meant to be sync'd with the database after a save, but
I can't seem to make that work - I have this code in a test class on my
server:
sub dbtry {
my $class = shift;
my $p = shift;
my $R = OpenInteract::Request->instance;
my $params = { main_script => '/Test', error_msg => $p->{error_msg} };
my $test = $R->test->new();
$test->{data} = "test data";
$test->save({skip_security => 1});
$params->{testval} = $test->{test_id};
return $R->template->handler( {}, $params, { db => 'test', package =>
'Test' } );
}
and this spops.perl:
$data = {
'test' => {
'object_name' => 'Test',
'no_update' => [
'test_id'
],
'isa' => [
'OpenInteract::SPOPS::DBI',
'SPOPS::Secure',
'SPOPS::DBI::MySQL',
'SPOPS::DBI'
],
'class' => 'portal::Test',
'no_insert' => [
'test_id'
],
'id_field' => 'test_id',
'base_table' => 'test',
'field' => [
'test_id',
'data'
],
'sql_defaults' => [
'test_id'
]
},
}
Note that I am using the database auto increment for the id field, not the
OpenInteract one. Anyway, I don't get anything back when I ask for the ID.
Can anyone help?
Thanks,
Chris
-----Original Message-----
From: Chris Winters [mailto:ch...@cw...]
Sent: August 22, 2002 7:36 AM
To: Chris McDaniel
Cc: 'ope...@li...'
Subject: Re: [Openinteract-help] question about $class and $p -
On Thu, 2002-08-22 at 00:03, Chris McDaniel wrote:
> Maybe I'm just revealing my own ignorance here, but can anyone tell me
about
> what is in $class and $p?
>
> as in:
> sub handler {
> my $class = shift;
> my $p = shift;
> my $R = OpenInteract::Request->instance;
> ...
> }
>
> Thanks, and sorry if this is a dumb question.
It's not. If I picked a more descriptive variable name it might be
easier :-)
Second item first: $p is a hashref of parameters. What is in there
depends on how things are setup. If you use 'GenericHandler' as a parent
(described below), you'll have some security settings in there.
Otherwise, it depends on how you're called. Handlers dealing with a
single object frequently look there first to find the object and/or ID
to act on, like:
my $news = $p->{news};
unless ( $news ) {
my $news_id = $p->{news_id} || $R->apache->param( 'news_id' );
$news = ( $news_id ) ? $R->news->fetch( $news_id )
: $R->news->new();
}
$class is the class of your handler. All handler methods are class
methods, so the class is always the first argument. This is useful for
inheritance -- many times you may want a top-level 'handler' method to
deal with some generic setup stuff but generate the content from a
specific class. So in OI you might have:
URL: /News/show/
Action: 'news' => { class => 'MySite::Handler::News' }
OpenInteract::Handler::GenericHandler
| - defines 'handler'
|
|---MySite::Handler::News
- defines 'show'
OI will call
MySite::Handler::News->handler(...)
which will call the inherited method from 'GenericHandler'. This checks
security, finds the task from the URL, etc. It then calls the content
method 'show' which is defined in your handler and which does the actual
work.
Hope that makes sense!
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|
|
From: Chris W. <ch...@cw...> - 2002-08-22 11:21:48
|
On Thu, 2002-08-22 at 00:03, Chris McDaniel wrote:
> Maybe I'm just revealing my own ignorance here, but can anyone tell me about
> what is in $class and $p?
>
> as in:
> sub handler {
> my $class = shift;
> my $p = shift;
> my $R = OpenInteract::Request->instance;
> ...
> }
>
> Thanks, and sorry if this is a dumb question.
It's not. If I picked a more descriptive variable name it might be
easier :-)
Second item first: $p is a hashref of parameters. What is in there
depends on how things are setup. If you use 'GenericHandler' as a parent
(described below), you'll have some security settings in there.
Otherwise, it depends on how you're called. Handlers dealing with a
single object frequently look there first to find the object and/or ID
to act on, like:
my $news = $p->{news};
unless ( $news ) {
my $news_id = $p->{news_id} || $R->apache->param( 'news_id' );
$news = ( $news_id ) ? $R->news->fetch( $news_id )
: $R->news->new();
}
$class is the class of your handler. All handler methods are class
methods, so the class is always the first argument. This is useful for
inheritance -- many times you may want a top-level 'handler' method to
deal with some generic setup stuff but generate the content from a
specific class. So in OI you might have:
URL: /News/show/
Action: 'news' => { class => 'MySite::Handler::News' }
OpenInteract::Handler::GenericHandler
| - defines 'handler'
|
|---MySite::Handler::News
- defines 'show'
OI will call
MySite::Handler::News->handler(...)
which will call the inherited method from 'GenericHandler'. This checks
security, finds the task from the URL, etc. It then calls the content
method 'show' which is defined in your handler and which does the actual
work.
Hope that makes sense!
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|
|
From: Chris M. <Chr...@te...> - 2002-08-22 04:06:10
|
Maybe I'm just revealing my own ignorance here, but can anyone tell me about
what is in $class and $p?
as in:
sub handler {
my $class = shift;
my $p = shift;
my $R = OpenInteract::Request->instance;
...
}
Thanks, and sorry if this is a dumb question.
Chris McDaniel
|
|
From: Chris W. <ch...@cw...> - 2002-08-21 19:00:37
|
* Eric Reeves (er...@1s...) [020821 12:10]:
> I'm working on developing a package that interacts with a non-default
> database. I've got 2 datasources specified in my server.ini (both Pgsql),
> and a test_db shows both datasources with no errors. My datasource entry
> and spops.perl follows:
> ...
> $spops = {
> 'nagios_host_status' => {
> class => 'OpenInteract::NMS',
> isa => [ qw/ OpenInteract::SPOPS SPOPS::Secure
> SPOPS::DBI::Pg SPOPS::DBI / ],
This first entry in 'isa' needs to be OpenInteract::SPOPS::DBI. This
was changed a few versions ago but still lingers in some of the
docs. I'll try and find the rest before I put out the next version.
Thanks for the additional documentation prod, they're helpful.
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988
|
|
From: Eric R. <er...@1s...> - 2002-08-21 15:57:04
|
I'm working on developing a package that interacts with a non-default
database. I've got 2 datasources specified in my server.ini (both Pgsql),
and a test_db shows both datasources with no errors. My datasource entry
and spops.perl follows:
***************************
***************************
[db_info nagios]
db_owner =
username = nagios
password = <password>
dsn = dbname=nagios
db_name =
driver_name = Pg
sql_install =
long_read_len = 65536
long_trunc_ok = 0
***************************
***************************
$spops = {
'nagios_host_status' => {
class => 'OpenInteract::NMS',
isa => [ qw/ OpenInteract::SPOPS SPOPS::Secure
SPOPS::DBI::Pg SPOPS::DBI / ],
field => [],
field_discover => 'yes',
id_field => 'host_name',
no_update => [ qw/ host_name / ],
skip_undef => [ qw/ host_name / ],
datasource => 'nagios',
base_table => 'hoststatus',
creation_security => {
u => 'WRITE',
g => { 3 => 'WRITE' },
w => 'READ',
},
display => { url => '/Status/hosts/' },
name => 'host_name',
object_name => 'nagios_host_status',
},
};
***************************
***************************
I have no struct or data definitions for this package, since OI will not
be creating or initially populating the table.
My template and handler routines appear to be correct. (They were mostly
borrowed & modified from the fruit example package.) However, I get no
data in the output HTML table, and no errors in the error log. I've set
DEBUG to 5 in the server.ini, but still didn't see any helpful messges.
How can I go about troubleshooting what is falling short? I'm suspecting
it is something with the datasource.
I've confirmed that there is data in the target table. Even if I change
the base_table in my spops.perl to a table that does not exist in the DB,
I don't get any errors, so I'm not quite sure where to go from here.
Thanks.
-----
Eric Reeves - Network / Systems Administrator
1st Contact Technologies - 281.333.1444
|
|
From: Chris W. <ch...@cw...> - 2002-08-21 12:16:24
|
On Wed, 2002-08-21 at 03:50, And...@Be... wrote:
> looking at our oi database, we found that our object_keys table keeps
> filling, although we removed all object_track keys in the spops.perl files.
> So the assumption is, that we did not yet grasp the sense and function of
> object_keys and maybe also object_track.
>
> Could anyone please "fill us in" ?
object_keys is entirely separate from object tracking. It was an
experiment used to abstract class + ID. Instead of having a class and ID
in every table which can refer to any other type of object -- full-text
index, etc. -- you stick the 32-character object_key in. I also got
tired of having to make the ID longer and longer in these tables, to
accommodate longer ID names mostly necessitated by the 'location' field
of HTML pages. (Mistake: I should have used a meaningless incrementing
ID and made 'location' unique. Ah well.)
I don't think this is necessarily a bad idea -- I think generic object
containers like the Everything2 Engine use something similar so you can
ask for a 'node_id' and get back a form, a poll, a discussion, etc. But
I think using a monotonically increasing ID would probably be a better
idea.
If you're not using object_keys for anything, then the only time it will
come into play is when you create an SPOPS object. If you'd like to stop
creating them, comment out the line:
push @{ $rs_table->{post_save_action} }, \&save_object_key;
in OpenInteract::SPOPS->ruleset_factory.
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|
|
From: <And...@Be...> - 2002-08-21 07:51:08
|
Hey y`all, looking at our oi database, we found that our object_keys table keeps filling, although we removed all object_track keys in the spops.perl = files. So the assumption is, that we did not yet grasp the sense and function = of object_keys and maybe also object_track. Could anyone please "fill us in" ? thanks and regards, > Andreas Nolte > - Leitung IT - > ____________________________________ >=20 > MSN Marketing Service Nordwest GmbH > - Bertelsmann Services Group - >=20 > Olympiastra=DFe 1 > 26419 Schortens >=20 > Fon +49 (0) 44 21 / 76 -84002 > Fax +49 (0) 44 21 / 76 - 84111 >=20 > E-Mail:And...@be... > Internet:www.bertelsmann-services.de >=20 >=20 >=20 >=20 >=20 |
|
From: Eric R. <er...@1s...> - 2002-08-21 01:29:31
|
On Tue, 20 Aug 2002, Kim Hansen wrote: > That is probably because you hadn't dropped the sequences, the are not > reset if you only drop the tables. > Ah ha. That's good to know. Thanks. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Kim H. <k...@oe...> - 2002-08-20 13:53:11
|
At Tue, 20 Aug 2002 08:39:16 -0500 (CDT), Eric Reeves wrote: >=20 > These values were all set correctly in the server.ini. I dropped every > table in the db, wiped the website directory, and started over, but found > that the values still hadn't reset. I had to drop the db completely from > PgSQL before things were happy again. That is probably because you hadn't dropped the sequences, the are not reset if you only drop the tables. --=20 Kim Hansen | |\ _,,,---,,_ | Det er ikke Dalslandsgade 8, A708 | /,`.-'`' -. ;-;;,_ | Jeopardy. 2300 K=F8benhavn S | |,4- ) )-,_. ,\ ( `'-' | Svar _efter_ Phone: 32 88 60 86 | '---''(_/--' `-'\_) | sp=F8rgsm=E5let. |
|
From: Eric R. <er...@1s...> - 2002-08-20 13:39:22
|
On 20 Aug 2002, Chris Winters wrote: > You can fix this and the theme problem by editing the following values > in server.ini: > > [default_objects] > superuser = 4 <-- > supergroup = 1 > theme = 4 <-- > public_group = 2 > site_admin_group = 3 > > You'll probably need to edit the group IDs as well; if you've installed > everything four times it will probably be 10, 11 and 12. > These values were all set correctly in the server.ini. I dropped every table in the db, wiped the website directory, and started over, but found that the values still hadn't reset. I had to drop the db completely from PgSQL before things were happy again. Thanks for the help. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Chris W. <ch...@cw...> - 2002-08-20 11:56:35
|
On Tue, 2002-08-20 at 06:34, Nick Sutterer wrote: > I don't understand the difference between the two files: > Which file is processed first? > How does OI know how to handle "none"-requests even when I comment out the mappings in both files? > Are these two files related at all (they have to, since they have same > entries in different format?!)? Use either server.perl OR server.ini. They have identical information. The server.perl file is mainly supported for backwards compatibility; using the server.ini file is recommended. OI knows which one to parse by the relevant entries in the $WEBSITE_DIR/conf/base.conf file. > In the manual file action.pod > (/SystemDoc/show/?package=base;doc=action.pod) you talk about action names > "" for none and "_notfound_", but the corresponding (?) entries in > server.perl/server.ini are "none" and "not_found"??! This is out of date, I'll fix it. The entries in the server.ini file are authoritative. Thanks, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Chris W. <ch...@cw...> - 2002-08-20 11:52:17
|
On Tue, 2002-08-20 at 00:40, Eric Reeves wrote: > Now that it's up and running, I attempted to login and noticed the > superuser account isn't working. I can log in, but I don't get any of the > admin boxes, and when I click 'Edit my info', it attempts to look up > user_id 4. I must have done something 4 times more than I should have to > get all of these counters to increment. I figured as much. > > I'm going to wipe out the database & website directory in the morning, and > start from scratch. I'm pretty sure that'll take care of it, but I'll let > you know what happens. You can fix this and the theme problem by editing the following values in server.ini: [default_objects] superuser = 4 <-- supergroup = 1 theme = 4 <-- public_group = 2 site_admin_group = 3 You'll probably need to edit the group IDs as well; if you've installed everything four times it will probably be 10, 11 and 12. Good luck! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Nick S. <ni...@te...> - 2002-08-20 10:32:37
|
Hi all, I'm currently playing around with the newest OpenInteract and tried to change default server actions for "none" and "notfound". I found out that OI doesn't recognize changes in server.perl even when I comment the respective mappings in server.ini. I don't understand the difference between the two files: Which file is processed first? How does OI know how to handle "none"-requests even when I comment out the mappings in both files? Are these two files related at all (they have to, since they have same entries in different format?!)? In the manual file action.pod (/SystemDoc/show/?package=base;doc=action.pod) you talk about action names "" for none and "_notfound_", but the corresponding (?) entries in server.perl/server.ini are "none" and "not_found"??! Please help! Nick ps: After all, OpenInteract is great, thanks for providing this great tool!! :-) __________________________________________ nick sutterer cb&h productions ni...@te... the computer helps us solving problems which we wouldn't have without it. |
|
From: Eric R. <er...@1s...> - 2002-08-20 04:40:28
|
On Mon, 19 Aug 2002, Eric Reeves wrote: > Now, I kinda suspect this might have something to do with the fact that > this site used to use MySQL as a main datasource. I just changed it over > to PgSQL and ran "oi_manage --package=INITIAL install_sql" again. Does a > counter for theme_id get stored somewhere within $WEBSITE_DIR? Can you > think of any other way this might have happened? I've been doing a lot of > playing around with oi_manage + installing/removing/upgrading packages, so > it's very possible I just did something you're not supposed to do along > the way. > Now that it's up and running, I attempted to login and noticed the superuser account isn't working. I can log in, but I don't get any of the admin boxes, and when I click 'Edit my info', it attempts to look up user_id 4. I must have done something 4 times more than I should have to get all of these counters to increment. I figured as much. I'm going to wipe out the database & website directory in the morning, and start from scratch. I'm pretty sure that'll take care of it, but I'll let you know what happens. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Eric R. <er...@1s...> - 2002-08-20 04:21:50
|
On 19 Aug 2002, Chris Winters wrote: > This is interesting. In all of OI there are only two tables with a > character field of length 60: > > ./pkg/base_error/struct/sys_error.sql: filename varchar(60) not > null, > I increased sys_error.filename to varchar(120), and now the error is getting logged properly. Looks like I have a rather long path to the OI libs that was snagging it: "/usr/local/lib/perl5/site_perl/5.6.1/\ OpenInteract/Session/DBI.pm". I guess most people install perl in /usr/lib. (= I'm going to set this to varchar(80), now that I know what it was trying to squeeze in there. > > --EXITED WITH ERROR from main handler eval block > > Error: Can't call method "discover_properties" on an undefined value at > > /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 348. > > Which makes me think the theme wasn't retrieve properly. Can you do a: > . . and you were right. I noticed that the only theme present had a theme_id of 4, which didn't match up to the object_id's returned by the query you had me do on the sys_security table. I set this to 1, and it fired up! Now, I kinda suspect this might have something to do with the fact that this site used to use MySQL as a main datasource. I just changed it over to PgSQL and ran "oi_manage --package=INITIAL install_sql" again. Does a counter for theme_id get stored somewhere within $WEBSITE_DIR? Can you think of any other way this might have happened? I've been doing a lot of playing around with oi_manage + installing/removing/upgrading packages, so it's very possible I just did something you're not supposed to do along the way. Thanx. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Chris W. <ch...@cw...> - 2002-08-20 02:39:26
|
On Mon, 2002-08-19 at 18:30, Eric Reeves wrote: > I'm attempting to get OI 1.41 up and running w/ PgSQL, and am having a few > issues. I have the program working fine with MySQL, but would prefer to > use PgSQL. Ah, a man of my own tastes :-) > I have created an override_spops.perl in my site's conf dir, and have also > run "oi_manage change_spops_driver --driver=SPOPS::DBI::Pg", just to be > safe. The global override is the way to go and it works fine. (I do this all the time, so if this got broken it would get discovered and fixed in a hurry.) > Error log entry: > ... > Cannot save error 310: DBD::Pg::st execute failed: ERROR: value too long > for type character varying(60) at > /usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterface.pm line 288. > at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/System.pm line > 394 This is interesting. In all of OI there are only two tables with a character field of length 60: ./pkg/base_error/struct/sys_error.sql: filename varchar(60) not null, ./pkg/base_security/struct/sys_security.sql: class varchar(60) not null, And since this was an error I suspect that it had problems with the first of these. I'm not sure why it would, but in any case try dropping the table, changing the table definition to varchar(120) or something in $WEBSITE_DIR/pkg/base_error-x.xx/struct/sys_error.sql, then running: oi_manage install_sql --package=base_error --sql_action=structure I'm not sure this is the error, though. Session errors (310) should never be fatal since they can happen fairly often. In the error log we also have: > --EXITED WITH ERROR from main handler eval block > Error: Can't call method "discover_properties" on an undefined value at > /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 348. Which makes me think the theme wasn't retrieve properly. Can you do a: SELECT * FROM theme to see if a theme exists, and if so, do a: SELECT * FROM sys_security WHERE class = 'Intranet::Theme' to see if you get something like: oi=> select * from sys_security where class like '%::Theme'; sid | class | object_id | scope | scope_id | security_level 25 | OITest::Theme | 1 | w | world | 4 26 | OITest::Theme | 1 | g | 3 | 8 > Chris, thanks for the all time & effort you've put in to OI, and I hope > all went well with your move last month. (= Thanks! The move went pretty well, as did the ISP migration. I'm fairly settled now and hope to crack down on SPOPS and OI more shortly. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Eric R. <er...@1s...> - 2002-08-19 22:30:02
|
Greetings. .
I'm attempting to get OI 1.41 up and running w/ PgSQL, and am having a few
issues. I have the program working fine with MySQL, but would prefer to
use PgSQL.
System Info:
Slackware Linux 7
Perl 5.6.1
Apache 1.3.26 + mod_perl 1.27
PostgreSQL 7.2.1
DBD::Pg 1.13
************************************************
************************************************
Here's my datasource from the server.ini:
[db_info main]
db_owner =
username = oi_intranet
password = <passwordhere>
dsn = dbname=oi_intranet
db_name =
driver_name = Pg
sql_install =
long_read_len = 65536
long_trunc_ok = 0
And my session_info class:
class = Apache::Session::Postgres
I have created an override_spops.perl in my site's conf dir, and have also
run "oi_manage change_spops_driver --driver=SPOPS::DBI::Pg", just to be
safe.
test_db and install_sql both ran without a hitch (after I re-read the
docs, and figured out what to do with the dsn & db_name for a Pg
connection).
************************************************
************************************************
Error log entry:
Found item: DBI::db
OpenInteract::Error::System::cannot_create_session (335) >> Cannot create
session -- someone is probably using a defunct key or something.
>> Error with code 310 thrown. Info: Object does not exist in the data
store at
/usr/local/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line
81.
OpenInteract::Error::System::log_and_return('Intranet::ErrorObject=HASH(0x8e520b0)')
called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/System.pm line 342
OpenInteract::Error::System::cannot_create_session('Intranet::ErrorObject=HASH(0x8e520b0)')
called at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/Main.pm
line 38
OpenInteract::Error::Main::catch('OpenInteract::Error::Main',
'Intranet::ErrorObject=HASH(0x8e520b0)') called at (eval 402) line 39
Intranet::ErrorObject::throw('Intranet::ErrorObject',
'HASH(0x9589d30)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error.pm line 94
OpenInteract::Error::throw('OpenInteract::Error',
'HASH(0x9589d30)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Request.pm line 124
OpenInteract::Request::throw('OpenInteract::Request=HASH(0x9380940)',
'HASH(0x9589d30)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Session/DBI.pm line 31
OpenInteract::Session::DBI::_create_session('OpenInteract::Session::DBI',
'fb014562f8776e2ac4e3aaa482c4abf7') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Session.pm line 27
OpenInteract::Session::parse('OpenInteract::Session::DBI') called
at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 256
eval {...} called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 251
OpenInteract::setup_cookies_and_session('OpenInteract',
'OpenInteract::Request=HASH(0x9380940)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 52
eval {...} called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 46
OpenInteract::handler('OpenInteract', 'Apache=SCALAR(0x85f52a0)')
called at /dev/null line 0
eval {...} called at /dev/null line 0
Cannot save error 310: DBD::Pg::st execute failed: ERROR: value too long
for type character varying(60) at
/usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterface.pm line 288.
at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/System.pm line
394
OpenInteract::Session::DBI::_create_session (36) >> Error thrown. Now
clear the cookie
--EXITED WITH ERROR from main handler eval block
Error: Can't call method "discover_properties" on an undefined value at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 348.
************************************************
************************************************
I'm suspecting "Cannot save error 310..." is the issue.
Any assistance in tracking this one down would be greatly appreciated.
Let me know if there's any additional info I can provide that might be
helpful.
Chris, thanks for the all time & effort you've put in to OI, and I hope
all went well with your move last month. (=
Thanks in advance. .
-----
Eric Reeves - Network / Systems Administrator
1st Contact Technologies - 281.333.1444
|
|
From: Chris W. <ch...@cw...> - 2002-08-16 12:29:39
|
On Thu, 2002-08-15 at 10:53, Gert Thiel wrote: > You say has_a forms a "one-to-one" relationship. From a objects point of view > is right. But with RDBMS terms it is not. > > If you objects like this: > publisher > book has_a publisher > > it is a one-to-one as there is only one publisher per book but there are books > for any publisher. > > You should explain that details because SPOPS is used as a oo wrapper around a > RDMS. Their users could you probs to understand you. Good point. I'll change this. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Gert T. <th...@ba...> - 2002-08-15 14:50:39
|
Chris, nice to read your addition to the docs. This is tough stuff so I can't comment every details at once. But I found= a=20 flaw: You say has_a forms a "one-to-one" relationship. From a objects point of = view=20 is right. But with RDBMS terms it is not. If you objects like this: publisher book has_a publisher it is a one-to-one as there is only one publisher per book but there are = books=20 for any publisher. You should explain that details because SPOPS is used as a oo wrapper aro= und a=20 RDMS. Their users could you probs to understand you. More later. Gert. |
|
From: Chris W. <ch...@cw...> - 2002-08-15 13:02:28
|
On Wed, 2002-08-14 at 08:18, Gert Thiel wrote: > SPOPS is a very powerful piece of software. But as such it is as usable as > it's documentation complete :-( For the relationship information, see: http://www.cwinters.com/raw/Relationships.pod This is after a day or so and I need to go through and edit some more, but it should be mostly there. Let me know what you think. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Chris W. <ch...@cw...> - 2002-08-14 12:23:33
|
On Wed, 2002-08-14 at 08:18, Gert Thiel wrote: > that helped. But your manual says > > "As of SPOPS 0.53, SPOPS::DBI supports multi-field primary keys. To use it, > you just use an arrayref to represent the ID field rather than a string. > (Wisenheimers who use an arrayref with one element may be shocked that SPOPS > finds this attempt to trick it and sets the value to the single element.)" > > Please don't mind, but that's weird. You're absolutely right. I'll fix that. (My memory's not so good as more grey hairs pop out from my head :-) > SPOPS is a very powerful piece of software. But as such it is as usable as > it's documentation complete :-( I agree. That's why I really appreciate you bringing up holes in the documentation. It's very easy for me to forget what I've done in the past. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Gert T. <th...@ba...> - 2002-08-14 12:16:12
|
Thanks, but, > Instead of being an arrayref, you specify the ID in a comma-separated > string: > > $articlespecialprice =3D BaerShopSF::data::articlespecialprices->fetch= ( > "$a,$country,$currency" ); that helped. But your manual says "As of SPOPS 0.53, SPOPS::DBI supports multi-field primary keys. To use i= t,=20 you just use an arrayref to represent the ID field rather than a string.=20 (Wisenheimers who use an arrayref with one element may be shocked that SP= OPS=20 finds this attempt to trick it and sets the value to the single element.)= " Please don't mind, but that's weird. > You can look at t/31_dbi_multifield.t for more examples. I'm adding > documentation to SPOPS::DBI right now. > > > Why? Can you give some examples? > > > > 2) Relationships (has_a, links_to) > > > > How do has_a and links_to work? > > Can you give some examples? > > For 'links_to', please see 'perldoc SPOPS::ClassFactory::DBI'. > > For 'has_a'... wow, there's nothing there. My apologies. > > There are working examples of relationships in the eg/ directory: > My::Doodad has_a My::User, My::User links_to My::Group, My::Group > links_to My::User. Will lokk there asap. > I'll move the existing examples for 'links_to' and add new information > for 'has_a' to SPOPS::Manual::Relationships so they're in one place. Good idea. SPOPS is a very powerful piece of software. But as such it is as usable a= s=20 it's documentation complete :-( > Thanks for bringing these up. Thank you. Gert. |
|
From: Chris W. <ch...@cw...> - 2002-08-14 11:55:57
|
On Wed, 2002-08-14 at 06:39, Gert Thiel wrote:
> Sorry,
>
> but the SPOPS documentation is *very* incomplete.
Well, on this feature it is :-)
> 1) Multiple-Field ID Fields
>
> I declared as follows:
>
> 'articleprices' => {
> 'object_name' => 'articleprice',
> ...
> 'id_field' => [ 'ARTIKEL', 'LAND', 'WAEHRUNG' ],
This is correct.
> nevertheless this fails:
>
> $articlespecialprice = BaerShopSF::data::articlespecialprices->fetch( [$a,
> $country, $currency] );
Instead of being an arrayref, you specify the ID in a comma-separated
string:
$articlespecialprice = BaerShopSF::data::articlespecialprices->fetch(
"$a,$country,$currency" );
You can look at t/31_dbi_multifield.t for more examples. I'm adding
documentation to SPOPS::DBI right now.
> Why? Can you give some examples?
>
> 2) Relationships (has_a, links_to)
>
> How do has_a and links_to work?
> Can you give some examples?
For 'links_to', please see 'perldoc SPOPS::ClassFactory::DBI'.
For 'has_a'... wow, there's nothing there. My apologies.
There are working examples of relationships in the eg/ directory:
My::Doodad has_a My::User, My::User links_to My::Group, My::Group
links_to My::User.
I'll move the existing examples for 'links_to' and add new information
for 'has_a' to SPOPS::Manual::Relationships so they're in one place.
Thanks for bringing these up.
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|
|
From: Gert T. <th...@ba...> - 2002-08-14 10:37:10
|
Sorry,
but the SPOPS documentation is *very* incomplete.
1) Multiple-Field ID Fields
I declared as follows:
'articleprices' =3D> {
'object_name' =3D> 'articleprice',
'class' =3D> 'BaerShopSF::data::articleprices',
'isa' =3D> [ qw/ SPOPS::DBI::MySQL SPOPS::DBI / ],
'rules_from' =3D> [ qw/ SPOPS::Tool::DBI::Datasource=20
SPOPS::Tool::DBI::DiscoverField SPOPS::Tool::ReadOnly / ],
'base_table' =3D> 'ARTIKEL_VKPREIS',
'field_discover' =3D> 'yes',
'id_field' =3D> [ 'ARTIKEL', 'LAND', 'WAEHRUNG' ],
'increment_field' =3D> 'no',
'dbi_config' =3D> {
dsn =3D> $r->dir_config('ShopSF_DbA_S=
'),
username =3D> $r->dir_config('ShopSF_DbA_U=
'),
password =3D> $r->dir_config('ShopSF_DbA_P=
'),
},
'track' =3D> { create =3D> 1, update =3D> 1, delete =3D=
> 1 },
},
nevertheless this fails:
$articlespecialprice =3D BaerShopSF::data::articlespecialprices->fetc=
h( [$a,=20
$country, $currency] );
Why? Can you give some examples?
2) Relationships (has_a, links_to)
How do has_a and links_to work?
Can you give some examples?
Gert.
|