Tuesday, February 5, 2013

Ipad 2 stuck in landscape mode after update to iOS6.1

[Edit - New Solution]
The issue came back, but I searched the webs some more and fixed it. Seem it was a hardware issue with a stuck gyro. I set the iPad upright on a table with the screen showing upside down. Lifted it and banged it semi-hard to the table, and voila, the screen rotated back to normal.

[Original Post]
Yes, I have an iPad, and it works just fine. Basically it’s my son’s home entertainment system.
Not sure if the iPad got stuck in landscape mode and wouldn’t rotate the screen right after the update or later… but solving it was “easy” once I figured out how.
There’s a lot of posts on how to do this with resetting the settings and hard boot, but none of it solved it exactly for me.
This is how I did it (works on my machine ™)
  1. Set the side switch to act as a lock screen orientation button
  2. Lock the screen orientation and make sure the pad lock symbol is showing
  3. Hold the iPad in portrait mode
  4. Do a hard reset pressing the home button and power switch at the same time for 10 seconds, release both when the apple appears and ignore any turn off slider screen
  5. The iPad should now reboot in portrait mode
  6. Toggle off the side switch, and the padlock icon should disappear
  7. Twirl your iPad and the screen orientation should again work

Importing terms with Ampersand (&) to Managed Metadata

When working on populating the term store in SharePoint 2013 with some data from a CSV file via PowerShell I encountered a weird issue with ampersands.

Importing works just fine, but when running the script the second time where it should not create nodes already existing, it still tried to re-add all terms with an ampersand in them.

Reading the post SharePoint 2010 Managed Metadata Import Ampersand by David Winchurch explains that ampersands are getting unicode encoded during import, hence comparison with the non-unicode version will fail.

Fortunately there is a helper method TaxonomyItem.NormalizeName which will trim consecutive spaces to one as well as encode ampersands, and it works equally well in 2013 as in 2010.

You gotta love all the special quirks in SharePoint Open-mouthed smile

Monday, February 4, 2013

Issue with creating a copy of seattle.master in 2013 using SharePoint Designer

I’m working on a project and wanted to prototype my master page by copying seattle.master to a custom one.

I fired up SPD, located the Master Pages folder, selected seattle.master, right-clicked and chose copy, than paste into a new copy. This gave me a file named seattle_copy(1).master. Next step is to rename it, and that’s when you get a nice error message:
“Server error: This file may not be moved, deleted, renamed, or otherwise edited”.
This message is typically presented when you have files attached to the master page, which I don’t as I just made a copy. So I can’t rename it, I can’t delete it. The old 2010 trick of moving it to a folder doesn’t work either.