SPFX 1.8 navigatedEvent not firing and pageContext not updating when navigating between lists/libraries
Category
- [X] Bug
Expected or Desired Behavior
When navigating between lists/libraries, the pageContext should update. Also the navigatedEvent for application customizers should fire.
Observed Behavior
In spfx 1.8 the pageContext is not getting updated when navigating between lists/libraries. The navigatedEvent for application customizers is not getting fired!
Steps to Reproduce
Create a simple application customizer and add a navigatedEvent in the onInit. Deploy the solution and navigate between lists/libraries. See the event not getting fired and the pageContext not getting updated.
@override
public async onInit(): Promise<void> {
this.context.application.navigatedEvent.add(this, this.navigatedEvent);
}
private navigatedEvent() {
console.log("navigatedEvent fired");
}
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
thanks for reporting the bug, One thing to clarify: Are you in First release tenant or running as First release user? The reason I'm asking is that we recently pushed out a new flight which only rolled out in FR to improve listview experience, which might contain rough edges like this that we'll fix soon. If this repro only in FR, chances are it's related to the flight. If not, then it's something else that we can look into further.
I can confirm that this Bug is only in FR tenants. I just created a new demo tenant (not in FR) and everything seems to be working fine there. Either way, this is clearly a bug that you should look at. Right now this is a big blocker for us.
Thanks for the reply. Yes we've identified the issue related to the flight and working on a fix as we speak. Stay tuned, we expect to fix this issue early next week. Once we roll out the new build I'll let you know.
Perfect, Thx! Looking forward for the fix!
@rchendev and @lucabandMSFT any updates on this one? We really need the navigatedEvent to fire when navigating between lists and libraries.
And one more with the same issue... https://github.com/SharePoint/sp-dev-docs/issues/4557
Any update on this issue? Currently we are using SPFx 1.10.0.
Any update on this bug?
The issue had been fixed a long time ago. But now it is broken again. I think it relates to this issue: https://github.com/SharePoint/sp-dev-docs/issues/6198
I am also experience this issue in an ApplicationCustomizer built with spfx 1.11.0
This issue has been present since at least early 2020 and has persisted until today. It can be observed by simply looking at _spPageContextInfo. When the page transition fails, _spPageContextInfo doesn't change. It happens all the time, we just don't notice it because people stopped using the onnavigated event and turned to other means to detect pages changes and context.
Sorry for the long delay. The issue should be fixed by now.
Please, let us know if it's still valid on your tenant(s).
Thanks!
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within the next 7 days of this comment. Please see our wiki for more information: Issue List Labels: Needs Author Feedback & Issue List: No response from the original issue author
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within the next 7 days of this comment. Please see our wiki for more information: Issue List Labels: Needs Author Feedback & Issue List: No response from the original issue author
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues