Skip to content

Incorrect WebPart version when partial load applied after click on back in browser #8913

@salascz

Description

@salascz

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • SPFx version: 1.15.2, 1.16.1

Describe the bug / error

Hello,
I have found a weird behaviour of partial page load for cases when you are working with different versions of the webpart.

Imagine you have a WebPart stored in tenant app catalog. The WebPart is in version v1. There is a quite long process to get the WebPart updated to new version in my company, so we are using Site application catalog to "override" the tenant version (e.g., v2). This is working perfectly when you working on same site or when you perform full reload - the site version (v2) of the script is loaded and WebPart is rendered correctly.

Imagine you have a link on the WebPart page that redirect users to other site, where the WebPart is used in v1 (loaded from tenant catalog). The v1 version of the WebPart is rendered correctly.

The issue occurs when the user use "Back" button in the browser to return to previous page (pointing to the site with v2 version of the WebPart) -> SharePoint use partial load (e.g., header is not refreshed), there seem to be 2 versions of the webpart script loaded and the tenant version (v1) wins :-( -> the webpart is not rendered correctly

It does not look like an issue on our side (I am experiencing this issue with quite well known "Modern Script Editor WebPart" or "PnP Modern Search" webparts

Thanks

Steps to reproduce

  1. Open a page with webpart (version v2, site app catalog)
  2. Click on the link pointing to page on another site using different version of the webpart (version v1, tenant app catalog)
  3. Click on "Back" button in the browser
  4. WebPart on page (from step 1) is not rendered correctly (version v1 from tenant is used instead v2)

Expected behavior

It should use the webpart script from site collection app catalog (at it would use after the page refresh)

Metadata

Metadata

Assignees

Labels

area:spfxCategory: SharePoint Framework (not extensions related)status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active work

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions