Hello Stephen,

ack.  Sorry guys I forgot you couldn't attach docs - here's the text
of it:

Spectra Object Version Control Update
Date: 2001-11-22
by Toby Tremayne & Vaughan Evans


Problem:
If cfa_contentObjectVersionSettings is called from a create handler using separate 
databases
for versioning and the codb, it throws an error �Object does not exist�, when trying 
to create
a new version using cfa_contentObjectVersionCreate.

Detail:
        Version Control is implemented in Spectra through an embedded structure named
�ObjectHistory�, which contains data about the version datasource, version numbers and
references to any actual previous version objects.  It gets embedded into your content
objects by a call to the tag cfa_contentObjectVersionSettings, which examines your
object to ensure it has a valid �ObjectHistory�, creating it is it is not present.
This tag is invoked at the beginning of all of the version control custom tags, to
ensure correct object setup.

The Spectra Documentation recommends that you call this tag explicitly on your content
objects, both to improve performance and to allow you to specify a different datasource
for versioning objects (if you do not specify a separate datasource, the codb is used
to hold version objects).  However if placed within the create handler itself, an error
will be thown when creating new version objects as the tag 
cfa_contentObjectVersionCreate
calls cfa_contentObjectCreate to make the new version, specifying the versioning
datasource as it�s objectstore.

This means cfa_contentObjectCreate will create a new object in the versioning 
datasource,
then call your create handler, which tells cfa_contentObjectVersionSettings to embed 
the
�ObjectHistory� into an object in the codb, so it will look in the wrong datasource for
the new object and throw an error.

Solution:
        Call cfa_contentObjectVersionSettings from the edit handler rather than the
        create handler.


Sorry 'bout that,
Toby
        
Thursday, November 22, 2001, 1:23:50 PM, you wrote:

SC> Toby

SC> Here what is?

SC> <cf_cuemusic>
SC> Something's missing in my life, maybe it's you...etc.
SC> </cf_cuemusic>

SC> Steve
SC> ========================================================
SC> Stephen Collins, Technical Consultant - ACIS (Australia)
SC> Allaire Certified ColdFusion 5 Developer

SC>  Work : [EMAIL PROTECTED] Personal : [EMAIL PROTECTED]
SC>  ICQ UIN : 56321783                       Yahoo! : trib

SC>   "Before I got into triathlon, I was a normal person."

>> -----Original Message-----
>> From: Toby Tremayne [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, 22 November 2001 3:03 PM
>> To: Spectra-Talk
>> Subject: Spectra Versioning with seperate datasources
>> 
>> 
>> We've recently tracked down a nasty problem we were having for no
>> apparent reason with version control in spectra - it only applies to
>> people using separate datasources for codb and versioning, but I
>> thought this might be handy to anyone attempting it or anyone
>> searching the archives later on.  So here 'tis.  (I'll get this into
>> the knowledgebase or something as well)
>> 
>> Toby
>>  
>> ------------------------------------------------------------------------------------
>> 
>>       Life is Poetry, write it in your own words
>> 
>> ------------------------------------------------------------------------------------
>> 
>> Toby Tremayne
>> Senior Technical Consultant
>> Code Poet and Zen Master of the Heavy Sleep
>> Lyricist Software
>> www.lyricist.com.au
>> m: +61 416 048 090
>> icq: 13107913
SC> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.

Reply via email to