+ Start a Discussion
Scott.MScott.M 

Managed Package Component Issue in Summer 11

Hi, 

 

I'm wondering if anyone else has run into this issue. We have a managed package that includes a global component that users can use in their own visualforce pages.  The component has a public controller and it used to work in spring 11. Since the summer 11 upgrade we get a controller not visible error when we try to execute actions on the page. I've setup a really simple example to demonstrate the problem. 

 

Install this package:

https://login.salesforce.com/packaging/installPackage.apexp?p0=04tA0000000Rv4x

 

 

Or you can create your own. The key is, it has to be a managed package with a namespace.

 

In the package there's a class SimpleCalss:

 

public class SimpleClass{

    public PageReference blankAction(){
        return null; 
    }
}

And a simple component that uses the class: 

<apex:component controller="SimpleClass" access="global">

    test
    <apex:form >
        <apex:commandButton action="{!blankAction}" value="NOOP" />
    </apex:form>

</apex:component>

 If you create a page in the organization that you installed the manage package in that uses the component like this:

 

<apex:page showHeader="false" sidebar="false">
        <body>
            <mpackage:SimpleComponent />
        </body>
</apex:page>

 

Then view the page and execute the blank action on the page you'll get an mpackage.SimpleClass not visible error.  

 

I have a case open with support (05605800) that went to R&D and they've told me this was also the case in spring 11. I can't prove that it wasn't since I no longer have access to a spring 11 organization but I know for certain that this worked in Spring. 

 

Just wanted to see if anyone else had noticed this behavior

 

Thanks!

Scott

 

MayTheForceBeWithYouMayTheForceBeWithYou

I realize this is an old post so you probably have already figured this out, but try changing the class to be defined as global instead of public-that should do the trick.