function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
thunksalotthunksalot 

Accumulation of development mode footers?

I have noticed that when I use a custom button to call a visualforce page that does some work via a custom controller class before returning the user to the original page (the one on which they clicked the button), that I end up with an accumulation of development mode footers.  See screenshot here  Do I need to do something special when the pageref is returned at the end of my custom controller work such that the development mode footer closes?

 

In the screenshot linked above, I've navigated to four different Opportunities and clicked my custom button, thus resulting in 4 development mode footers all piled up.  It doesn't seem to matter what I go on to do after I click the custom button, the development footer doesn't go away.  The only way that I've found to get rid of the footers when so many have accumulated that it's bothersome is to close the tab completely and start with a fresh tab.  Something tells me there has to be a better way.

aballardaballard

sounds like a bug. 

thunksalotthunksalot

Okay, can you help me find the bug?  

 

Here's my VF Page:

 

<apex:page standardController="Opportunity" extensions="newTransactionController" action="{!autoRun}">
  <apex:sectionHeader title="Creating New Transaction Record"/>
  <apex:outputPanel >
      <p><strong><span style="color:red">Could Not Process Check</span></strong></p>
  </apex:outputPanel>

</apex:page>

 

 

Here's my controller:

public class newTransactionController {
 
    // Constructor - this only really matters if the autoRun function doesn't work right
    private final Opportunity o;
    private String errorMsg1 = '';
    public newTransactionController(ApexPages.StandardController stdController) {
        this.o = (Opportunity)stdController.getRecord();
    }
 
    // Code we will invoke on page load.
    public PageReference autoRun() {
 
        String theId = ApexPages.currentPage().getParameters().get('id');
 
        if (theId == null) {
            // Display the Visualforce page's content if no Id is passed over
            return null;
        }
 
        for (Opportunity o:[select id, name, ChargentSFA__Charge_Amount__c, Check_Date__c, Check_Number__c, Check_Received_On__c from Opportunity where id =:theId]) {
            if(o.Check_Date__c == null || o.Check_Number__c == null || o.Check_Received_On__c == null || o.ChargentSFA__Charge_Amount__c == 0){
                return null;
            }            
            ChargentSFA__Transaction__c checkPayment = new ChargentSFA__Transaction__c();
            checkPayment.ChargentSFA__Opportunity__c = o.id;
            checkPayment.ChargentSFA__Amount__c = o.ChargentSFA__Charge_Amount__c;
            checkPayment.Check_Date__c = o.Check_Date__c;
            checkPayment.Check_Number__c = o.Check_Number__c;
            checkPayment.ChargentSFA__Payment_Method__c = 'Check';
            checkPayment.RecordTypeId = '012A0000000plkxIAA';
            checkPayment.ChargentSFA__Response_Status__c = 'Approved';
            checkPayment.ChargentSFA__Type__c = 'Charge';
            insert checkPayment;
        }
 
        // Redirect the user back to the original page
        PageReference pageRef = new PageReference('/' + theId);
        pageRef.setRedirect(true);
        return pageRef;
 
    }
    
}
 

 

 

 

aballardaballard

no, I meant a bug in visualforce, not in your code. 

thunksalotthunksalot

oh, interesting!  Are others experiencing this behavior?  

 

For me, it happens in Chrome 17.0, Firefox 10.0 and Safari 5.1.2 (all on Mac Snow Leopard).

 

Where does one report a bug like this?  Surely, if it is a bug, someone has already reported it.  So, is there a place where I can look to see if it's already been reportes, like the way you can see things that have already been suggested on the IdeaExchange?

admintrmpadmintrmp

You would think that Salesforce would be aware of it actually. It's a pretty obvious bug and quite annoying when you are developing.

 

Vote for the idea - https://sites.secure.force.com/success/ideaView?id=08730000000h7g0AAA