Forum OpenACS Development: content::type::is_content_type is not working properly in oacs-5.4.3

The plpgsql func it calls works fine... but the TCL binding does not.

defined in packages/acs-content-repository/tcl/content-type-procs.tcl, if you change this:

-object_type:required

to this:

-content_type:required

and this:

[list object_type $object_type ] \

to this:

[list content_type $content_type ] \

And... if you're not yet feeling this change in parameter should be made, take a look at its one use in the core. packages/acs-tcl/tcl/application-data-link-procs.tcl:221

The plpgsql proc has "object_type" as the defined parameter:

see content-type.sql

select define_function_args('content_type__is_content_type','object_type');

This is the same for oracle.

I am not sure what problem you are trying to fix here. If it did not work, what error message or unexpected behavior did you see?

The code in application-data-links procs refers to a parameter that is wrong. It seems like calling the procedure correctly according to the plpgsql function defition is the right fix here.

Am I missing something?

what problem was I seeing? it kept returning false for all strings passed to it, even those which were content types... as defined in the plpgsql func as: if the string is the name of a type derived from content_revision or is itself content revision, should be true.

But you showed me that in a later version I don't have, it's fixed. What is still not fixed (during this hour anyway) is the call on line 221 of packages/acs-tcl/tcl/application-data-link-procs.tcl and it's the only core use of is_content_type().

Anyway thanks for showing me the cvs...

-Jim

look at the define_func_args for is_content_type... in 5.4.3 it's content_type
It is fixed in 5.5. The correct fix is to use object type and fix the tcl procedure. Object type matches the oracle spec which is what all the code was based on.
I fixed application-data-link-procs.tcl on oacs-5-5/