Forum OpenACS Q&A: Mailing List not working with Categories

I'm trying to use the Mailing List package in OACS 5.0, but it doesn't seem to be working with Categories.  Once a category has been created, it's no longer possible to create a new mailing list without generating an error:

can't read "element(value)": no such element in array
    while executing
"lindex $element(value) 0"
    (procedure "template::widget::category" line 17)
    invoked from within
"template::widget::$element(widget) element $tag_attributes"
    (procedure "template::element::render" line 10)
    invoked from within
"template::element::render mailing_list_form category_ids {  }"

And there's a very similar error if you try to administer a previously-created list.

Has anyone dealt with this?

Walter

Collapse
Posted by Caroline Meeks on
Hi Walter,

We are using the Mailing List package but we are not using categories with it. I think we have one category created but I don't think we have associated it with anything. I haven't seen your bug.

I don't know if anyone else besides my client and the original client (Greenpeace) have used it yet. My experience with mailing-list is that the basic functionality is great but that there were quite a few bugs to be fixed.

We will try to post all our bug fixes to the bugtracker and I urge you do the same. I'll keep my eyes on it to see if you run into anything we fixed and forgot to report.

Collapse
Posted by Walter Smith on
Thanks Caroline.  I'll be working to get it into production ASAP, so any fixes are appreciated.  I'm just ramping up on 5 (been working with 3.2.5 for the last few years), which makes me a little uncertain when trying to distinguish between bugs and features.  I guess I can just post to the forum first if I'm not sure.

Walter

Collapse
Posted by Timo Hentschel on
Thx for noticing this. The api for categories got slightly changed - we now have a better way to include categories in ad_form. I committed my bugfix and this should be working now. Please let me know.
Collapse
Posted by Walter Smith on
Thanks Timo.  I don't know if I was supposed to, but I tried to uninstall the package so I could reload it.  Was that the wrong thing to do?

So I ran into some errors with it not being able to drop all the tables.  I went in and dropped the tables manually, but I'm finally at an error that I can't resolve:

Deleting package instance 712
The database returned the following error message

    Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") ERROR: update or delete on "acs_objects" violates foreign key constraint "acs_objects_context_id_fk" on "acs_objects" DETAIL: Key (object_id)=(712) is still referenced from table "acs_objects". SQL: select apm_package__delete('712');

Is there a way I can recover from this?  I restarted the server and the package still appears in the package manager, but if I try to delete it I get the same message above.

Collapse
Posted by Walter Smith on
I'm struggling a bit with the package re-installation.  The package manager is very cool, but I seem to be having dependency problems.

Are the changes you made, Timo, going to be reflected in the package that the installer automatically pulls off of the openacs.org site?  Or do I need to get the latest version from CVS (which branch)?

When I try to run the installation on Mailing List 1.0, I get an error that it requires acs-mail-lite 0.3.  However, I can't seem to find that version anywhere (which means it's probably right under my nose).  Should I expect to see it as an available package when I click on "Install Software"?

If I can just get past a few of these issues I think I can be more self-sufficient.

Thanks!

Collapse
Posted by Joel Aufrecht on
I believe acs-mail-lite 0.3 is only 5.1-compatible, not 5.0.  The automatic installer only shows compatible packages, based on your kernel version.  You can browse all of the packages in both versions directly at https://openacs.org/repository.
Collapse
Posted by Walter Smith on
Thanks Joel.  It makes sense that I would only see compatible packages, although I still don't find acs-mail-lite 0.3.  The version listed under 5.1 is acs-mail-lite 0.2a.  I tried checking it out of Head through CVS, but what I found was also version 0.2a...unless I'm looking in the wrong place.
Collapse
Posted by Randy O'Meara on
Walter,

acs-mail-lite has been moved around on HEAD lately. Maybe https://openacs.org/forums/message-view?message_id=133999 can help you track it down. You can also use the cvs browser and check the HEAD and openacs-5-0 branches in both the normal (/packages) location and under contrib (https://openacs.org/4/checkout).

Randy