Comments (14)
Try to not use the minified version of the file in order to have a better
idea of the problem.
Le 4 avr. 2015 23:36, "ES ABM Document Management" [email protected]
a Γ©crit :
I have built an app that traverses the entire SharePoint and prepares an
excel report about the files and their metadata. Kind of like a snapshot of
the current file system on the SharePoint. Sometimes however I will get
this error, especially when I go around 100 000+ files on a very big
SharePoint site.
[image: image]
https://cloud.githubusercontent.com/assets/11211921/6994687/cc0c4432-db2b-11e4-8f2d-d6be652bb05d.pngAny help will be great.
β
Reply to this email directly or view it on GitHub
#20.
from sharepointplus.
Ok, so the error is caused by the code on line 1160:
var err = res.getElementsByTagName("errorstring");
from sharepointplus.
OK so look at your Web console to see the content of the server's response because this response returns an error that SharepointPlus is not able to handle.
from sharepointplus.
I understand, I am looking at the console, but I don't see anything meaningful. It seems to be doing it on specific libraries. I think it has to do with the names of the lists... will try to debug it soon.
from sharepointplus.
from sharepointplus.
Yeah, this is what I did. Turns out it's an xml parsing error.. some of the files have bad characters in the metadata, for instance, the author is all messed up in some docs. I don't think there's much I can do to parse the data as its done on the server-side. This is bad as queries for entire libraries will fail even if one file has bad characters in its metadata. Do you have any suggestions how I can parse the symbols on return?
from sharepointplus.
It's very difficult to deal with the weird signs in a response.... If you have an example of the returned content that is causing the issue ? Otherwise, try to see if Google/StackOverflow has some good advice regarding this kind of issue ?
from sharepointplus.
Unfortunately I cannot paste the entire xml response as it will reveal internal company information.
I can however show you an example of a bad character in a photo "comments" field. This is what I get in Firefox.
Google and Stack Overflow didn't turn up anything useful. I don't have access to the server-side, so I am kind of stuck right now. The solution is to go through all files and fix the metadata errors :(
from sharepointplus.
Are you using Sharepoint 2013 or 2010 ?
from sharepointplus.
2010
from sharepointplus.
OK so try the native Sharepoint functions to see if the result is different (because it returns a JSON).
Below is an example of how to use it:
var ctx = new SP.ClientContext(_spPageContextInfo.webServerRelativeUrl);
var items = ctx.get_web().get_lists().getByTitle('Name of Your List').getItems(new SP.CamlQuery());
ctx.load(items, "Include(Title)");
ctx.executeQueryAsync(function () {
var listEnumerator = items.getEnumerator();
while(listEnumerator.moveNext()) {
var page = listEnumerator.get_current();
console.log(page.get_item('Title')); // it will show the Title in the console
}
});
from sharepointplus.
That does work indeed. It does load the titles for the folders in the root of the library. I don't want to rewrite the application as it's got quite complex, and the information I extract is for records management purposes, hence skipping documents is not an option.
from sharepointplus.
from sharepointplus.
Ok, thank you! Much appreciated. I will have to do some digging around to mimic your get function and adapt it to return json instead of xml. I am not very familiar with the SharePoint javascript object model.. so it will take some time.
from sharepointplus.
Related Issues (20)
- getWorkflowID does not work in NodeJS HOT 6
- stopWorkflow does not work inside NodeJS : ReferenceError: document is not defined HOT 16
- $SP().getUserInfo POST Status 500 error HOT 2
- .get() paging and rowlimit not working for SPO document library HOT 7
- need an example for add.options.packetsize HOT 6
- setReadOnly:Error HOT 3
- Observables with Sharepoint+ HOT 1
- Getting the count of rows from a list HOT 2
- Error from server-side node HOT 4
- addAttachment contextinfo 404 error HOT 19
- Get Column Type HOT 1
- Translate SharePoint column names HOT 2
- distribution list members HOT 2
- Unable to getContentTypeInfo HOT 3
- The site URL passed in the setup object is always ignored in the isMember(...) function HOT 6
- RequestError: Error: tunneling socket could not be established, cause=Client network socket disconnected before secure TLS connection was established HOT 1
- sp.lists gives `ReferenceError: window is not defined` HOT 2
- sharepointplus with sp-rest-proxy HOT 11
- incorrect hasREST function behavior for Sharepoint Online / 365 HOT 2
- joins HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharepointplus.