Forum OpenACS Development: Re: OpenACS: the core and the packages/plugins

Collapse
Posted by Antonio Pisano on
Dear Maurizio,

I have answered on the bug-tracker about tsearch. Regarding the "Contacts" package, this and some of its many dependencies are not among the packages we actually maintain. I am courious on whether you just tried this one package randomly or if you need it in your project.

However, this commit https://cvs.openacs.org/changelog/OpenACS?cs=MAIN%3Aantoniop%3A20210103153317 should improve the situation. There is still a lot of deprecated api in there and I am not really sure about the many "US-oriented" packages it requires, but better than just breaking at install time.

As a rule of thumb, is always better to provide detailed information about the problem at hand, rather than just dropping the "It's broken!" bomb. All the packages currently in the oacs-5-10 branch are maintained and do work to their capacity (save the occasional bug), so I suspect there to be an explanation for your issues that has something to do with the specifics of a Windows setup.

Please keep sharing your findings with us so that we can massage any fix into the codebase. A working Windows installation is a valuable asset to the project and I am glad that you are investing time into it.

Ciao

Antonio

Collapse
Posted by Carl Lemp on
Hi Antonio,
I was trying to get a working set of packages on Windows and Maurizio was debugging/fixing the things I was running into. I am new to OpenACS and am trying to work my way through the maze of historical packages to find the functions I need. In the case of Contacts, I just need a place to store information (phone numbers, emails, roles, etc) about people related a community and Contacts looked like a likely candidate. If that is not the package that is kept up to date, which package(s) do OpenACS communities use to store basic contact information?

Thank you in advance.
Carl

Collapse
Posted by Antonio Pisano on
Hi Carl,

I am personally not aware of a package that does exactly that, and I do not advocate against the Contacts package if it serves your purpose, just expect some maintenance to be needed. I will be happy to port any fix or improvement upstream, if you will be so kind to share it with us.

Collapse
Posted by Carl Lemp on
Hi Antonio,
What I'm looking for is just basic contact information storage. It would be similar to the data that is stored in pretty much every email program and every mobile phone these days so I was expecting it would be data that most online communities needed to store. I'd be happy to share any fixes that I fund and those fixes would come through Maurizio since I'm still too new to OpenACS to attempt any change myself.
Regards,
Carl
Collapse
Posted by Brian Fenton on
Hi Carl

another option for you might be the Attribute Management System (or Dynfields as it is called in Project Open) https://openacs.org/xowiki/ams which you could use to add whatever attributes you need (phone numbers, emails etc) to the PARTY object. I haven't personally used it, but from what I know it should be a good fit. Hopefully someone can correct me if there is a better tool.

best wishes
Brian

Collapse
Posted by Maurizio Martignano on
Dear Brian,
the Contacts package relies on AMS.

Thank you,
Maurizio

Collapse
Posted by Brian Fenton on
Ciao Maurizio!

good to know - thanks.

un saluto
Brian

Collapse
Posted by Maurizio Martignano on
Dear Antonio,
my replies here below.

I have answered on the bug-tracker about tsearch.
[MM] More on this later, where you talk about "rules of tumb".

Regarding the "Contacts" package, this and some of its many dependencies are not among the packages we actually maintain. I am courious on whether you just tried this one package randomly or if you need it in your project.
[MM] Carl, my customer, already answered. We're looking for a Contacts package, and it seemed to me that "contacts" was the best available option,

However, this commit https://cvs.openacs.org/changelog/OpenACS?cs=MAIN%3Aantoniop%3A20210103153317 should improve the situation. There is still a lot of deprecated api in there and I am not really sure about the many "US-oriented" packages it requires, but better than just breaking at install time.
[MM] These are exactly the very same fixes I applied to the package, to make it work.

As a rule of thumb, is always better to provide detailed information about the problem at hand, rather than just dropping the "It's broken!" bomb. All the packages currently in the oacs-5-10 branch are maintained and do work to their capacity (save the occasional bug), so I suspect there to be an explanation for your issues that has something to do with the specifics of a Windows setup.
[MM] Well... well...
Given this piece of code
if {[callback::impl_exists -impl $driver -callback search::driver_info]} {
array set info [lindex [callback -impl $driver search::driver_info] 0]
# array set info [list package_key intermedia-driver version 1 automatic_and_queries_p 1 stopwords_p 1]
} else {
array set info [acs_sc::invoke -contract FtsEngineDriver -operation info -call_args [list] -impl $driver]
}

if { [array get info] eq "" } {
ns_return 200 text/html [_ search.lt_FtsEngineDriver_not_a]
ad_script_abort
}
The initial if passed OK, but then the following statement did not work, so I got the error displayed by
ns_return 200 text/html [_ search.lt_FtsEngineDriver_not_a]

If you check my fix, I forced the execution of
array set info [acs_sc::invoke -contract FtsEngineDriver -operation info -call_args [list] -impl $driver]
and then that piece of code "worked".

Exactly the same behaviour and consequent reasoning for the following piece of code:

if {[callback::impl_exists -impl $driver -callback search::search]} {
# DAVEB TODO Add subsite to the callback def?
# FIXME do this in the intermedia driver!
# set final_query_string [db_string final_query_select "select site_wide_search.im_convert(:q) from dual"]

array set result [lindex [callback -impl $driver search::search -query $q -offset $offset -limit $limit \
-user_id $user_id -df $df \
-extra_args [list package_ids $search_package_id object_type $object_type]] 0]
} else {
array set result [acs_sc::invoke -contract FtsEngineDriver -operation search \
-call_args $params -impl $driver]
}

When "search" got fixed this way, the system was looking for a tsearch2::search implementation
which as you saw I provided into "tsearch2-driver"

I'm not sure this is a specific Windows problem, it looks to me as code that needs some restructuring.
Frank and Malte stumbled on the very same problems and they are not working on Windows
https://openacs.org/forums/message-view?message_id=5465077

Collapse
Posted by Antonio Pisano on
Thanks for the pointers.

So it seems that the callback implementation is detected as existing, but then returns null when it is actually invoked.

If one looks at: https://openacs.org/api-doc/proc-view?proc=callback&source_p=1

There are basically two ways this can happen: no command is found in the prefix ::callback::${callback}::impl, or the command returns the empty string.

There is little chance that the empty string is returned, as this particular callback implementation returns a constant:

https://openacs.org/api-doc/proc-view?proc=callback::search::driver_info::impl::tsearch2-driver&source_p=1

https://openacs.org/api-doc/proc-view?proc=tsearch2::driver_info&source_p=1

hence I suspect that for some reason we do not enter the foreach that says: "foreach procname [lsort [info commands ${base}::$impl]] {" in the call to "callback".

Would you be so kind to check whether this is actually happening? Just insert a debug in the loop and see if the tsearch-driver callback implementation of the search::driver_info contract is found.

If this happens to be the issue you have much more than a broken search on your hands, basically the whole callback machinery would be broken. Let's just see if this is really the case and we can work from there.

Thanks in advance

Antonio