CHUVASH.eu

CHunky Universe of Vigouros Astonishing SHarepoint :)

Resetting SharePoint Search Configuration Cache

Now it is the second time it happens that the search cannot return any results. This hickup is rare but it happens. To solve it I had to follow these steps:

  1. Stop the Timer Service
  2. Clear the configuration cache
    1. Find in \ProgramData\Microsoft\SharePoint\Config the folder where the file cache.ini exists
    2. Delete every file from this folder EXCEPT cache.ini
    3. Open cache.ini, delete the content and put ’1′ (without the quotes) in it and save the file
  3. Restart the Timer Service
  4. Index reset
  5. Full crawl

Source: ITIDea. The linked blog post saved my afternoon today. Thank you, Anita Boerboom.

Why Swedish matters

I Sverige är engelskan är väldigt stark. Speciellt i IT-branschen är vi vana att ha i princip allt på engelska, från kommentarer i koden till stora upphandlingar, rapporter och dokumentation. Trots det ser jag ett stort behov av att kunna prata om IT på svenska. Det gäller både lokala företag och globala företag. Det finns flera anledningar:

  • Företag i Sverige följer svenska lagar som är skrivna på svenska, för att leva upp till kraven ska man kunna formulera sig på svenska.
  • Modersmål eller det språk som man använder mest i vardagen (gäller mig bland annat) är den snabbaste vägen för kommunikation som ger en högre grad av nyansering. Att kunna nyansera krav och önskemål tidigt i projekt är guld värt (enligt många av mina korrespondenter). Man behöver spendera mindre tid på att formulera och tolka krav.
  • En mer ideologisk anledning (men en viktig sådan) är att vi som bor i Sverige har skyldighet att utveckla och hålla svenskan levande, inte minst inom IT-sektorn.

Svenska är en stor möjlighet för att verkligen ge mervärde till våra kunder, möta dem på hemmaplan, prata ett gemensamt språk.

Startpunkten till den här diskussionen har varit en ny webinar som jag planerar hålla den 14 april kl 10. Webinarens titel är SharePoint i molnet.Det finns ganska mycket information om SharePoint Online och Office 365 på engelska. Det är dock ganska sparsamt med information på svenska.

https://www.eventbrite.com/e/sharepoint-i-molnet-tickets-15976529229

Det här är det som väntar dig som vill delta i webinaren:

Intresset för SharePoint Online och Office 365 växer allt mer. Vad behöver man tänka på när man ska använda SharePoint i molnet, vilka är fördelarna och vilka är nackdelarna.

I den här webinaren pratar vi även om skillnaderna mellan SharePoint Online och SharePoint 2013. Vi bjuder in till en webinar med öppen diskussion för era frågor.

Den här webinaren är för er som:

– Vill veta mer om SharePoint Online.

– Vill lyssna och diskutera det på svenska.

– Vill höra om andras erfarenheter och tankar kring det.

Detaljer om hur man deltar i webinaren kommer lite senare.

Publishing Visio drawings as SVG

svg-004

In my post yesterday I showed how to publish Visio files as html image maps. That was one of the alternatives. Today I’ll present how to use SVG to achieve the same goal: publish Visio diagrams in SharePoint without having the Enterprise license. There are some alternatives:

  1. Show Visio diagrams as pdf files on SharePoint Pages
  2. Embed Visio diagrams as html image maps – Read more in my previous blog post
  3. Embed Visio diagrams as svg pictures – This blog post.
  4. Link to Visio files that are opened using Visio Web Viewer in a new browser tab.

SVG

SVG stands for scalable vector graphic, it is a xml-based format for defining images. It is supported in all modern browsers. Because SVG can be part of a page markup, it can be easily embedded into SharePoint.

Visio

In Visio you can save a drawing as SVG. Thanks to my smart colleague: Dan Saeden. So the process of exporting and embedding a drawing is almost the same as for an image map. An improvement is that you don’t have to update the html markup and you don’t need to upload or base64-encode any pictures. It’s all in the markup (DOM). See some screenshots below.

Advantages and Disanvantages

