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

NoComponentId error

Open veeramanx opened this issue 8 years ago • 5 comments

I am trying to create modern page and add web parts programmatically through extensions. when i run the code for the first time page is getting created succesfully and webparts are added to it. however, when i delete that page and re-run the code i am getting NoComponentId error.

image

I am not sure what went wrong. Please let me know if you have any idea.

veeramanx avatar Mar 26 '18 09:03 veeramanx

Maybe that error refers to the ClientSideApplicationId column in the library where the page is hosted. It might get emptied during your process of recreating the page.

frevds avatar Apr 14 '18 13:04 frevds

Hello @veeramanx and thanks for your feedback. Have you tried following frevds' advice? This error seems to come from the lack of an application id in the list item.

If this is not the case, would you mind sharing a few details on what does your code do?

mpasarin avatar May 14 '18 22:05 mpasarin

Check the URL parameters as well. This error is caused when using the URL parameters "List" or "ID". ClientSidePages must not be called with these parameters in the URL (if you plan to make a custom form page where SharePoint redirects to your page, you need to have an intermediate page renaming those parameters, extremely stupid, this). They interprete this in a non-standard way as the page being in a different document library specified by List and being the document item with the specified ID (even though this mechanism exists, it is not possible to host ClientSidePages anywhere else but in the SitePages library, at least if you want to edit them, they always get published/saved there).

frevds avatar May 15 '18 10:05 frevds

Closing this issue as frevds has provided steps to solving the problem and there has been no activity since then.

mpasarin avatar May 30 '18 18:05 mpasarin

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