3

I have tried most of the suggestion I found on the searches and still can't edit the web part. I don't want to delete the entire web part as multiple users access the site daily. The problem is that I added some javascript in the body of the html and now the Page and Edit buttons do nothing. I just want to edit the web part and delete the javascript. I have tried ?contenst = 1, compatibility mode, etc. Nothing is working. Javascript just flashes when I click Page in chorme or firefox. I can edit the home/master page in designer, but it doesn't give me access to the html where the script is located.

1
  • I just did a version restore using Designer and it worked.
    – Bill
    Feb 21, 2017 at 1:04

2 Answers 2

0

You can try to trigger edit mode by entering the below in the end of your URL,

?ToolPaneView=2
2
  • I just tried and the screen just flashed back to the main page and the Page button does nothing when clicked.
    – Bill
    Feb 20, 2017 at 23:09
  • Well I was able to work through it. I just did the version restore using Designer and deleted the script.
    – Bill
    Feb 21, 2017 at 1:04
0

Doing contents=1 would delete the entire web part which isn't what you'd want. If the script is making the page unresponsive or generally degrading the experience, then this may be your only recourse.

To fix it though, depends on how the script was implemented. If it is JS embedded into the page, then you need to open the page in SharePoint Designer and then be able to modify the script.

If the JS is stored as a separate JS file and linked in the CEWP, then go to the location where the file is stored and either download and edit it, or edit it in SharePoint Designer.

4
  • Well I've been trying for two days to use SharePoint Designer. It shows the home.aspx page, but doesn't show the part where the javascript is.
    – Bill
    Feb 20, 2017 at 23:08
  • The script is inside the body of the html. I usually put it in the heading. it seems like an extra character may be in there or something. I just need to delete the script completely.
    – Bill
    Feb 20, 2017 at 23:10
  • If you right click on the page in Designer and select Edit in Advanced Mode does it show up? It is unclear to me how you implemented the Javascript and how you manipulated it. Feb 21, 2017 at 0:54
  • That only showed things like RibbonCommand, contentplaceholderId, etc. I needed the entire html code. But as mentioned I just reverted to a previous version. Nothing else worked. Thanks
    – Bill
    Feb 21, 2017 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.