Archive for month: March, 2016

TFS 2015 Upgrade to Update 1 failed (VS402388 / TF401147)

08 Mar 2016
March 8, 2016

Recently I tried to upgrade a TFS 2015 installation for a client to Update 1. Because I did not find a solution in the internet (even with the error code TF401147), it’s time to blog about a solution.

Installation of Update 1 – VS402388 / TF401147

The installation of update 1 worked perfectly: In the first place I installed it because we wanted to move TFS to a more performant server and I installed the new server with TFS 2015 Update 1. Once I tried to connect the new server with the configuration database it told me that the database is old and I need to update it. Well, let’s just update the old server I said to myself (lessons learned here, trust me!) – installed, rebooted server during lunch time and run the upgrade wizard. It stopped because it could not create the IIS site hosting TFS:

I checked IIS and the site was not there anymore. IISReset and deleting all app pools – same result. Removing the IIS role from the server – same result. Then I focused on the server certificate, it was in the cert store but expired on 12.01.2016 – mhh… changed the system clock back to 11.01.2016 – same result. So i was stuck.

Always have a ‘Plan B’ – and backups!

Luckily, as mentioned, the final goal was to move TFS to a new server. So I did the upgrade of the configuration database on the new server and installed the application tier there – changed the URL and at least the web interface was back and people could continue working. Did I mention that I was super happy that I created backups before?

Getting help!

Once an error occurs within the TFS installation or upgrade you are requested to send the zipped logs to tfcare@microsoft.com – and I did so.

TFCARE

I was really surprised to get a reply within 20 minutes – not an automated one as I expected, Vladimir Khvostov replied instantly. After explaining my problems and verifying that the IIS is really empty, Vladimir told me to delete  C:\ProgramData\Microsoft\Team Foundation\Configuration\SavedSettings\ApplicationTier   and try again:help from vladimir

And that worked, thanks again Vladimir!

If that happens again with Update 2 (I am really awaiting that one!), I won’t even hesitate to send a line to those awesome guys!

Bootstrap and SharePoint Online – how to avoid css ricochet

04 Mar 2016
March 4, 2016

In my current project I had the challenge to improve the user experience for some pages without messing too much with the MasterPage (because you shouldn’t, right?). The client explicitly requested components like accordions, responsive tables and more control of the page alignments. So what would be easier to use a mobile first, responsive made by the @twitter guys? Apparently SharePoint Online does not like bootstrap too much – one you add the css files, you will see notable changes.

In this post I show you how to fix that.

Bootstrap and SharePoint OnlineBootstrap

 

Bootstrap (currently 3.3.6 and shortly 4.0) brings a lot of nice components that can be embedded within a standard SharePoint Page. Its not end-user friendly, an editor needs a least basic html skills to use it – but if you can use it, its fairly easy to improve the user experience. And because the twitter guys are really smart (and their css skills are way better than mine) it even works decently on mobile devices.

You can simply (that was my first attempt) add the css tag to a page:

On the basic team site landing page I found at least 5 changes:

twitter bootstrap overrides the SharePoint css

twitter bootstrap overrides the SharePoint css

  1. the heading has an increased font size and the position has changed
  2. the title of a webpart has an increased font size
  3. the paginator icon is displaced
  4. the search icon of a doclib is displaced.
  5. the full screen icon is gone

How to restrain/scope bootstrap?

At first I thought its rather easy, just change a couple of lines within bootstrap and you should be good to go. Right, that took actually longer than the good solution – I stopped and googled. I found a solution on stackoverflow from 2012 – and guess what – it still works. In order to to that you need to do the following:

  1. Install nodejs
  2. Download the twitter bootstrap source code and unzip it
  3. Open the nodejs command prompt
  4. Install grunt-cli with the following command

  5. Switch to the twitter bootstrap directory
  6. Open the bootstrap.less file in the less folder and wrap every @import with:

    1.  

      Bootstrap-wrap

      Wrap everything – dont forget the closing } down below.

  7. Now switch back to the node command prompt. Change to the bootstrap directory.
  8. Run npm install to install missing packages

    1. Install missing packages with npm-install

      Install missing packages with npm-install

  9. Run grunt dist to compile your new css

    1. grunt-dist to compile your new scoped css

      grunt-dist to compile your new scoped css

       

  10. Et voila – then you have your perfectly scoped css in the folder dist/css:
    1. Scoped bootstrap

      Scoped bootstrap

       

Now you only have to upload this file to SharePoint Online (e.g. a style library) and either reference it within a Script Editor Webpart (your add it to your MasterPage if you are brave enough!). If you want to use it, you have to add the class “bootstrap” before:

add the bootstrap class in the first element or just wrap everything with a div

add the bootstrap class in the first element or just wrap everything with a div

And the you can use twitter bootstrap without jeopardizing your SharePoint Online look and feel:

twitter bootstrap without impact

twitter bootstrap without impact

 

The SASS way

If you want to do the same thing with the current version of bootstrap (and bootstrap 4 once its out), then you can simple download the SASS version:

Then open the _bootstrap.scss file with your favorite editor and wrap the imports with a class:

Compile the sass and check the css:

The sass approach took me like 5 minutes with VS Code – awesome.

If you have read it so far…

If you want my pre-compiled version, please take it from here (version 3.3.6, use on your own risk!).

And then leave a comment 🙂

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close