Error Saving JavaScript Files to SharePoint Mapped Drive – Minor Version Overload

Can't save JavaScript file from Sublime Text

This is a first. I was editing away in Sublime Text today and suddenly I couldn’t save my code to the mapped S: drive I was using in SharePoint 2013. S: is for SharePoint. Get it?

The error message on the PC side wasn’t all that helpful, as one might expect. (Sorry for the crappy captured image.)

Can't save JavaScript file from Sublime Text

The files I’m editing are stored in:

http://[Server Name]/sites/[Site Collection Name]/_catalogs/masterpage/_[Client Name]

I’ve found that putting all of my project artifacts in that one location works well because I can easily copy and paste from one environment to another, as needed. I have a folder per artifact type, such as

Master Pages, html, js, css, Display Templates, Page Layouts

etc. I know someone is going to tell me what a horrible idea that is, but it’s not horrible if it works. And it works.

I’m editing within a virtual machine in VMWare Workstation running Windows 8.1 because I can’t connect to the client’s VPN with Windows 10. I originally was using a HyperV VM, but when I installed the production release of Windows 10, that went defunct on me, too. (Yeah, all that’s a mouthful.) Given all that, a restart of the VM seemed like a good idea.

No joy.

The next thing I thought of was that the disks might be full on the SQL server. I’ve seen that wreak all sorts of havoc in the past. But my admin buddy told me everything was humming along and healthy.

My next move was to download SharePoint Designer onto the VM and try editing the files there.

Aha! When I tried to save my edits, I got this message, which I had never seen before:

Minor version limit exceeded

Because my files are in the _catalogs/masterpage folder, we inherit versioning and Check In/Check Out. That’s a good thing because I can always restore an older version if something dreadful happens.

Clearly this has been a project with a lot of Ctrl-S action. It turns out that I had 510 minor versions on one file, and that’s the limit. Nada mas.

Too many minor versions

As soon as I published a major version (in this case, the magical 1.0), I was back up and running.

Yeah, I probably should clean out all those old versions at some point, but disk is cheap.

BTW, this is a really cool project where I’m using KnockoutJS, KO,mapping, fontawesome, jQuery, jQueryUI, jQuery.cookie, fullcalendar, MomentJS, and more. It gets us a pretty and highly useful veneer over basic SharePoint functionality to match the business needs as exactly as possible.

Simple Expand/Collapse for the Quick Launch in SharePoint 2013 or SharePoint Online

Yesterday I helped my pal Marcel Meth (@marcelmeth) with a pretty simple little task, but everything’s simple if you know how to do it! We needed to add simple accordion-like expand/collapse functionality to the Quick Launch on the pages in a Site Collection. Because there were going to be a lot of links in the Quick Launch (mostly links to different views of lists), it was getting pretty cumbersome to wade through. By adding this expand/collapse capability, we could improve the user experience (UX). It’s little stuff like this that makes SharePoint usable. Never underestimate the power of a small tweak like this.

This code works on a Team Site on SharePoint Online in Office365 with its Quick Launch exposed in the normal way. Any other customization you have in place may interfere with this working. (Yadda, yadda, disclaimer, YMMV, etc.) I’m sure it will work for you – possibly with some tweaks – in any SharePoint 2013 or SharePoint Online site. You can add this script to a single page or to the master page if you’d like it to work on all pages in the Site Collection.

// Find all the top level links in the Quick Launch that have children
var topLevelLinks = $("div[id$='QuickLaunchMenu'] > ul > li:has('ul') > a");

// Prepend the little "twiddle" icon to each top level link
topLevelLinks.prepend("<span class='ms-commentexpand-iconouter ql-icon'><img alt='expand' src='/Comm/Comms2/_themes/1/spcommon-B35BB0A9.themedpng?ctag=2' class='ms-commentexpand-icon'></span>");

// We're starting with all of the sections collapsed. If you want them expanded, comment this out.
topLevelLinks.closest("li").find("> ul").hide();

// Set up for the click even of on the top level links {

  // We're going to stop the default behavior

  // Find the elements we need to work with
  var childUl = $(this).closest("li").find("> ul");
  var isVisible =":visible")

  // If the section is visible, hide it, and vice versa
  if(isVisible) {  

    // Replace the icon with its antitheses
    $(this).find(".ql-icon").replaceWith("<span class='ms-commentexpand-iconouter ql-icon'><img alt='Expand' src='/Comm/Comms2/_themes/1/spcommon-B35BB0A9.themedpng?ctag=2' class='ms-commentexpand-icon'></span>");
    // Hide the child links by sliding up. Note: You could change the effect here.

  } else {

    // Replace the icon with its antitheses
    $(this).find(".ql-icon").replaceWith("<span class='ms-commentcollapse-iconouter ql-icon'><img alt='Collapse' src='/Comm/Comms2/_themes/1/spcommon-B35BB0A9.themedpng?ctag=2' class='ms-commentcollapse-icon'></span>");
    // Show the child links by sliding down. Note: You could change the effect here.



Using the SharePoint Color Palette Tool to Create Customized Composed Looks

At the great SharePoint Evolution Conference last week, someone – I wish I could remember what session it was! – mentioned this great little tool. It helps you to create a very detailed theme for SharePoint 2013. You can save the file into a .spcolor file, which you can upload to the Theme Gallery in your SharePoint Site Collection.

Go to the Microsoft Download Center to grab the SharePoint Color Palette Tool. It’s a quick download and install. Once you have it loaded and launch it, you’ll see this:

The color palette tool provides color palette functionality for use with SharePoint designs.

SharePoint Color Palette Tool

In my example below, you can see an example of a customized theme. I found a photo of the lovely Sonya Koptyev (@SonyaKoptyev) presenting at SPC last year to use as my background and I made one other small color change to the suite bar. Then I saved the file as Sonya.spcolor.

The Sonya Color Palette

The Sonya Color Palette

Next we upload the .spcolor file to the Themes Gallery. (Site Settings -> [Web Designer Galleries] Themes) In this case, I uploaded my .spcolor file to the 15 folder because it’s built for that version (2013) of SharePoint.

Theme Gallery

Theme Gallery

Once you’ve uploaded your new palette file, you can create a new Composed Look with it (Site Settings -> [Web Designer Galleries] Composed looks). The image below shows all of the out-of-the-box Composed Looks.

The Composed Looks Gallery contains all of the looks designed for your Site Collection.

Composed Looks Gallery

When you create a new Composed Look, you specify a Master Page URL, a Theme URL, an Image URL, and a Font Scheme URL. The combination of these components make up a Composed Look.

In the screenshot below, you can see how I’m creating a new Composed Look using my Sonya.spcolor file.

Sonya Composed Look

Sonya Composed Look

Once I’ve saved the new Composed Look, I can apply it to my site ((Site Settings -> [Look and Feel] Change the look). After I select my new Composed Look, voila! A quick new look for my site!

Previewing the Sonya Composed Look

Previewing the Sonya Composed Look

But wait. “Where’s my background image?”, you’ll probably ask. I certainly did.

The background image you select in the SharePoint Color Palette Tool doesn’t automagically get saved in the .spcolor file. That’s what the Image URL is for in the Composed Look. So upload that image (in my case, the lovely Sonya presenting) and add the URL to it in the Image URL for your Composed Look.

Adding the Sonya image to the Composed Look

Adding the Sonya image to the Composed Look

And now: voila for real!

Previewing the Sonya Theme on my Team Site

Previewing the Sonya Theme on my Team Site

The SharePoint Color Palette Tool is just a v1.00 tool, but it seems to work reasonably well. Let’s hope that Microsoft builds something like this right into the UI rather than keeping it a separate tool.

By the way, the reason I still have the image of Sonya presenting is that I love the quote she had in her slide:

"The world hates change, yet it 
is the only thing that has 
brought progress." 
Charles Kettering



Upcoming Bonzai Intranets Webinar – Wednesday November 26th at 10am PST

DynamicOwlLogoMy good friends at Dynamic Owl in Vancouver have been doing some amazing things of late. Not only are they some of the smartest people in SharePoint consulting, they have a relatively new product offering called Bonzai Intranet.

Based on their years of consulting, the folks at Dynamic Owl realized that they had been building similar capabilities for their client’s Intranets over and over again. By capturing those patterns and repeatable components, they have come up with a tool set in Bonzai that can get anyone up and running with an Intranet on top of SharePoint faster and more effectively.

But that’s not the half of it. I’ve been looking into their offering; from the surface at first, and then more deeply as they take me through the architecture. This is a gorgeous Intranet offering. By gorgeous, I mean is simply looks fantastic. Of course, that could all be lipstick on a pig, but it isn’t. As I’ve seen how they have built things, I’m truly impressed. It’s the right mix of server side code and client side code, with a slant toward the latter, as it should be in this cloudy world of ours. It’s extensible, robust, and reliable, too.

There’s a post on Michal Pisarek’s blog about the webinar, and I’ve stolen some of that content below. If you’re considering using SharePoint to run your Intranet and see it as a daunting set of tasks, you owe it to yourself to check out Bonzai and the webinar on Nov. 26th.


As part of the recent launch of Bonzai Intranet for SharePoint we have been receiving many questions about Bonzai such as:

  • What is the difference between Bonzai and a template/skin?
  • How the hell did you make Bonzai not look like SharePoint?
  • What is the 80% of common Intranet functionality that most organization have? How does Bonzai handle these?

In order to provide you with the answers to these questions and to show you a sneak peek at some of the great features of Bonzai we are hosting a webinar on Wednesday November 26th at 10am PST titled “Rethinking SharePoint Intranets with Bonzai”  In this webinar we will go through our thinking behind Bonzai and take a look at some of the features that we think makes Bonzai an amazing Intranet platform.

Requesting Your SharePoint “UI Hacks”

I am putting together a presentation talking about UI hacks that we all need to do in order to accomplish everyday UI customizations that our customers – internal  or external – require. For this one I want to limit it to SharePoint 2013 and/or SharePoint Online (Office365). Another way to think of it is how and why we brand SharePoint today on premises and in the cloud; not just things that people want cosmetically, necessarily, but stuff that is hard to do and must be done.

I’d like to collect ideas from all of you out there, which I will collate into some slides (with credit given, of course!). I posted a quick tweet about this and already got a few replies, so I figured a blog post would be a good way to gather information as well.

In thinking about this, I’ve come up with some broad buckets:

  • Inconsistencies
  • Documentation Gaps
  • Document Object Model (DOM) Changes
  • Missing Functionality (Oft Requested)

I’ve already got a few items of my own in each of those categories, but I’d like the presentation to be representative of what we all have to deal with, not just me. If you think I’m missing a bucket, let me know your ideas on that, too.

Let’s use this post’s comments to capture as much as possible. If you’d rather email me directly, you can use the Contact form. When I have a decent amount of content collected, I’ll come up with a way to share it on some level. (The actual purpose of this is classified.)

Thanks for your help on this.