One or more field types not installed correctly

Mar 2, 2015 at 9:47 PM

SPServices 2014.02, SharePoint 2010, jQuery 1.10.2.

I am using the linked content editor web part method. Trying to figure out an empty page issue I created this small snippet. The issue is Passing the following CAML to GetListItems results in "One or more field types not installed correctly " error.

What I have tried:
  • Verify actual column names using both the address bar method and running the following code without the caml to get the list of items with column names. (Column name is good)
  • prepend ows_ (Returns same error)
  • escape my dblquotes (Returns same error)
  • retype the code block (Returns same error)
  • change to caml += ... line by line ( Returns same error - didn't think it would do anything )
  • pass an empty string for CAML (validates other settings and returned all rows as expected)
  • pass '<Query></Query>' for CAML (ditto - Returns all rows as expected)
  • created a whole new column and tried again (Returns same error)
  • created a whole new list tried again (Returns same error)
  • tried all of the above after removing the orderby (Returns same error)
    ** Screaming at it didn't help either...
var caml =
    '<Query>' +
    '    <OrderBy><FieldRef Name="Order0" /></OrderBy>' +
    '     <Where>' +
    '          <Eq>' +
    '               <FieldRef Name="Active" />' +
    '               <Value Type="Boolean">1</Value>' +
    '          </Eq>' +
    '     </Where>' +
    '</Query>';

$().SPServices({
    operation: "GetListItems",
    listName: "Bins",
    debug: true,
    CAMLQuery: caml,
    completefunc: function (xData, Status) {
        var out = $().SPServices.SPDebugXMLHttpResult({
            node: xData.responseXML
        });
        $(".debugOut").html("").append("<b>This is the output from the GetList operation:</b><hr/>" + out);

    });
I am working on a closed network and I have no ability to install anything. No access to my visual studio or even SP Designer. I am in notepad land. (Its a sad land with curses and gnashing teeth)

What have I missed?

My humble thanks in advance,
Coordinator
Mar 3, 2015 at 2:26 PM
Given all the things you've tried, I'm not sure what to suggest. Usually the best next step would be to look at the traffic to the server to make sure that everything is sent the way you think it should be. I usually use either Firebug in Firefox or Chrome's dev tools for this. You could also use Fiddler.

M.
Coordinator
Mar 3, 2015 at 2:33 PM
p.s. Screaming sometimes works for me. Maybe you didn't scream properly?
Mar 3, 2015 at 3:15 PM
Closed network, the only browser available is IE10 and fiddler is not authorized. Yes, it does almost seem like they don't want me to be able to work. I am beginning to think it is some sort of configuration issue at the servers end. I don't know what it could be. I am going to make the default view very restrictive to see if I am actually getting all records via an empty filter or all records via the default view.

The master page UX compat sets to IE8. Could that be an issue? I will play with setting it to standards in the F12 tools.

With so little access/rights on the server this is a difficult debug. I pray to get this resolved but if not I will have to exercise the worst case scenario and filter at the client. :'(
Mar 3, 2015 at 4:30 PM
The results of returning all rows for an empty query were deceptive. In reality the default view was returned. :/

Changing the document mode to IE10 Standards had no effect. Still returns the 0x81020014 error. I was hopeful that the js parser could have been at fault.

At a real loss now.
Coordinator
Mar 3, 2015 at 4:36 PM
It's got to be something with your query.

If this works:
var caml =
    '<Query>' +
    '    <OrderBy><FieldRef Name="Order0" /></OrderBy>' +
    '</Query>';
and this doesn't
var caml =
    '<Query>' +
    '    <OrderBy><FieldRef Name="Order0" /></OrderBy>' +
    '     <Where>' +
    '          <Eq>' +
    '               <FieldRef Name="Active" />' +
    '               <Value Type="Boolean">1</Value>' +
    '          </Eq>' +
    '     </Where>' +
    '</Query>';
then it's got to be in the Where clause. Are you certain that the column has a StaticName of "Active"?

Try a different filter to make sure that your syntax is right, like where Title = a known Title.

I'm not seeing any syntax issues, but that doesn't mean there isn't something there.

M.

M.
Mar 3, 2015 at 9:27 PM
 var caml =
     '<Query>' +
     '    <OrderBy><FieldRef Name="Order0" /></OrderBy>' +
     '</Query>';
Passing only the OrderBy does not work either. :(

When I run the GetListItems operation without a filter I get the list of items and Order0 is its exact name (sans the ows_) of course shown under listitems. Using the modify column trick its the same name in the address bar. I have copy pasted it too.

I did get one of the admins to run the page and he had the same results I did. I am frustrated. :( It has to be a setting/permission issue on this server but I can t figure it out.
Mar 3, 2015 at 9:33 PM
When I created a new list to test the listname was monkey and the column was a text col called foomonkey. I made CAML to look for text Neq to foo. Same error.
Coordinator
Mar 4, 2015 at 2:24 PM
Edited Mar 4, 2015 at 2:24 PM
The only thing I see about how you are building the CAML that looks odd is the leading spaces in the strings: ' <OrderBy><FieldRef Name="Order0" /></OrderBy>' +. Have you tried removing the spaces, e.g.:
 var caml =
     '<Query>' +
       '<OrderBy><FieldRef Name="Order0" /></OrderBy>' +
     '</Query>';
M.
Mar 4, 2015 at 3:50 PM
OK. I tried with pulling the spaces out and same error. :) Also, tried and failed with the following.
var caml = '<Query><Where><Neq><FieldRef Name="ID" /><Value Type="Counter">0</Value></Neq></Where></Query>';
Its truly maddening. I have been able to get this syntax to work on other networks but I have no idea what would setting allow the call without the caml parameter. ID exists in every list. Are there any SP updates that might not be applied that cause issues with this?
Coordinator
Mar 5, 2015 at 12:25 PM
Your call is pretty simple. Have you tried no CAMLQuery at all? Are you sure the list is named "Bins"?

Try just this and look at the results.
$().SPServices({
    operation: "GetListItems",
    listName: "Bins"
});
M.
Mar 5, 2015 at 6:00 PM
Edited Mar 5, 2015 at 6:01 PM
Yes, when passing no camlQuery I get the default view results with appropriate rows. (All Items)
Coordinator
Mar 6, 2015 at 12:08 AM
Edited Mar 6, 2015 at 5:00 PM
Ok, then try adding in just the ViewFields:
$().SPServices({
  operation: "GetListItems",
  listName: "Bins",
  CAMLViewFields: "<ViewFields>" +
      "<FieldRef Name='Order0'/>" +
      "<FieldRef Name='Active'/>" +
    "</ViewFields>"
});
In other words, starting with something that works, build up.

M.
Mar 6, 2015 at 4:39 PM
OK. With this no error. However, the results are the default view with all columns. I swapped the default view to show only inactive to be sure.
Coordinator
Mar 6, 2015 at 5:01 PM
I was missing a quote, so I expect you would have gotten an error. Just fixed it.

With this call, you should only get those two columns.

M.
Mar 6, 2015 at 5:12 PM
No big, I caught the missing quote and fixed it when I retyped. I have to print this page walk into another special room and retype there is no copy and paste. This network is off the grid and the owners are VERY serious about security.
Just getting the jq & sps libraries authorized for import was a herculean effort. :)

Agreed, we should only see the cols in the ViewFields.
Mar 6, 2015 at 5:14 PM
I also tried making the ViewFields ID & Title. Same results: no error, default view, and an angry face.
Mar 10, 2015 at 9:29 PM
I have pretty much written this up as a bad Windows Server, security, and/or SharePoint implementation. I am able to make this code work in the test environment and in a different production environment that is not locked down so much. Because I can't figure out exactly what is causing such an anomaly I can't fight for a change on the server.

Image
If anyone has this error and solves it I implore you to post the solution here.
Coordinator
Mar 10, 2015 at 9:34 PM
Since you have to retype everything each time, it's possible that you're spelling is just a bit off, you're missing a semi-colon, etc. Keep in mind that capitalization DOES matter in JavaScript.

Given that you're getting data back and that it reflects the default view, I'm still guessing that the options you're providing aren't making it to the server in your call. That would return the default view.

M.