Forum OpenACS Improvement Proposals (TIPs): Re: TIP #133: Change "bio" from being generic storage in "person" to type-specific storage in "user".

Before suggesting dropping bio_mime_type I did the following in my complete checkout of all current openacs packages, "openacs-4-complete":

Goshawk:~ acs$ cd openacs-4-complete/packages
gGoshawk:packages acs$ grep -r -l bio_mime_type .
./acs-subsite/sql/postgresql/attribute.sql
./xotcl-core/tcl/05-db-procs.tcl
Goshawk:packages acs$

xotcl-core is Gustaf's kludge to ignore the attributes "bio" and "bio_mime_type" because his code doesn't handle attributes defined to use generic rather than type-specific storage.

acs-subsite/sql/postgresql/attribute.sql creates the bio_mime_type attribute.

Note: it isn't created for oracle so if it is really used somewhere in .LRN, it is somewhere that only supports PG, and is not in cvs.openacs.org:/cvsroot (unless it is in contrib, which I didn't check).

Are you guys using it locally?

bio should really use the rich text stuff regardless, I thought about making that change but it's more than I'm prepared to do right now.

Don, i don't understand, why you are poking on xotcl-core. xotcl-core never claimed to support the externally stored attributes, so it simply excludes it. Most likely Malte's code for xo-dyntypes extends xotcl-core to handle it, but i did not have time to look at it.

It was rather a kludge at the first place to define bio this way. Don's suggestion to move it from persons to users and to turn it into a regular attribute makes perfectly sense.

Emma, the mime-type for the bio could be stored in the bio field together with the content (as two element list) by using the rich-text widget for editing. This is also a kind of a kludge, but used all over OpenACS.

No, it's not my local, it's .LRN. But you are right, it doesn't use the "bio_mime_type", it doesn't even store it... It converts it from/to HTML each time it is edited (gross!).

So, yeah, dropping bio_mime_type won't hurt.

I'm not "poking at it".

I grep'd to find all the uses of bio_mime_type, which is the right thing to do before removing it, no?

When I saw the xotcl-core reference, well, of course I wanted to look to see what you were doing with it.

And I stated above that you're kludging around the use of it.

Since that is all xotcl-core is doing with it, it is safe to get rid of it, i.e. I won't break xotcl-core by doing so.

Surely you don't prefer that I just remove stuff without first checking to make sure I won't break stuff like xotcl-core???

Gustaf,

Yes, sounds like (more than) a bit of kludge to me. Having a proper datatype created in the DB for it would be much better.

"It converts it from/to HTML each time it is edited (gross!)"

Yes, exactly. The behavior is totally bizarre and probably confusing to users.

I think we all agree that rich text is the right way to go, but I don't have time to do it right now.