0
Community Beginner
,
/t5/coldfusion-discussions/duplicate-attribute-error/td-p/522431
Nov 30, 2007
Nov 30, 2007
Copy link to clipboard
Copied
I'm invoking a component method to do an update when a form
is posted (CFMX 7.0.2, Windows Server 2003).
However, when I try to invoke the method I get the error:
A duplicate attribute "METHOD" has been encountered. Attributes with the same
name cannot be provided more than once.
The problem is that I'm -not- declaring the attribute more than once. The
offending code is listed below.
The error line number marks the last <cfinvokeargument> tag as the location
of the error. The "method" attribute is only listed once, so I'm not sure why it
would say that I've used it multiple times. Any ideas as to what I'm doing wrong?
Thanks in advance.
Joel
However, when I try to invoke the method I get the error:
A duplicate attribute "METHOD" has been encountered. Attributes with the same
name cannot be provided more than once.
The problem is that I'm -not- declaring the attribute more than once. The
offending code is listed below.
The error line number marks the last <cfinvokeargument> tag as the location
of the error. The "method" attribute is only listed once, so I'm not sure why it
would say that I've used it multiple times. Any ideas as to what I'm doing wrong?
Thanks in advance.
Joel
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Beginner
,
Dec 03, 2007
Dec 03, 2007
I finally figured it out. A method in the cfc I was calling
actually had the error (and it was a duplicate "method" attribute).
I didn't find it sooner because the method that had the error
wasn't the method I was calling; it just happened to be in the same
cfc. The error message was just pointing me to the wrong place.
Apparently CF does some sort of parsing to every function in a cfc,
regardless of whether that method is being called at the time.
Thanks for your help.
New Here
,
/t5/coldfusion-discussions/duplicate-attribute-error/m-p/522432#M47791
Nov 30, 2007
Nov 30, 2007
Copy link to clipboard
Copied
i'm clutching at straws here but it might be possible the
method updatethread or some of your other method names in your cfc
are used somewhere internally by coldfusion, it might be a reserved
word.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
ITnlcf
AUTHOR
Community Beginner
,
/t5/coldfusion-discussions/duplicate-attribute-error/m-p/522433#M47792
Nov 30, 2007
Nov 30, 2007
Copy link to clipboard
Copied
Yeah, I was thinking the same thing. I tried changing the
name of the method and all its arguments to see if it worked, but
didn't have any success. I'm having this problem on three methods
in particular that work in a similar manner to the original code.
However, I'm not having any trouble with other methods in the same
cfc that I wrote a few months ago that do roughly the same type of
work. I'm at a loss, because the error is being generated in the
cfm page that calls the cfc, rather than the actual method
itself.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/coldfusion-discussions/duplicate-attribute-error/m-p/522434#M47793
Nov 30, 2007
Nov 30, 2007
Copy link to clipboard
Copied
It sounds likely to me that the error you are seeing isn't
actually related to the problem.
Try checking your <cfqueryparam> and your <cfargument> tags to make sure all the atrributes are correct within your method.
Try checking your <cfqueryparam> and your <cfargument> tags to make sure all the atrributes are correct within your method.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Beginner
,
LATEST
/t5/coldfusion-discussions/duplicate-attribute-error/m-p/522435#M47794
Dec 03, 2007
Dec 03, 2007
Copy link to clipboard
Copied
I finally figured it out. A method in the cfc I was calling
actually had the error (and it was a duplicate "method" attribute).
I didn't find it sooner because the method that had the error
wasn't the method I was calling; it just happened to be in the same
cfc. The error message was just pointing me to the wrong place.
Apparently CF does some sort of parsing to every function in a cfc,
regardless of whether that method is being called at the time.
Thanks for your help.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

