You need to sign in to do that
Don't have an account?
Anyone having issues with actionStatus after summer09 upgrade?
Is anyone else encountering strange behavior with the actionStatus tag in their pages? I have a page that has several of these components and since the upgrade over the weekend they have become very finicky. Sometimes they work and sometimes they don't.
I am trying to build a simple example to reproduce but it has been difficult.
Thanks,
Jason
Did you see the release notes? There was a change though I'm not sure how that could cause intermittent issues.
The related snippet from the Summer '09 release notes:
New ID Generation for <apex:actionStatus> and <apex:panelBarItem>
The document object model ID generation for the <apex:actionStatus> component has changed. Now, the ID is
prepended by the IDs of any container tags.
Does that affect your usage in a negative way? Please do post a sample case if you can isolate it.
I don't see that causing any issues as this is the way I am using it:
<apex:commandButton value="Do something!" action="{!doSomething}" status="animate"/>
<apex:actionStatus id="animate">
I am now able to reproduce this issue. Unfortunately it is on a fairly large and complicated page, reproducible none the less.
The problem is definitely pointing to the page API version as here is what I have discovered so far.
- The page (maybe pages, I haven't checked any others) in question was on API 15.0. Changing this to 16.0 appears to fix the issue in the few quick tests I performed.
- I first tried to change the API version with the Force.com plugin but was given the error: Duplicate ids have been detected: '_viewRoot:status'. Not sure what this means as I don't have any ids like this.
- I next tried to change the API version through the UI editor and it saved fine with no errors. The page then works. Changing it back to 15.0 I get the finicky behavior once again.
That should give you a good start. I will continue to try to create a small example and if I can't do this quickly I will open the case as is.
-Jason
There may still be some issues with actionStatus ids but here is the general idea.
I think you may have been among the several people complaining a few releases ago that you couldn't put an actionStatus component inside of a custom component, and use that custom component in a page more than once, because you would get a duplicate id error. What was happening was that actionStatus was not building up it's id consistent with the rest of the Visualforce components (with a hierarchy, etc.) We fixed this in the new release, but versioned the fix so the ids are getting generated differently in 16.0. The idea is that if your page or component referencing the actionStatus component is in version 15.0, you should still get the old behavior.
However, it's best to use version 16.0 for your pages, components, and pages containing components that contain actionStatus (if that makes sense) because the actionstatus id generation is different between releases. 16.0 is doing it the right way, 15.0 is wacky. I think there may be some more work that needs to be done here, but again I strongly suggest moving to 16.0 for anything that's going to need an actionStatus component.
Not sure why there's a difference between using the plugin vs. the UI. Are you sure you're editing a page and not a component? Because API version is not a supported field for components in the current release of the IDE. (I think there is a new one coming out soon-ish but actually have no idea about the schedule).
Here we go!
<apex:page controller="status" sidebar="false">
<apex:form>
<apex:pagemessages />
<apex:commandButton value="Search" action="{!getRecords}" rerender="table"/>
<apex:pageBlock >
<apex:pageBlockButtons location="top">
<apex:actionStatus id="sorting">
<apex:facet name="start">
<apex:outputText value="Show me!!!!!!!"/>
</apex:facet>
</apex:actionStatus>
</apex:pageBlockButtons>
<apex:outputPanel id="table">
<apex:pageBlockTable value="{!opps}" var="o">
<apex:column >
<apex:facet name="header">
<apex:commandLink value="Opportunity Name" rerender="table" action="{!doSomething}" status="sorting"/>
</apex:facet>
<apex:outputField value="{!o.Name}" />
</apex:column>
</apex:pageBlockTable>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
public with sharing class status{
public List<Opportunity> opps {get; set;}
public void getRecords(){
opps = [select Id, Name from Opportunity limit 10];
}
public void doSomething(){
system.debug('hi');
}
}
Always start with a clean browser refresh.
Issue 1:
Set page to API 15
Click search, then the header opportunity name, no actionStatus
Change page to API 16 and repeat, actionStatus shows
Issue 2:
Set page to API 15
Click the header, actionStatus works!
Click the header again, tricks! It does not work.
Change to API 16 and repeat, actionStatus works every click
Hint: Remove <apex: pagemessages/> component and you will have no issues with API 15.
That was fun,
-Jason
pageMessages should have no affect on this at all. I will have to look into this.
So are you still seeing issues with saving, or dupe ID messages with the markup you just provided?
The IDE does not give me the duplicate Id error when trying to change the API version with the markup above.
Honestly, I wasn't too focused on the saving issue as there was a simple fix by saving in the UI. My main focus was identifity the rerender issue. I'll see if I can find a simple example of the save issue.
Should I open a case for this stuff?
Here is a very simple example to reproduce the save issue.
<apex:page >
<apex:actionStatus id="sorting"/>
<apex:actionStatus id="searching"/>
</apex:page>
With the force.com IDE, editing the page-meta.xml file, change the API from 15.0 to 16.0 and you should receive: Duplicate ids have been detected: '_vewRoot:status'
Opening a case now.
Case # for actionStatus issue: 02731218
Case # for IDE save issue: 02731079
Mark
I was updating the version to 16.0 on my pages using the Salesforce UI and just got the same error. I don't think it's an IDE issue. The only thing I did was change the version to 16 and click Save.
Error: Duplicate ids have been detected: '_viewRoot:status'
[edit] interestingly enough, my other pages updated fine. Then I went back and tried this page again and it updated fine. Intermittent problem of some kind.
Also the status behavior is different (sometimes) whether I'm using the status attribute within commandButton or as an actionSupport tag.
Mark
In regards to the, Duplicate ids have been detected: '_viewRoot:status' error, my case status is now 'Bug Fix Submitted'. I have no other info, cause, work arounds, ETA for fix, or if it is related to the actionStatus problems.
- Jason
The cause has to do with the versioned id change to actionStatus. It's not getting the version correctly in some places. I am working on a fix for this right now, not sure why it says the fix has been submitted. Only workaround is to bump everything on your page up to 16.
This is (currently) my highest priority so stay tuned...
Thanks for the update Jill.
Yes, this is one of the issues with the current case/bug process. Cases are marked as Bug Fix Submitted (I think this is the only option available to the support reps) when really they are more like Bug Identified / Confirmed.
I wish switching to 16 was an option, but that breaks the partial refresh capability in IE. So at present I'm living with the actionStatus problem since it's by far the lesser of two evils.
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=14118
I've submitted a fix for the actionStatus issues and expect it will be fixed tonight. Of course that schedule can always change, but just wanted to give a heads up.
MarkL, please check your private messages with regards to your case.
Edit: of course I jumped the gun on this, the fix is not quite complete
I just updated the page that was having issues to 16.0 and it deployed fine. Page has multiple actionStatus componenets and they all appear to be working after a few quick tests.
Thanks again and have a good weekend,
Jason