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

Unable to view webpart properties for projects Scaffold using Yeoman 2.0.6 and SharePoint 1.8.2

Open jnimmala opened this issue 7 years ago • 20 comments

Category

  • [ ] Question
  • [ ] Typo
  • [ x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

Hi - For the webpart projects Scaffolded by using yo 2.0.6 and microsoft/sharepoint 1.8.2, we're unable to view webpart property pane. On gulp serve, we're able to view the property pane, but upon deploying the solution we have this issue. We don't see any error on the console.

Please let me know if you need additional info.

Thank you for your time !

jnimmala avatar Jun 21 '19 14:06 jnimmala

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

msft-github-bot avatar Jun 21 '19 14:06 msft-github-bot

Could you provide additional information as it's not clear... you mean when the web part has been deployed & installed, when you put the page in edit mode & select the web part edit on the left-margin of the web part, the property pane does not exist?

Can you provide additional context about your environment... SharePoint Online / onprem (2016 / 2019), browser, etc?

Can you share screenshots of what exactly happens?

andrewconnell avatar Jun 22 '19 09:06 andrewconnell

thanks @andrewconnell !

Yes, please see below img. This is a simple hello-world solution (yo 2.0.6, microsoft/sharepoint 1.8.2, SharePoint Online) deployed and installed. Upon adding webpart to the page, property pane does not exist. Also, no errors in console.

image

In SharePoint Framework v1.8 release notes (https://github.com/SharePoint/sp-dev-docs/wiki/SharePoint-Framework-v1.8-release-notes), it has been mentioned that property pane code is moved to a different package (@microsoft/sp-property-pane). But yeoman generator scaffolds solution with references to @microsoft/sp-webpart-base. Not sure if this is the issue here ?

Thank you for your time !

jnimmala avatar Jun 24 '19 14:06 jnimmala

It was moved in SPFx 1.8... that only applies to SharePoint Online targetted solutions. You did pick SharePoint Online for your environment when creating the project? If you created it and selected the target being a SharePoint Server onprem option (2016 / 2019), everything is still in the @microsoft/sp-webpart-base as you're using SPFx 1.1 / 1.4.1 in those two environments which don't have that new refactoring.

But... if you selected SPO as the target & use that for your testing and see the above, something is wrong...

The console shows NOTHING? Can you be sure you don't have any filters configured to exclude certain message types. A blank console is definitely not right for SPO.

Please share:

  1. contents of package.json
  2. contents of .yo-rc
  3. contents of your web part code file

Please don't paste the files, please paste the CONTENTS of the files in your response & use code fencing formatting.

andrewconnell avatar Jun 24 '19 16:06 andrewconnell

Thanks again @andrewconnell ! Yep, I'm using SPO as the target. Please see below:

Package.json

{
  "name": "test-wp",
  "version": "0.0.1",
  "private": true,
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  },
  "dependencies": {
    "react": "16.7.0",
    "react-dom": "16.7.0",
    "@types/react": "16.7.22",
    "@types/react-dom": "16.8.0",
    "office-ui-fabric-react": "6.143.0",
    "@microsoft/sp-core-library": "1.8.2",
    "@microsoft/sp-property-pane": "1.8.2",
    "@microsoft/sp-webpart-base": "1.8.2",
    "@microsoft/sp-lodash-subset": "1.8.2",
    "@microsoft/sp-office-ui-fabric-core": "1.8.2",
    "@types/webpack-env": "1.13.1",
    "@types/es6-promise": "0.0.33"
  },
  "resolutions": {
    "@types/react": "16.7.22"
  },
  "devDependencies": {
    "@microsoft/sp-build-web": "1.8.2",
    "@microsoft/sp-tslint-rules": "1.8.2",
    "@microsoft/sp-module-interfaces": "1.8.2",
    "@microsoft/sp-webpart-workbench": "1.8.2",
    "@microsoft/rush-stack-compiler-2.9": "0.7.7",
    "gulp": "~3.9.1",
    "@types/chai": "3.4.34",
    "@types/mocha": "2.2.38",
    "ajv": "~5.2.2"
  }
}

.yo-rc

{
  "@microsoft/generator-sharepoint": {
    "version": "1.8.2",
    "libraryName": "test-wp",
    "libraryId": "91d21169-d336-4f97-9297-5140be63b6b8",
    "environment": "spo",
    "packageManager": "npm",
    "isCreatingSolution": true,
    "isDomainIsolated": true,
    "componentType": "webpart"
  }
}

Web part code

import * as React from 'react';
import * as ReactDom from 'react-dom';
import { Version } from '@microsoft/sp-core-library';
import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';
import {
  IPropertyPaneConfiguration,
  PropertyPaneTextField
} from '@microsoft/sp-property-pane';

import * as strings from 'HelloWorldWebPartStrings';
import HelloWorld from './components/HelloWorld';
import { IHelloWorldProps } from './components/IHelloWorldProps';

export interface IHelloWorldWebPartProps {
  description: string;
}

export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps> {

  public render(): void {
    const element: React.ReactElement<IHelloWorldProps > = React.createElement(
      HelloWorld,
      {
        description: this.properties.description
      }
    );

    ReactDom.render(element, this.domElement);
  }

  protected onDispose(): void {
    ReactDom.unmountComponentAtNode(this.domElement);
  }

  protected get dataVersion(): Version {
    return Version.parse('1.0');
  }

  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
    return {
      pages: [
        {
          header: {
            description: strings.PropertyPaneDescription
          },
          groups: [
            {
              groupName: strings.BasicGroupName,
              groupFields: [
                PropertyPaneTextField('description', {
                  label: strings.DescriptionFieldLabel
                })
              ]
            }
          ]
        }
      ]
    };
  }
}

