CFMX 6.1 Updater Bug – duplicate() and CFINVOKE

Totally kicking myself over this one…

Found a bug in the new updater for CFMX 6.1 (ColdFusion Server Developer 6,1,0,83762 ).
Try the following code:

Hello.cfc

<cfcomponent>

<cffunction name="hello" access="public" returntype="string" output="false">
<cfreturn "hello">
</cffunction>

</cfcomponent>

Test.cfm

<cfscript>
obj = createObject("component", "hello");

dObj = duplicate(obj);
</cfscript>

<cfinvoke component="#dObj#" method="hello" returnvariable="hello">

Error Returned:

The <b>component</b> attribute in <b>cfinvoke</b> tag has invalid value.

The <b>component</b> attribute can either be a string (component name) or a component object

This did not occur prior to the updater being put into place.

Unless there is now a new way to dynamic method invocation, this could provide some real issues.

I have another bug that I have yet to track down that seems to be linked to a similar duplicate issue and inheritence, but I have yet to track that one down fully.

I couldn't find anywhere to submit this as a bug to MM, but I know the guys there read this, so I'm sure one of them will pick it up.

 

Leave a Comment

Comments

  • Ruud Hermans | August 27, 2004

    Here you can submit any bugs you find (and requests):
    http://www.macromedia.com/support/email/wishform/

    You really have to search for this form in order to find it. That’s not really good I think.

  • dave ross | August 27, 2004

    AFAIK duplicate never worked properly with CFCs.

  • Raymond Camden | August 27, 2004

    Dave is right. Duplicate does not work with CFCs. That by itself is a bug, but not a new bug.

  • Mark | August 27, 2004

    >laughs<
    Well you gotta love that at the livedocs site
    http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functi74.htm#wp1104156
    it doesn’t actually mention it (except in comments).

    That being said – it was working in ONE way, now it works in ANOTHER… so it is at least annoying.

    That and the previous bugs were more to do with if the duplication was deep or not, in this case, it actually seems to change the state of the instance from something that is no longer a component.

    That is why I consider it a serious bug.

  • Qasim Rasheed | August 27, 2004

    Even on MX 6.1 without the updater the behaviour is the same. So I guess Dave and Raymond are right, duplicate wasn’t working with CFC before and after update.

  • Bill Rawlinson | August 28, 2004

    sorry, this is a touch off-topic:

    i love the fact that your source code examples use syntax highlighting – i can’t imagine that you manually type all the style stuff in each time, so I was wondering how you achieve the effect?

  • mark | August 30, 2004

    It’s okay – I’ve worked it out, and why I thought it was a new bug.

    I had a array of CFC’s stored, and the duplicate() funtion works differently on arrays now, so as before
    it didn’t duplicate CFC’s inside a array, it just passed them by
    refernce (which was fine for what I was doing) – and now it actually
    calls duplicate() on the CFC’s firing off the already known CFC
    duplicate bug.

    My bad.