Compared to image maps and other methods, we get following advantages:

  1. It is scalable (not pixelish) – you can show it in a small screen, and a big screen.
  2. Only markup is needed (xml), no need for uploading images
  3. No additional bandwidth is required for downloading images to the browser
  4. No need for updating html structure, easier to explain how to do it.

There are also some disanvantages:

  1. Complex SVG files increase the DOM complexity and it may affect the performance in browser
  2. No support for older browsers: In IE8 it won’t work

svg-000

How to

Use your drawing of choice:

svg-001

Save it as an SVG file:

svg-002

Add a Script Editor Web Part to a page and paste the content of the svg file (open it in a text editor):

svg-003

That’s it:

svg-005

Summary

Visio files can be exported to many different formats. SVG is a great modern html standard for graphics that acts as a part of the DOM. It still requires a manual process of exporting and putting it on a SharePoint page, but it is a good way to make it modern, fast and even responsive (with some additional css). Editors don’t need to adjust the markup, only copy it.

Publishing Visio diagrams as html image maps

imagemap-014

I got a question from a customer: We have our processes defined in Visio, we don’t have SharePoint Enterprise CALs to use the Visio webpart. We have links in process maps. What can we do?

Well there are three five ways to solve this business need:

  1. Find money for SharePoint Enterprise – Very expensive
  2. Show Visio diagrams as pdf files on SharePoint Pages – Expensive.
  3. Embed Visio diagrams as html image maps – Least expensive
  4. Embed Visio diagrams as svg pictures – Separate blog post.
  5. Link to Visio files that are opened using Visio Web Viewer in a new browser tab.

If the business needs other features available only in Enterprise, just use the solution 1. Stop reading.

If you are looking for alternatives, then consider pdf and image maps. I have seen projects where pdf files were embedded in the SharePoint Pages. It required a pdf plugin in IE, a lot of time to make it look the same in different browsers and the scroll and fixed size was still there. It was expensive because of the development and configuration time.

In this blog post, I want to show the alternative number 3: embedding Visio diagrams as html image maps. This is only a Proof-of-concept so far.

Image Maps

Image maps are an old html fellow that can contain links on an image. Links can be connected to areas using coordinates. During a brainstorming session, we thought: what if we define image maps using Gimp or some other graphic tool. This manual procedure is not good when it is time to update the diagrams: it will require a lot of manual work to keep it up to date. So we need to be able to export a Visio diagram to an image map.

Visio

Actually Visio lets you export a diagram as an image map. All you need is to save it as as web page. Just to demonstrate I created a simple drawing:

imagemap-001

Then I added a hyperlink to a shape:

imagemap-002

Then I saved it as a web page:

imagemap-003

Getting the actual image map

The web page that Visio creates, is a frameset:

imagemap-004

So the actual content (the image map) is inside the _files folder:

imagemap-005

You can find the filename of the image map html by reading the main page (Process-Main.html in my case). Usually it is png_1.html (for the first Visio page):

imagemap-006

In the page where you want publish the process diagram, add a script editor webpart (or a content editor webpart):

imagemap-007

Edit snippet, as usual:

imagemap-008

Now you have to copy image tag and the map tag from the html:

imagemap-009

Paste it into the Script Editor:

imagemap-010

The image tag points to an image that is present in the same folder: png_1.png. We can upload it to a library and update the src attribute. In my case, to test it quickly, and because my image is not big, I’ll create a base64 string of that image using an online tool – dataurlmaker:

imagemap-011

Update the src attribute in the Script editor webpart:

imagemap-012

That’s it, now we have an image map, a drawing that has clickable elements with links to subprocesses:

imagemap-013

Summary

This is a proof-of-concept that I will share for publishing Visio drawings as html image maps. It works even in SharePoint Foundation (!). The publishing and republishing involves these three steps:

  1. Save a Visio file as a webpage (for new and updated files)
  2. Copy html parts to a SharePoint page
  3. Update the image reference

The steps are not aimed for end users. But given that you have clear instructions and guidelines how to publish drawings in SharePoint, even editors with basic knowledge about html can do it. This approach lets you keep Visio files as the source and update the process pages in SharePoint quite easy.

Next step

If this method works in a real environment, next step would be to create a tool for automatic conversion of Visio files to image maps.

