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

this.context.pageContext.site.id undefined in classic pages only

Open paulryan opened this issue 10 years ago • 5 comments

Category

[ X] Bug

Expected or Desired Behavior

Using the Reactjs template: this.context.pageContext.site.id is defined when testing against in a modern page using workbench.aspx but is undefined in a classic page.

Observed Behavior

this.context.pageContext.site.id should not be undefined in classic pages

Steps to Reproduce

Create a React web part that prints the value of this.context.pageContext.site.id to the console. Check that it works when the web part is hosted workbench.aspx. Bundle it as app to ship. Add the web part to a classic page. See that the property is null.

paulryan avatar Sep 08 '16 19:09 paulryan

Thanks Paul - you are absolutely correct.

patmill avatar Sep 08 '16 22:09 patmill

This is a known issue and should be fixed soon.

manishgarg1 avatar Sep 09 '16 15:09 manishgarg1

The issue was resolved with server side changes. It will take about two to three weeks before you will see the effect of the changes.

ghost avatar Oct 05 '16 18:10 ghost

Hi @paulryan, please let us know if this is still and issue.

manishgarg1 avatar Jan 29 '17 18:01 manishgarg1

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

msft-github-bot avatar Jan 30 '20 06:01 msft-github-bot