Print this page

Why are we getting cannot be the same as the error message when patching our manage package?

Knowledge Article Number 000239636
Description Our engineers have changed the behavior of Visualforce  to not allow the same attribute assignTo and attribute name on a Visualforce component/page to help our platform prevent programming errors (bugs) that can result in runtime errors. The change took effect on Spring 13 (182) release  API version 27.
An example is below:


<apex:component>
<apex:attribute name="currentpagename" type="string"
assignTo="{!currentpagename}"
description="This component can't be saved."/>.
</apex:component>


 
Resolution To help overcome this issue the developer can first change  the API versions of  the Visualforce page and the dependents to  26.0 or less.  The other method is to make a change to the Visualforce code to compile under API version 27.0 or higher by changing either the attribute name or the assignTo value that can also lead to changing the related controller methods or properties.

An example is below:
<apex:component>
<apex:attribute name="thepagename" type="string"
assignTo="{!currentpagename}"
description="This component saves just fine."/>
</apex:component>

 




promote demote