Struggling with Taxonomy in CSOM

The parts of the CSOM for updating Taxonomy fields are really cumbersome. I mean, look at this code, nicely provided by Vadim Gremyshev (@vgrem). To set a value in a taxonomy field we have to assemble a text representation, and adding a “fake” lookup id.

What is needed is a wrapper for handling Taxonomy fields. SPMeta2 and PnP don’t seem to have it yet.

Another issue that I have struggled with today was the missing Microsoft.SharePoint.Client.Taxonomy.dll. If you see this error (set customErrors=”Off” in the Web.config), then you have update the reference in the Visual Studio project:

missingtaxonomy-002

Open Properties for the reference called: Microsoft.SharePoint.Client.Taxonomy and ensure that Copy To Local is set to True:

missingtaxonomy-003

For some reason, this reference added through “App for SharePoint Web Toolkit” nuget package adds a reference to an assembly from your computers GAC.

A new Chuvash keyboard layout

The Chuvash keyboard layout has been the Russian keyboard layout with 4 Chuvash letters that are typed by pressing the right Alt button plus the base letter. Some of the arguments have been

  1. Users don’t need to switch or learn a new keyboard layout. They can keep on typing Russian texts and sometimes Chuvash texts
  2. It is easy to communicate about how the right Alt button works. The Right-Alt-technique is also used in Esperanto, Polish and other languages.
  3. The letters are placed according the labels

Recently two major events happened that made the question about the Chuvash keyboard layout important:

  1. We are working on a Chuvash keyboard for iOS. There we have less place and we have to remove rare Russian letters from the first keyboard screen. There are no physical labels. So we can rethink the whole keyboard.
  2. chuvash.org finally moved from latin equivalents with diacritic marks to Cyrillic letters (Cyrillic extended script). Therefore we need to update users’ keyboard layouts

I’ll write a separate post about the Chuvash Keyboard for iOS. One of the important things we made during that work was to find the frequency of the Chuvash letters. This was used to design the keyboard layout.

Here is the most recent version of the keyboard layout (first screen):

cv-kbd-ios

These are the principles for placing the letters:

  • The most used letters are in the middle.
  • Consonants and vocals come after each other. We tried to avoid many consonants after each other.
  • The letters are often in the same area as in the Russian keyboard layout (but it is not so important)

Now to the physical keyboard

When it is possible on a virtual keyboard, wouldn’t it be worth trying on a physical keyboard? Knowing the “best” layout, we can implement it for a physical keyboard. Let’s do it for xkb. xkb is a keyboard system for Linux. I wrote a few articles on that topic.

Many minority languages in Russian use the Russian keyboard layout plus their Cyrillic letters instead of numbers (Bashkir, Udmurt, Kalmyk) or Right-Alt-combinations (Chuvash, Sakha, Komi…). Two other languages have their own keyboard layouts for primary keys: Tatar and Ossetian. Ossetian language has only one extra letter. The Tatar alphabet contains a few more. Let’s look at the Tatar keyboard layout for xkb:

tatar-xkb-kbd

The Tatar keyboard layout uses their letters on the primary keys and puts the Russian letters in the Right-Alt-combinations. It allows:

  • A quicker typing in Tatar
  • And access to Russian letters, because they are part of the official Tatar alphabet, but they are only used in Russian loanwords. The placement of those rare Russian letters are the same as in the Russian layout (except that they are accessible by pressing the Right-Alt button).

Now the Chuvash keyboard layout for Linux and Windows is as follows:

chuvash-xkb-kbd

When I use it, I always press the Right-Alt, because the ӑӗҫӳ in Chuvash are very common. So the Right-Alt is not an exception, rather that a regular typing behaviour. Some Chuvash frequently used Chuvash letters (х, й, э) are placed too from the middle. Some rare letters (ф, ц, ж, о, г, щ) are too “near”.

So let’s change it. If we just take the keyboard layout designed for iOS and put the rare Russian letters “behind the Right-Alt button”, then we’ll get this:

chuvash-xkb-kbd-2015

This keyboard layout will demand some time to learn, but once learned, it will provide

  • a better and quicker typing in Chuvash,
  • less pain in the right thumb,
  • and, perhaps, less Russian loanwords caused by laziness.

Regarding the learning, it could be facilitated using keyboard stickers, printed for Chuvash keyboards. Here is how Russian stickers look like:

The xkb code for the new Chuvash keyboard layout

// Chuvash Keyboard Layout that is organized according the letter frequency of Chuvash
// Author Anatoly Mironov @mirontoli
// Last changes: 2015-01-03
partial alphanumeric_keys
xkb_symbols "cv" {
    include "ru(winkeys)"

    name[Group1]= "Chuvash";

    key.type[group1]="FOUR_LEVEL";


    key <AD01> {[ U04F3,  U04F2 ]}; // ӳ
    key <AD02> {[ Cyrillic_shorti,  Cyrillic_SHORTI, Cyrillic_tse,     Cyrillic_TSE ]}; // й, ц
    key <AD03> {[ Cyrillic_u,       Cyrillic_U ]}; 
    key <AD04> {[ Cyrillic_ka,      Cyrillic_KA ]}; 
    key <AD05> {[ Cyrillic_ie,      Cyrillic_IE ]}; // е, ё
    key <AD06> {[ Cyrillic_en,      Cyrillic_EN ]}; // 
    key <AD07> {[ U04D7,            U04D6 ]}; // ӗ
    key <AD08> {[ Cyrillic_ha,      Cyrillic_HA ]};
    key <AD09> {[ Cyrillic_sha,     Cyrillic_SHA, Cyrillic_shcha,   Cyrillic_SHCHA ]};
    key <AD10> {[ Cyrillic_ze,      Cyrillic_ZE ]}; 
    key <AD11> {[ Cyrillic_ghe,     Cyrillic_GHE ]};

    key <AC01> {[ Cyrillic_be,      Cyrillic_BE, Cyrillic_ef,      Cyrillic_EF ]}; 
    key <AC02> {[ Cyrillic_yeru,    Cyrillic_YERU ]}; 
    key <AC03> {[ Cyrillic_ve,      Cyrillic_VE ]}; 
    key <AC04> {[ U04D1,            U04D0 ]}; // ӑ
    key <AC05> {[ Cyrillic_el,      Cyrillic_EL ]};
    key <AC06> {[ Cyrillic_a,       Cyrillic_A ]}; 
    key <AC07> {[ Cyrillic_er,      Cyrillic_ER ]}; 
    key <AC08> {[ Cyrillic_o,       Cyrillic_O  ]   };
    key <AC09> {[ Cyrillic_pe,      Cyrillic_PE ]   };
    key <AC10> {[ Cyrillic_e,       Cyrillic_E, Cyrillic_zhe,     Cyrillic_ZHE ]}; 
    key <AC11> {[ Cyrillic_de,      Cyrillic_DE ]};     

    key <AB05> {[ U04AB,            U04AA ]}; // ҫ
    key <AB06> {[ Cyrillic_i,       Cyrillic_I ]};
    key <AB07> {[ Cyrillic_te,      Cyrillic_TE ]}; 
    key <AB08> {[ Cyrillic_softsign,Cyrillic_SOFTSIGN, Cyrillic_hardsign,Cyrillic_HARDSIGN ]};
    key <AB09> {[ Cyrillic_yu,      Cyrillic_YU ]}; 

    include &quot;level3(ralt_switch)&quot;
};

Windows

To create a custom keyboard layout for Windows is easy, but it is hard to contribute to Windows official releases. We only need to install the Microsoft Keyboard Layout Creator.

This is how the new Chuvash Keyboard layout looks like in Windows (Chuvash 2015.1)

chuvash-win-kbd-normal

chuvash-win-kbd-shiftl

chuvash-win-kbd-altgr

Dead keys

Creating a Russian Extended Keyboard Layout

In my spare time I am currently working on a Chuvash-Tatar phrasebook. I have used the Chuvash and Tatar keyboard layout on Linux. They work fine, but switching between them takes time. So I decided to add Tatar letters (right Alt + combinations) to my Chuvash keyboard layout. While adding it I found a combined Russian-Ukranian United keyboard layout and I thought:

  • What if I create a new keyboard layout for Russian that will have almost all additional Cyrillic letters? A Russian Extended keyboard layout could be based on the Russian keyboard layout and have other non-Russian letters.

