A fresh pair of eyes pointed me to this code in the objectadmin.cfm file:
        
        <ft:processform action="unlock">
                <cfif isDefined("form.objectid") and len(form.objectID)>
                        
                        <cfloop list="#form.objectid#" index="i">
                                <cfset o = createObject("component", 
PrimaryPackagePath) />
                                <cfset st = o.getData(objectid=i) />
                                <cfset o.setlock(locked="false") />
                        </cfloop>
                
                </cfif>
                
        </ft:processForm>

Adding "stObj=st" to the o.setLock parameters fixes everything. I don't know
if this has been corrected on newer versions of FarCry - this is using
5.2.2. If it's still got this behaviour, maybe it would be worth adding a
bug issue for it?




Phil Kemp wrote:
> 
> Hi guys,
> 
> I've got a custom type, which I'm using the ft:ObjectAdmin to display the
> table as usual. Everything works fine, until I try to unlock a locked
> object. I have the rights to unlock so the problem isn't a permission.
> Instead, when I choose Unlock from the action drop down, nothing happens.
> The page is reloaded, but no errors or anything appear. When I tick the
> object that is locked and click the button at the top to Unlock, I get a
> dump (see below). It seems that something isn't being passed correctly,
> but this is an area of FarCry I don't know much about. If anyone knows
> what I could do to solve this, it would be appreciated. Until then, I have
> to go to the Overview of the object and unlock from there (which works
> fine, but is time consuming).
> 
> Cheers,
> Phil
> 
> Message        Variable INSTANCE is undefined. 
> TagContext    
> arguments - array
> 1     
> arguments - struct
> COLUMN        0
> ID    ??
> LINE  621
> RAW_TRACE     at
> cftypes2ecfc1840135901$funcSETLOCK.runFunction(/var/www/eom/webapps/cfusion/farcry/core/packages/types/types.cfc:621)
> TEMPLATE 
> /var/www/eom/webapps/cfusion/farcry/core/packages/types/types.cfc
> TYPE  CFML
> 2     
> arguments - struct
> COLUMN        0
> ID    CF_TEMPLATEPROXY
> LINE  232
> RAW_TRACE     at
> cfobjectadmin2ecfm1840180240._factor34(/var/www/eom/webapps/cfusion/farcry/core/tags/formtools/objectadmin.cfm:232)
> TEMPLATE 
> /var/www/eom/webapps/cfusion/farcry/core/tags/formtools/objectadmin.cfm
> TYPE  CFML
> 3     
> arguments - struct
> COLUMN        0
> ID    CF_OBJECTADMIN
> LINE  163
> RAW_TRACE     at
> cfobjectadmin2ecfm1840180240._factor51(/var/www/eom/webapps/cfusion/farcry/core/tags/formtools/objectadmin.cfm:163)
> TEMPLATE 
> /var/www/eom/webapps/cfusion/farcry/core/tags/formtools/objectadmin.cfm
> TYPE  CFML
> 4     
> arguments - struct
> COLUMN        0
> ID    CF_OBJECTADMIN
> LINE  41
> RAW_TRACE     at
> cfobjectadmin2ecfm1840180240.runPage(/var/www/eom/webapps/cfusion/farcry/core/tags/formtools/objectadmin.cfm:41)
> TEMPLATE 
> /var/www/eom/webapps/cfusion/farcry/core/tags/formtools/objectadmin.cfm
> TYPE  CFML
> 5     
> arguments - struct
> COLUMN        0
> ID    CFMODULE
> LINE  29
> RAW_TRACE     at
> cfdmGalleryImage2ecfm655957749.runPage(/var/www/eom/webapps/cfusion/farcry/projects/EOM/customadmin/customlists/dmGalleryImage.cfm:29)
> TEMPLATE 
> /var/www/eom/webapps/cfusion/farcry/projects/EOM/customadmin/customlists/dmGalleryImage.cfm
> TYPE  CFML
> 6     
> arguments - struct
> COLUMN        0
> ID    CFMODULE
> LINE  39
> RAW_TRACE     at
> cfcustomadmin2ecfm1567805634.runPage(/var/www/eom/webapps/cfusion/farcry/core/webtop/admin/customadmin.cfm:39)
> TEMPLATE 
> /var/www/eom/webapps/cfusion/farcry/core/webtop/admin/customadmin.cfm
> TYPE  CFML 
> 

-- 
View this message in context: 
http://old.nabble.com/Can%27t-unlock-a-custom-type-tp28665181s621p28665213.html
Sent from the FarCry - Dev mailing list archive at Nabble.com.

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry

Reply via email to