This project has moved. For the latest updates, please go here.

jQuery UI Theme not working

Jan 26, 2016 at 12:27 PM
I was tested solution in two different WEBAPP created in the same farm of sharepoint 2013 (on premises). In one of them I could change and apply new theme from gallery theme, but on second WEBAPP this functionality not working and I can't create properly for example Tab container.
Questions is - what features on site or WEBAPP is needed or what features block properly working solution. Interesting is that version 2014 in the second WEBAPP working OK.

Thanks for advise and best regards.
Coordinator
Jan 26, 2016 at 7:40 PM
There is no feature that would be a factor, SPEasyForms is entirely contained within a single SharePoint feature, so if SPEasyForms is working the themes should be working. In general, when you set the theme, the editor is just storing a path to the theme in the configuration file. So the first thing to check is the configuration file. The easiest way to check that is to click the Export button on the ribbon. This will open the configuration file in a separate browser tab. Scroll to the bottom and look for "jQueryUITheme". You should see something like:
"jQueryUITheme": "/sites/speasyforms/Style Library/SPEasyFormsAssets/~version/Css/jquery-ui-lilac/jquery-ui.css"
In the beta, you probably won't see ~version in the path, that's a bug I've fixed already, but you'll see 2015.01.beta in the path instead. Anyway, the only thing that should block loading the theme is if this path doesn't exist in SharePoint (i.e. go to your Style Library, navigate to Speasyformsassets, navigate to 2015.01.beta, and then jquery-ui-lilac, and you should see jquery-ui.css). Also, if the current user cannot access that path it won't be loaded, for instance if it is checked out or there are permissions preventing the user from getting there.

So check what path got saved and see if you can navigate to that path and open the CSS file. Either way, let me know what you find and I'll try and work with you.

Joe
Jan 27, 2016 at 8:30 AM
I was reinstall version 2014 to version 2015 in both WebApp and I noticed that in the both of this WebApp Style Library has folders with 2014 and 2015 versions.
But after reinstallation in one WebApp there is OK (export conf. file at the end has - "version": "2015.01.beta","jQueryUITheme": "/Style Library/SPEasyFormsAssets/2015.01.beta/Css/jquery-ui-redmond/jquery-ui.css")
, and in the second WebApp export configuration file at the end has still the same ("version": "2014.01") and button Apply theme in the Settings option doesn’t work. I try to import proper configuration file, but after press Done button doesn’t change.
If or how can I change it?
Best regards
Coordinator
Jan 27, 2016 at 12:56 PM
Edited Jan 27, 2016 at 5:43 PM
The Apply Theme button only applies the theme in the editor. You still need to hit the save button to save the configuration, after which the configuration should say

"version": "2015.01.beta"

or if you download the latest (which I did release last night):

"version": "2015.01"

If it says 2014.01 then it hasn't been saved with 2015.01 yet (i.e. the last time the configuration was saved was with 2014.01).

It can get confusing when you're switching back and forth between versions. Just check the About dialog for the version and then check the configuration file for the version. If they're out of sync, make a change in the editor (like move a field) just to get the save button enable, then change it back, and then save. After which the version number should match in the configuration file. There isn't any reason that it needs to match technically, a 2014.01 configuration will work just fine in 2015.01. However, a 2015.01 configuration easily may not work in 2014.01, because it may take advantage of many features that didn't exist in 2014.01.

Also, the reason I create a new directory for all of the files for each version is because SharePoint lets me lay down files with a Sandbox solution/module, but it does not let me update them or clean them up on uninstall. So if you've ever installed more than one version, you will have all of the files for each version unless you manually clean them up. But only the files for the currently activated version are being used.