This is what I have come up to so far. The definition can be found on my project at github: russian-extended-kbd. I will update it more and provide more info about how it is organized and how to install it. I’ll also try to implement it for Windows and maybe for Mac (I doubt it, everything is so locked-down there).

rux-xkb-kbd

This is just a proof-of-concept so far. It only works on Linux (with xkb). Nevertheless, some key characteristics of this layout:

  • It has all the letters of Russian, Erzya, Moksha, Chuvash, Udmurt, Mari (Meadow and Hill Mari), Bashkir, Tatar and other languages of the Russian Federation and other countries.
  • It provides powerful dead keys for (breve, diaeresis, double acute, macron) for composing multiple Cyrillic non-Russian letters
  • It is not as quick as “native” keyboard layouts, but you can type text in many languages without switching the keyboard layout.
  • It has many other characters that are not present in the Russian standard keyboard layout for editing in wiki, markdown and other formats: [ ] { } ~, mathematical symbols: ≈ ÷ ∞ ° ‰ ≤ < > ≥ × •
  • It leaves the numbers. Compared too many other keyboard layouts (see below), this layout does not “steal” the number row. You still can type numbers as usual.

Dead keys

As I mentioned above, dead keys is a powerful feature for composing letters. It is harder to write, but the layout can cover many letters.

These dead keys work

diaeresis ӱ ӥ ӓ ӟ ӝ ӹ ӧ ӵ ӛ ё ї ӫ
double acute ӳ
breve ӑ ӗ ў й
macron ӣ ӯ

These do not work for now (but maybe in future):

cedilla ҫ ҙ
bar ғ ұ
hook ң ҳ қ

So many variants of similar letters

A big challenge in creating a Russian Extended keyboard layout is the fact that languages use different letters for the same sounds (meaning similar sounds).

  • /œ/ is ө (Tatar, Bashkir, Sakha…), and ӧ in (Altay, Udmurt, Mari…)
  • /y/ is ӳ (Chuvash), ӱ (Mari, Altay, Khakas), ү (Tatar, Bashkir, Sakha)
  • /ŋ/ is ҥ (Altay, Sakha, Mari), and ң (Tatar, Bashkir, Khakas, Khanty)

Well, the sounds are not the same, but they are similar. The Swedish Ä is not the same as the German Ä either. If we had a more united Cyrillic script, it would be easier to create a keyboard layout and to read and learn each others’ languages.

The letters from different languages are compare in my Google document.

Some “Native” keyboard layouts of the minority languages of the Russian Federation

chuvash-xkb-kbd

udmurt-xkb-kbd

mari-xkb-kbd

komi-xkb-kbd

kalmyk-xkb-kbd

bashkir-xkb-kbd

ossetian-xkb-kbd

sakha-xkb-kbd

tatar-xkb-kbd

 

 

Other Cyrillic keyboard layouts (outside the Russian Federation)

ukrainian-xkb-kbd

belarusian-xkb-kbd

tajik-xkb-kbd

bulgarian-xkb-kbd

kazakh-xkb-kbd

mongol-xkb-kbd

 

Chuvash localization

Recently I wanted to add Chuvash localization to the jQuery UI datepicker. Unfortunately, my pull request was rejected. The reason is that jQuery UI will be using Globalize framework:

Selection_003

The jQuery Globalize framework relies on CLDR, so

What is Unicode CLDR (Common Locale Data Repository)?

The Unicode CLDR provides key building blocks for software to support the world’s languages, with the largest and most extensive standard repository of locale data available. This data is used by a wide spectrum of companies for their software internationalization and localization, adapting software to the conventions of different languages for such common software tasks

Today there is no Chuvash locale in the CLDR project. So it it is time to add it.

I have filed a ticket on CLDR.

Other Chuvash localization projects

A Chuvash locale exists in a couple of projects:

Code

Just to be complete, here is the Chuvash locale for jQuery UI datepicker that I wanted to add:

