sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFX 1.8 navigatedEvent not firing and pageContext not updating when navigating between lists/libraries

Open OliverZeiser opened this issue 7 years ago • 16 comments

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");
}

OliverZeiser avatar Apr 25 '19 08:04 OliverZeiser

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Apr 25 '19 08:04 msft-github-bot

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.

rchendev avatar Apr 25 '19 16:04 rchendev

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.

OliverZeiser avatar Apr 26 '19 06:04 OliverZeiser

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.

rchendev avatar Apr 26 '19 06:04 rchendev

Perfect, Thx! Looking forward for the fix!

OliverZeiser avatar Apr 26 '19 06:04 OliverZeiser

@rchendev and @lucabandMSFT any updates on this one? We really need the navigatedEvent to fire when navigating between lists and libraries.

OliverZeiser avatar Aug 16 '19 12:08 OliverZeiser

And one more with the same issue... https://github.com/SharePoint/sp-dev-docs/issues/4557

OliverZeiser avatar Aug 29 '19 11:08 OliverZeiser

Any update on this issue? Currently we are using SPFx 1.10.0.

dipesh-wadhwa avatar Jul 23 '20 12:07 dipesh-wadhwa

Any update on this bug?

DanyLaco avatar Sep 10 '20 17:09 DanyLaco

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

OliverZeiser avatar Sep 11 '20 08:09 OliverZeiser

I am also experience this issue in an ApplicationCustomizer built with spfx 1.11.0

tsdexter avatar Jan 29 '21 22:01 tsdexter

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.

jchilde avatar Jan 29 '21 23:01 jchilde

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!

AJIXuMuK avatar Sep 27 '21 16:09 AJIXuMuK

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

ghost avatar Oct 04 '21 17:10 ghost

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

ghost avatar Oct 11 '21 19:10 ghost

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

ghost avatar Nov 03 '21 06:11 ghost