Joe
Jan 29, 2016 at 7:36 AM
I was uninstalled all solution and deleted completely SPEasyFormsAssets folder from Style Library. Next I was installed new stable 2015 version. I noticed the same behavior: themes didn’t work, at the end of the export file was only text "version": "2015.01" without next line with jQueryUITheme information. I was pressed Save button after change theme, but nothing changed. After installed once again 2014 version all was OK, and what interesting all settings 2014 was remembered, even content of snippet section (I don't know how is it possible).

Interested there is the fact that when I was installed new stable version 2015 in second WebApp this version didn’t work at all, I couldn’t get even settings panel. But after installed not stable version 2015 all was OK.
Summarize – in one of my WebApp works only 2014 version, and in the second WebApp works only 2014 and 2015 not stable version. Maybe there is another place, not Style Library, with place not upgradeable from unknown reasons. I return with my suggestions, that maybe there is any setting features in Sharepoint WebApp caused this behavior,

Best Regards
Andy
Coordinator
Jan 30, 2016 at 12:41 PM
Edited Jan 30, 2016 at 12:43 PM
At this point I'm stumped. It sounds like the JavaScript is crashing on the second site for some reason. All you can do is try to identify the differences between those site collections. For instance, compare what features are activated between the two site collections; not just my feature, but all features. Like is one a publishing site and the other a team site? Does the second site have a custom master page? etc. If you can identify the differences, maybe I can reproduce the problem, but right now I haven't seen anything like what you're describing and I've been testing it for months.

You could also try launching the development tools if you know how, and see if there are maybe error messages in the console. Compare the results between the site that works and the one that doesn't, because there are almost always errors in the console on SharePoint pages even when everything appears to be working, so not all messages are significant.

Joe
Feb 1, 2016 at 11:00 AM
I overviewed site features and site collection features for this WebApp. Below there are lists with result of my searching (only features with active features, rest of features are inactive). First active info there is settings for WebApp1 (only version 2014 working), and the second active info there is settings for WebApp2 (only version 2015 stable NOT working).
Site Features
1.Access app – Active, Active
2.Automatic Mobile Browser Redirection – Inactive, Active
3.Community Site Feature – Active, Active
4.Following Content – Active, Active
5.Getting Started – Inactive, Active
6.Metadata Navigation and Filtering – Active, Inactive
7.PerformancePoint Services Site Features – Inactive, Active
8.SharePoint Server Enterprise Site features – Active, Active
9.SharePoint Server Publishing – Active, Inactive
10.SharePoint Server Standard Site Features – Active, Active
11.Site Feed – Inactive, Active
12.Site Notebook – Inactive, Active
13.Team Collaboration Lists – Active, Inactive
14.Wiki Page Home Page – Inactive, Active
15.Workflow TaskContent Type – Active, Active

Site Collection Features
1.Cross-Site Collection Publishing – Active, Active
2.Cross-Site Collection Permision – Active, Inactive
3.Disposition Approval Workflow – Active, Active
4.Document Sets – Active, Active
5.Library and Folder Based Retention – Inactive, Active
6.Limited-access user permission lockdown mode – Active, Active
7.PerformancePoint Services Site Collection Features – Inactive, Active
8.Publishing Approval Workflow – Active, Active
9.Reporting – Active, Active
10.Search Server Web Parts and Templates – Active, Inactive
11.SharePoint Easy Forms – Active, Active
12.SharePoint Easy Forms Add-Ons – Active, Active
13.SharePoint Server Enterprise Site Collection features – Active, Active
14.SharePoint Server Publishing Infrastructure – Active, Active
15.SharePoint Server Standard Site Collection features – Active, Active
16.Site Policy – Inactive, Active
17.Three-state workflow – Inactive, Active
18.Video and Rich Media – Active, Active
19.Workflows – Active, Active
20.Some Web Template features of exported web application (made for internal intranet) – Active, Inactive

Best Regards
Andy
Coordinator
Feb 1, 2016 at 3:36 PM
Great, it will take me a while to get a development machine setup for 2013 and test through each of these combinations, but I'll let you know if I find anything (hopefully late this week).

Joe
Coordinator
Feb 1, 2016 at 11:42 PM
I'm not sure yet if I've seen you're behavior exactly, but I did get a 2013 environment setup and I've seen some pretty strange behavior with themes, including that when it first came up there was clearly no theme applied, so everything looked pretty screwy. I did manage to get a theme applied, and once I did everything looked and acted as expected. Anyway, this doesn't seem exactly like the behavior you described, but I'm sure its all connected.

Unfortunately, my CloudShare environment was going away as I was releasing this as they are going over to new pricing plans, and I wanted to switch the account over to my company so I just let it expire. The result is that the final release may not have gotten the shake down on 2013 that it should have. I wasn't too worried about it because I've seen very few bugs in the last couple of years on 2013 that weren't also on SharePoint online, where I did do a lot of testing. Famous last words...

For now, I'm going to roll back the recommended release to 2014.01 until I sort this out, but since I can reproduce it that shouldn't take too long (although this is a nights and weekends thing for me, so too long could be a relative thing ;). Anyway, I'll keep you in the loop.

Joe
Coordinator
Feb 3, 2016 at 1:01 AM
Hi Andy,

Question: Are each of your site collections root site collections? i.e. are the URLs like:
https://sitecollectionname.do.main/
instead of the old 2010 form (and office 365) where everything is off of a managed path like:
https://do.main/sites/sitecollectionname
I ask because I've figured out what my problem is. The path to the CSS is constructed incorrectly in the root site collection (or any root site collection if there are multiple web applications). The reason is because I'm effectively concatenating the site collection relative url with the path to the CSS, so in a non-root site collection I end up with a path like:
/sites/<sitecollectionname>/Style Library/SPEasyFormsAssets/2015.01/Css/speasyforms.css
But in a root site collection, the path to the root site collection is just /, so my concatenation ends up looking like:
//Style Library/SPEasyFormsAssets/2015.01/Css/speasyforms.css
Which is very, very bad, programmer no donut ;). The browser looks at the leading double slash as a protocol neutral full URL instead of as a relative URL, so if the current page was loaded with HTTP the browser is looking for a server at
http://Style Library
and if it was loaded with HTTPS the browser is looking for a server at
https://Style Library
Either way, it's probably not going to find one.