/* Written by Anatoly Mironov (@mirontoli). */
(function( factory ) {
	if ( typeof define === &quot;function&quot; &amp;&amp; define.amd ) {

		// AMD. Register as an anonymous module.
		define([ &quot;../datepicker&quot; ], factory );
	} else {

		// Browser globals
		factory( jQuery.datepicker );
	}
}(function( datepicker ) {

datepicker.regional['cv'] = {
	closeText: 'Хуп',
	prevText: '<Кая',
	nextText: 'Мала>',
	currentText: 'Паян',
	monthNames: ['кӑрлач','нарӑс','пуш','ака','ҫу','ҫӗртме',
	'утӑ','ҫурла','авӑн','юпа','чӳк','раштав'],
	monthNamesShort: ['кӑр','нар','пуш','ака','ҫу','ҫӗр',
	'утӑ','ҫур','авн','юпа','чӳк','раш'],
	dayNames: ['вырсарникун','тунтикун','ытларикун','юнкун','кӗҫнерникун','эрнекун','шӑматкун'],
	dayNamesShort: ['выр','тун','ытл','юнк','кӗҫ','эрн','шӑм'],
	dayNamesMin: ['Вр','Тн','Ыт','Юн','Кҫ','Эр','Шм'],
	weekHeader: 'Эрне',
	dateFormat: 'dd.mm.yy',
	firstDay: 1,
	isRTL: false,
	showMonthAfterYear: false,
	yearSuffix: ''};
datepicker.setDefaults(datepicker.regional['cv']);

return datepicker.regional['cv'];

}));

Update multi-value lookup column values in SharePoint 2010 using managed CSOM

Anatoly Mironov:

Reblogging this useful code sample for updating multi-value lookup columns using CSOM in C# in SharePoint 2010, but also valid for SharePoint 2013.

Originally posted on Bin's Dev Notes:

I received a task that needs to update multi-value lookup column value in SharerePoint 2010 using C#.  While it is easy to set columns of simple data types, with lookup column it is a bit more complicated.  Searching Web gives me following link which is helpful. However, that only works with single value column.   After a bit trial and error, I worked out following code that is functioning.

View original

Bypass all custom jslink

bypasscustomjslink-001

Client Side Rendering (CSR) and jslink are great for customizing lists and forms in SharePoint. In my current project we use it a lot of it. A disadvantage of that path, although, is that it might occur javascript errors, during the development phase, but also in production. We do, of course, our best to leverage the best jslink code, but unfortunately we have to live with the fact that errors can occur, especially when we use it for NewForm, EditForm, DisplayForm and View (in list and grid).

If an error occurs, it won’t stop the rest of javascript (it is wrapped in try and catch by SharePoint), but the fields will still not function as intended. It can also be some “corrupt” or old data in the field value that will “break” the jslink code.

I would like to suggest one little fix, an idea I’ve come up to in my jslink-heavy project:

Use a custom url parameter to stop all custom jslink execution.

The query string parameter can be called bypasscustomjslink=true

In every custom jslink, start with this line of code:

That’s it. If you have this in place, you can just manually add this to your url in browser:

?bypasscustomjslink=true

or

&bypasscustomjslink=true

Then all the customized fields and views will be uncustomized until bypasscustomjslink=true is removed. While viewing and editing list items in this uncustomized mode, you can access and repair data as if you never had adjusted it with jslink.

Using this does not mean you can “relax” and start writing crappy code. You still have to produce good code and anticipate all possible errors. bypasscustomjslink is just a convenient “emergency exit” aimed for developers and support to quickly solve problems without needing to reset the JSLink property on fields and list views.

Discovering SharePoint

And having fun doing it

Bram de Jager's SharePoint blog

My view and thoughts on SharePoint.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

The Zuul Cat Idea Brewery

Where ideas on software development and entrepreneurship brew.

Paul J. Swider

Inspire! Teach! Awe!

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Alexander Ahrens

MCPD | SharePoint | Web Development | JavaScript | .NET

Cameron Dwyer | SharePoint, Outlook, OnePlaceMail

OnePlaceMail, SharePoint, Outlook & Life's Other Little Wonders

.:paul.tavares:.

Me and My doings!

Share SharePoint Points

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan.com

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

Follow

Get every new post delivered to your Inbox.

Join 265 other followers