Forum OpenACS Development: Re: Error in site_node_apm_integration::get_child_package_id
if i see correctly, this is not a problem of the "current implementation", but the interface was designed that way. The documentation speaks clearly about a singular package_id, and there are at least 8 places in the sources of the packages in the oacs-5-8 tree, where a variable package_id (singular) is assigned and where the code assumes at most one value.
So, this change is not a simple fix (i.e. for the oacs-5-8 branch), but a function extension, that should be probably tipped, and should go into head. Most probably the best way for such a feature integration is to
- create a new function returning potentially a list of package_ids,
- mark the existing function as deprecated
- use the plural version in the packages where the old one was used so far and add some sane semantics for multiple results.
=> site_node_apm_integration::get_child_package_id (subquery will fail, db_transaction in calendar::item::edit will rollback)
An ugly hack would be to call "ad_conn -set package_id" with a different package_id prior call of calendar::item::edit. That would work, but I tried to avoid that.