This should be pretty easy to fix, so if this is actually the problem you're having I should have something out that fixes it hopefully tomorrow.

Joe
Coordinator
Feb 3, 2016 at 10:16 PM
I've updated the release to 2015.01.01, which has a couple of bug fixes, one of which is the issue I described above with themes not working correctly on root site collections. I have no way of knowing for sure that it fixes your problem, but try it out and let me know.

Joe
Feb 5, 2016 at 9:29 AM
Hi Joe,
I’ve upgraded new version of solution in two places WebApp1 and WebApp2.
WebApp1, as I know, this is public site of portal. Testing site path i.e. http://port.nnl/proceses/ZP/SitePages/Main.aspx. Style Library path - http://port.nnl/Style Library/SPEasyFormsAssets/2015.01.01.
WebApp2, this is, I think, team type. Testing site path i.e. http://portnext.nnl/SitePages/Main.aspx. Style Library path - http://portnext.nnl/Style Library/SPEasyFormsAssets/2015.01.01.
New version almost working only in WebApp1 (previous only 2014 version working).
Almost, because in this WebApp doesn’t work only part of Settings option connected with switching Themes. In my case I have only Redmond theme as default. Switching to other themes doesn’t change – after pressing Apply theme button, option Save is inactive. I can change only Form width.
At the end of Export file there is info: "version": "2015.01.01", "formWidth": "1000".
In WebApp2 there is still the same effect like in previous version – doesn’t work.
Best Regards
Andy
Coordinator
Feb 5, 2016 at 12:06 PM
Edited Feb 5, 2016 at 12:21 PM
Hi Andy,

I'm still working through the combinations of features for your two web webapps as best I can (for instance I don't have PerformancePoint available, so I can't try that one). In the meantime, I noticed that you have SPEasyForms.AddOns active on both site collections. You should deactivate this on any site collection with any version of 2015.01 installed. The AddOns package was written for 2014.01, and contains many hotfixes in the form of what's called monkey patches, meaning it replaces whole functions from SPEasyForms that were found to have bugs, so it could theoretically conflict and cause some very strange behavior if it is activated with 2015.01. Pretty much everything that's in the AddOns package is included in 2015.01, so there is no need to have it active activated with 2015.01 anyway. I'll update the download page to include that information.

I don't really think this is the problem. The AddOns package was written to be inert if a later version of SPEasyForms is installed, but at a bare minimum you're paying a performance penalty for loading some JavaScript that doesn't do anything. And while I have don't a little testing to make sure that AddOns package is inert when 2015.01 is installed, I haven't done enough testing to be sure.

Joe
Coordinator
Feb 5, 2016 at 12:40 PM
I've tried activating all of the features activated in your WEBAPP 2 and still cannot reproduce your problem. The only features I didn't try were the PerformancePoint site and site collection features because they are not available to me, though it seems unlikely to me that they are the problem. Without the ability to reproduce your problem, I'm back to pretty well stumped.

Joe
Coordinator
Feb 5, 2016 at 1:15 PM
Just to be thorough, I did spin up a dev instance with PerformancePoint, so I replicated the activated features in your WEBAPP 2 exactly, but still no joy, it is working for me as expected.

Joe
Feb 8, 2016 at 6:26 AM
Hi Joe,
I propose to analyze differences between last unstable version 2015 and stable version 2015, because unstable version 2015 still working properly in my WebApp2 (but in turn stable last version 2015.01.01 begin works in WebApp1) .
Summarize at this day – in my WebApp1 works last 2015.01.01 version (without possibility theme change – only Redmond by default), and in the WebApp2 works only 2014 and 2015 not stable version.

Andy
Coordinator
Feb 9, 2016 at 11:51 AM
Been there, done that, but I'm looking at a bunch of lines of code that are working fine in every environment I have to test in. It doesn't really get me very far.

Joe
Marked as answer by mcsheaj on 2/24/2016 at 1:41 PM