chrishasz / spgo

SPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
https://www.chrishasz.com/spgo
MIT License
60 stars 11 forks source link

Changes not being sent to sharepoint #137

Open SaintsMan76 opened 3 years ago

SaintsMan76 commented 3 years ago

Note: for support questions, please use stackoverflow and tag the post with #spgo.

SPGO: Populate local workspace works but editing then saving or adding files are not saved to sharepoint. Tried with multiple sites and not working.

SaintsMan76 commented 3 years ago

More behaviour is that the source file is checked out but is never updated or republished.

Opening the edited page shows the page open for editing but in original state.

No error in VSCode

chrishasz commented 3 years ago

Hello @SaintsMan76 - in your spgo.json file, what is the current value of the publishingScope property?

SPGo supports three 4 different values for this:

  1. None - No server changes when you save locally.
  2. SaveOnly - only attempts to save the file to the server, but does not check the file in or publish the file.
  3. Minor - Publishes a minor version of the file
  4. Major - Publishes a major version of the file

You can read more at the documentation page here

Finally, what happens when you manually publish a file by left-clicking the file and selecting the SPGO > Publish <Major|Minor> Version option?

SaintsMan76 commented 3 years ago

Hi Chris i found the issue.

I had to modify a setting on my sharepoint site • Open Sharepoint online management shell • Connect-SPOService -Url "https://xxx-admin.sharepoint.com" -Credential $userCredential • Log in with user with sharepoint admin role should allow MFA support • Run o set-sposite "https://xxx.sharepoint.com/sites/MySite" -denyaddandcustomizepages $false

I was then able publish and update changes. Apologies but I couldn't find this in setup documentation.

roschinsky commented 3 years ago

Hey folks,

Had the same issue as @SaintsMan76 and was able to fix it by setting DenyAddAndCustomizePages to $false on the site in question.

chrishasz commented 3 years ago

@roschinsky good catch! Thank you for posting this potential solution!

@SaintsMan76 - is your issue still resolved? I think it would be good for me to add a troubleshooting/faq page to the documentation for issues like this.

roschinsky commented 3 years ago

@chrishasz: actually @SaintsMan76 brought up that workaround. just wanted to confirm the approach. ;)

chrishasz commented 3 years ago

Ack! You are correct. So much for my morning reading comprehension.