Thank you for your time !

jnimmala avatar Jun 24 '19 18:06 jnimmala

Please edit your last post & look at the source, specifically how I fenced the code snippets you posted with the triple backticks so it was formatted nicely and made easy to read in github... use this next time you paste code please

What browser(s) / environment(s) are you using & have you tested this in?

Also, please answer my original question:

The console shows NOTHING? Can you be sure you don't have any filters configured to exclude certain message types. A blank console is definitely not right for SPO.

andrewconnell avatar Jun 24 '19 18:06 andrewconnell

sure thing. IE 11 shows 'No settings to change for this web part' in the property pane and Chrome has nothing (Win 7). Regarding console, I do have few entries but not sure if these are related to pane issue. Please see below:

image

jnimmala avatar Jun 24 '19 19:06 jnimmala

Have you run this on the local workbench?

Can you post the project you're doing this with to a public github repo and share the link here?

There are plenty of known issues with IE11 in SPO... issue list is filled with them. But not surprising as IE11 has issues all over the internet :)

The Chrome one doesn't make sense. The code above looks like a default project... I can't repro this...

andrewconnell avatar Jun 24 '19 19:06 andrewconnell

Yes, it is a default project. https://github.com/jashwanthreddyn/propertyPaneIssue/tree/master/testWP

jnimmala avatar Jun 24 '19 19:06 jnimmala

I have the same issue. Webpart that used to work fine now have this issue. Noticed it today but at my end it's only on a isolated SPFX webparts. Other SPFX webparts do show webpart properties. Tested in Chrome and Edge. When I open the webpart properties IFrame url in a seperate tab I see CORS error: cors error

SuleymanA avatar Jun 25 '19 11:06 SuleymanA

I see that @jashwanthreddyn also used an isolated webpart for his test project. I think the issue is related to that aspect.

SuleymanA avatar Jun 26 '19 05:06 SuleymanA

I am still experiencing this issue in all our tenants. @VesaJuvonen: any update or confirmation that this is a known issue?

SuleymanA avatar Jun 27 '19 05:06 SuleymanA

In IE 11, inprivate mode, I see the properties appear and disappear again followed by this message in the property page: "No settings to change for this web part.". Access denied error shown in the console after clicking on edit properties icon: image

SuleymanA avatar Jun 27 '19 05:06 SuleymanA

@andrewconnell any update please ?

jnimmala avatar Jul 01 '19 13:07 jnimmala

I have created a support ticket at MS referring to this issue. They confirmed that it is reproduce-able and said that a bug request was already created. Sounds like someone is looking at this issue.

SuleymanA avatar Jul 01 '19 14:07 SuleymanA

We are actively looking into this issue. Looking on the thread, seems that this only occurs on isolated web parts, but not when normal mode is used. Is this correct on what others are seeing based on your tests? Just to confirm the findings. At least @jashwanthreddyn 's web part is using isolated web part option in package-solution.json, which would explain why we are not getting more reports on this towards engineering.

Thanks for the confirmation advance.

VesaJuvonen avatar Jul 02 '19 08:07 VesaJuvonen

@VesaJuvonen, Looks like it's only me and @jashwanthreddyn that are facing this issue. Maybe not many people that are using isolated webparts or just didn't notice this issue because the webparts are already configured. At my end it's only for isolated wepparts. Webparts that for example have organisation wide api permissions, which are not isolated, are not affected.

SuleymanA avatar Jul 02 '19 09:07 SuleymanA

Hello Everyone,

Thank you for reporting the issue. This should be fixed now in the production as well. Whoever, is facing this issue, could you please re-test it? If you don't see the fix yet, wait for few minutes and re-try.

Also, I'm closing this issue, please feel free to open a new issue, if you see it not fixed.

Thanks, Sri

srideshpande avatar Jul 04 '19 02:07 srideshpande

Thx @srideshpande it is working in our tenants!

SuleymanA avatar Jul 05 '19 05:07 SuleymanA

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 24 '20 06:01 msft-github-bot