Tag Archives: sp2010

Edit mode panel does not render at all on system pages

18 Jul

This one is a pretty odd one.

we had the need to emit some different css based on if a page was in edit mode or in display mode on a recent project, and so we put two edit mode panels on the master page.

one with PageDisplayMode set to display.. and the coresponding HTML that we wanted to render..

and another edit mode panel set to edit that renders the other one.

Now, keep in mind there are only two settings for that flag. display or edit.

Worked great, went to our pages, detail pages, list pages, web part pages etc.. edited the page.. and all the changes we expected to see were there and happy.

Now, I repeat, keep in mind there are ONLY two settings for that flag. display or edit.

We then went to a system page, view all site content or site settings.. and the branding/design was ALL kinds of messed up? what gives?

As it turns out, the edit mode panel for some reason.. rendered nothing.

neither edit mode panel was rendered. Which I would have *assumed* would have been impossible since we had a panel configured for every possible option. and Since this was the same master page everything else was using.

and so since this is SharePoint.. my assumptions were wrong.

So there is either a secret third option? or some weird change that only the system pages make.

I don’t know, we ended up finding another approach that did not use edit mode panels.. but this was something I could not find any blog posts about.

So heads up. Edit model panels.. on master pages.. don’t render at all on certain system pages.

 

Misleading VS message trying to deploy a solution

17 Jun

I was working on a SP2010 project and working from a box I did not build, and I was getting the following error when trying to deploy my solution:

Error occurred in deployment step ‘Recycle IIS Application Pool’: Cannot connect to the SharePoint site: http://xxx/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project

I thought, That’s odd I am pretty sure I am a local admin.

Double checked, sure enough I was, I should be able to do an IISreset.

So I pulled up a command line and was in fact able to successfully run an IISreset. But still was getting this error from VS.

I saw some threads that indicated I may need to also be a site collection Admin in order to do the IISreset from VS during a deploy. So I checked, I was a site collection admin, but still was getting the error from a VS deploy.

For fun I thought lets close and restart Visual Studio, no help. Restart the box, no help.

Did a little more digging and came across this thread.

http://mushannak.blogspot.com/2013/02/error-occurred-in-deployment-step.html

That was it, the local DB did not have my account as the owner on the content database.

Changed that and I was able to successfully deploy, no thanks to that error message though.