Just to add to this - I forgot to mention
cfa_contentObjectVersionCreate has exactly the same problem with
metadata - the same workaround applies, but in reverse -
get the original object
grab a copy of the original object's stKeywords structure
create the new version
save the stKeywords structure over that of the new version
object.
Toby
Thursday, January 17, 2002, 1:27:26 PM, you wrote:
TT> Hello Stephen,
TT> we've just finished implementing versioning throughout our cms -
TT> it works fairly well but there are a few things to be aware of.
TT> As far as making changes to versions, this is how we do it:
TT> we have a "content portal", where all existing content can be
TT> viewed, and new obejcts created. Whenever a new object is
TT> created or an existing object edited, the versioning kicks in
TT> out wizards are passed the version object to work on. When the
TT> wizard finishes, the new version is passed to the workflow
TT> system to be used as the artifact.
TT> When an obejct is finally approved in the workflow, the
TT> publishing system then rolls the versions over and all is good.
TT> The version store itself is just another codb - versions are
TT> pretty much normal objects - it's all handled therough the
TT> objecthistory property of your original objects.
TT> The main gotchas are making sure you reference the correct
TT> datasources when working with your objects, and a couple of
TT> other interesting undocmented bits and pieces.
TT> I've written a doc on one issue - using versioning tags in
TT> create handlers, I don't think this list supports attachments so
TT> if you want it just give me a yell.
TT> The other big issue that held us up for a while was metadata.
TT> In our wizards, several obejcts require metadata to be assigned
TT> - naturally we do the metadata assignment to the version object
TT> as we do't want to affect something already in publication until
TT> the workflow is approved. The problem is when you use the
TT> version rollback tag to make your working version the current
TT> version, it removes the stKeywords property.
TT> Inside the version rollback tag, it uses contentObjectData to
TT> save over the original object. ContentObjectdata can use three
TT> modes - passing individual properties through
TT> cfa_contentObjectProperty - passing a structure of properties to
TT> overwrite into the stProperties attribute, or passing an entire
TT> object into the stObject attribute.
TT> If you use stProperties, it will fail if the structure you pass in has any
system-only
TT> attributes (IE objectID, stKeywords etc). And because the
TT> objectid etc within a version is DIFFERENT to the original
TT> object, we don't want to be overwriting these properties. so
TT> naturally the tag uses the stProperties method to ensure
TT> nothing vital is overwritten. It works like this:
TT> get the version object from the version datastore
TT> remove any non-user properties so as not to overwrite
TT> the original ones
TT> save the remaining properties over the contents of the
TT> original object.
TT> Obviously this means stKeywords gets removed as well, so if you
TT> were assigning metadata to your versions, all is lost.
TT> We got around this by retrieving the version ourselves
TT> and retaining a copy of the stKeywords structure immediately
TT> before calling the versionrollback tag. Then once the rollback
TT> is complete, we save the stKeywords to the original object.
TT> Works fine.
TT> Hope that helps, and if you need any more help, feel free to give me a yell
TT> Cheers,
TT> Toby
TT> Thursday, January 17, 2002, 9:29:40 AM, you wrote:
SR>> Hey all,
SR>> I have just started setting up some versioning on a site I am developing and
SR>> have some questions. First off, any suggestions as to which is the best
SR>> resource out there for information on content object versions with Spectra
SR>> 1.5.1? I am finding that the Allaire docs are a little, er, thin.
SR>> Also, does anyone know what the structure of the version DB is? For the time
SR>> being I am just using my normal CODB datasource as the version DB
SR>> datasource. Is this recommended? Where can I actually see the information
SR>> stored in WDDX. Do versioning setup new tables or rely on the existing
SR>> objects table?
SR>> Finally, is one able to make changes to verisions that are not the active
SR>> version? It seems there are no cfa tags to support this, but I have no
SR>> problem writing my own, is there a recommended methodology for this or is
SR>> this an atypical procedure?
SR>> Thanks in advance for any help,
SR>> Cheers,
SR>> Stephen
SR>>
TT>
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.