3

Recently we had a Windows Update applied to our SharePoint server (Foundation 2010 SP1). We use the jQuery and SPServices libraries extensively. After this update almost all of our custom pages broke. I'm trying to confirm what updates applied these changes:

  1. Append the text " Required Field" to the title attribute of form fields that are required.
  2. Changed how large dropdown lists are rendered. Previously they consisted of both a "select" element and a hidden "input" element based if the list had than 20 items. Now it's just one large select element.

Any leads on the updates that might have applied these would be helpful (I'm focusing my time on fixing the broken code). We started trying to review all the articles of all the KBs shown to have been applied but so far no luck.

  • 1
    You admins should be able to tell you what they applied. It was a SharePoint update and not a Windows update though. Mark Rackley reported this back in January, so I'd start there: markrackley.net/2014/01/31/… – Derek Gusoff Aug 8 '14 at 15:30
  • A comment on that post exposes the December 2013 CU as a person of interest. – Derek Gusoff Aug 8 '14 at 15:31
  • 1
    Yeah, I've read that post and implemented the same patch he came up with to get my users moving (see bottom with my comment from the 5th lol). However, there have been no CUs applied since those are applied manually. I'm more inclined to think the code was backported into one of the security updates (intentional or otherwise). And I have found zero hits on the change to the dropdown menu that removed the hidden input element. – Tony Fountain Aug 8 '14 at 17:59
3

So, I came across this as well. Before we updated to November 2014 CU, all was working as expected. The Dropdowns were displaying their usual Complex behaviour before the upgrade, but for some reason, not after. I spent a day tearing what is left of my hair out, before I thought to look at a decompile of the code that renders a lookup field (in Microsoft.SharePoint DLL). After a bit of spelunking, I came across a bit of code that checks if there is a property set on the WebApplication object: LookupDropDownUseStandardControl.

enter image description here

It turns out that the code that is used to render the lookup field checks to see if this is set, and if it is true, then renders using a select, and not the usual input for large lists.

enter image description here

A quick check with the SharePoint Manager 2010 application did indeed show that the value was set to True. I set to false, and lo and behold, it was rendering using the complex dropdown, which is exactly what my client wanted.

enter image description here I am not sure what changed it, but for those that having this issue, it may be worth a look.

  • You, sir, are a gentleman and a scholar. – Omegacron Sep 7 '16 at 16:04
  • We're patched up to April 2016 CU and I confirmed with SP Manager 2013 that the LookupDropDownUseStandardControl value is set to TRUE. However, it won't let me change it to FALSE for some reason. My account has full god-rights across the farm, so I'm not sure why it won't take. I can change other values but this one goes right back to TRUE when I click on FALSE. Any ideas? – Omegacron Sep 9 '16 at 18:19
2

You don't mention what version of SPServices you are using, this I assume a not-current one. :)

The first thing you want to do is use the latest version of SPServices. Marc has already addressed the several issues that the latest SP patches introduced to his utilities, including the widely used CascadeDropdowns (he has written blog post about this). With the latest version, you don't have to change your code for required fields if using his provided utilities (like SPCascadeDropdown).
Also, Marc exposed a new utility as part of SPSercices that allows you to find and return a dropdown field on the page - regardless of type or if required or not. Instead of coming up with your own logic of how to find these, you may want to leverage his utility. Again: all of these in the latest version.

You may also want to look at how he solved the 'required field' issue and mirror that in your own code, since I'm sure you probably have field selectors in your apps. My advice on that front is to create a custom function that does field selection and use that exclusively through out your code. Like that, if MS changes the HTML markup of fields again in the future (which all of us client side dev.'s fear they will) you only have to update one common function.

Hope this helps.

  • Paul, sorry. I'm using SPServices 2013.01 and jQuery 2.0.2. I have already backported Marc's SPDropDown function into our version while testing. The bigger issue I'm having is with the change of the hidden input with dropdowns (there is no more hidden input!). I'm trying to locate the format of the 'choices' attribute. We have code that parses that information out, and in order for me to translate the code I need to know the format of that attribute. So, that's where I'm at now. – Tony Fountain Aug 11 '14 at 19:38
  • Oh. Had not heard about that change. Surprising Marc has not either. FYI: you probably should stick to jQuery 1.x version. 2.x does not support older versions of IE. Remember that even if your users have a IE>8, SharePoint includes a tag on the page that tells it to "use IE 8" – Paul T. Aug 11 '14 at 23:26
  • Not surprising since I am unable to find a single reference to it. But I can tell you I had tons of custom jQuery broke that referenced the hidden 'input' elements. And in some cases code to retrieve values from the hidden input that would 'silently fail' since it no longer exists. Thanks for the tip on jQuery... I didn't realize that. I haven't had any problems with it 'yet' but I'll read up and see if any potential issues affect me. – Tony Fountain Aug 13 '14 at 14:25
  • I haven't had any reports of the input/select (I call these "complex dropdowns") changing in SharePoint 2010. I'm not doubting you, but usually I hear about this stuff loud and clear. I'd suggest SPServices 2014.01 and jQuery 1.11.1, as Pail recommended. – Marc D Anderson Aug 13 '14 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.