Css injection on SharePoint breaks termstoremanager

Copper Contributor

Hi, 

 

Have anyone else noticed that when injecting custom css file to SharePoint and then try to use "Term store management" (../_layouts/15/termstoremanager.aspx), e.g using custom sorting on managed navigation the page, breaks to blank page with console errors.

 

Chrome console gives multiple errors like "Cannot read property 'id' of null" which is coming from termstoremanager.js. On termstoremanager.js there is a function called Microsoft_SharePoint_Taxonomy_TermStoreManager$$5u_1 which breaks when trying to get some element from hardcoded index 0. 

 

Term store management works fine if css injection is removed.

4 Replies
How Are you injecting the CSS?
Using site UserCustomActions.
That would be strange do you have a example code?
It happens if you just inject "empty" css file with some comment on it.

I think it breaks the page cause css injections are added to body element, instead of head. Termstoremanager breaks cause body DOM has changed.