Forum OpenACS Q&A: Problem Reports & Bboard

Collapse
Posted by Louis Zirkel on
I've been playing with the bboard module on my site a bit and I've found a couple of problems. These may have been fixed, but not in the latest updates that I've got. I didn't know who exactly I should patches to (I assume that LukeP is Luke Pond, but I'm unsure who ArjunS is).

  1. message-edit-3 blows up. In digging into the code I found that there is a call to bboard_message_clear_categories which in turn calls db_dml to call a stored proc. This doesn't seem to work, but changing the db_dml call to db_exec_plsql seems to have resolved the issue.
  2. Once the above problem is resolved it seems like somewhere in the message-edit-3 logic it is setting ALL messages in the system to the same content. I've not tracked this one down yet as it was getting late last night.
  3. Alerts don't always go out. Our SMTP server is setup not to relay email and the From: field getting sent to the sender of the message has been causing some problems. I don't know if this is a real issue, or if it is just recommended to use a different MTA (but I kinda like the one I have).
I've got a message board all setup and ready if LukeP or ArjunS would like to come play on my system. BTW, it's running against a PG7.1.2 database.
Collapse
Posted by Jonathan Marsden on
MTAs should be checking the *envelope* header regarding relaying, not the RFC822 From: header.

Also, most MTAs can (and perhaps should) be set to relay mail coming from a certain set of IP addresses. Your should be set to allow relay of mail from the IP address of your OACS4 server.  This ought to solve this "relaying denied" problem safely and quickly.

I'll let others deal with the first two parts 😊

Collapse
Posted by Don Baccus on
ArjunS is Arjun Sanyal, mailto:arjun@openforce.net.  He's working on the bboard package for dotLRN and has taken it over from Luke Pond, freeing Luke to finish his "edit this page" package.

I know he's fixed some bugs so you might want to e-mail him directly.

At the moment he's fixed them for the Oracle version (since that's what dotLRN will be delivered on under contract to Sloan) and I'm sure
he'd appreciate help applying the fixes to the Postgres version if you
or anyone else wants to offer.

Collapse
Posted by Arjun Sanyal on
I've just committed fixes for bboard-procs.tcl (1 above) and
bboard-procs-postgresql.xql (2). See the cvs log/diff for details.

I'm checking that fixes work on both PG and Oracle, but since I'm
primarily developing on Oracle, extra PG testing will be greatly
appreciated. Thanks for catching these Louis!

Collapse
Posted by Louis Zirkel on
Arjun, just to let you know I just refreshed my code from the CVS repository and reloaded everything on my site and everything seems to work now.  There actually was another problem I was having that I'd forgotten to report with regards to editing forum information that appears to be fixed as well.  Thanks!
Collapse
Posted by Rich Derr on
Regarding the 1.3 -> 1.4 patch for problem 1:  I spent all night
last night tracking down a similar problem.  I had to make the same
change on line 290 to be able to post my first message to my first
board.  This being the first time I've downloaded OpenACS (I'm
up-to-date with CVS) and installed it, I wasn't sure what was
happenning.  At least I got to look at some code and learn about the
system's structure.

Now that I'm back near a phone line I can ask, should the same
(s/db_dml/db_exec_plsql/ change be made on line 290 and elsewhere?
Or is there a different problem?  Could it still be something
strange about my installation (which went pretty smoothly thanks to
V. Kurup's nice Brief installation guide)?

Collapse
Posted by Arjun Sanyal on
<blockquote>night tracking down a similar problem. I had to make the same change
on line 290 to be able to post my first message to my first board.
</blockquote>

Thanks for the bug report. You are using categories, right? I hadn't tested the categories code yet, so I didn't notice this bug.

<blockquote>Now that I'm back near a phone line I can ask, should the same
(s/db_dml/db_exec_plsql/ change be made on line 290 and elsewhere?
</blockquote>

After some digging in the db_api and pgdriver code, it appears to me that db_dml should be used when a dml statement is being called directly as in the other db_dml calls in this file, and db_exec_plsql should be used when the code is calling a stored proc, such as in these two cases.

NSDB (i.e. the aolserver api) was choking on the "select" when it was expecting a dml statement. If you look in your aolserver error log you will see lines like:  "Database operation "dml" failed (exception NSDB, "Query was not a DML or DDL command."

Could someone with some experience with the db api comment on the best practices wrt the various procs of the db api? This may be documented somewhere, but I haven't found it.

Collapse
Posted by Don Baccus on
If PL/SQL is being called for the Oracle version, you need to use db_exec_plsql in both versions.  The PG db api does some magic to make this work for multiple statements - very inefficiently, though.  We'll
worry about that later.  It's fine for single-statement selects such as required for single PL/pgSQL function calls.

I just looked at the infamous line 290 - that shouldn't be a db_dml call.  db_dml in Oracle and PG should be reserved for real DML statements.  db_exec_plsql will work for the Oracle code, won't it?  It will for PG...

Collapse
Posted by Don Baccus on
Oh, I see (now that I've cvs updated) ... that's exactly what you've done to fix it.  Good.