GithubHelp home page GithubHelp logo

Comments (14)

Aymkdn avatar Aymkdn commented on June 12, 2024

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.png

Any help will be great.

β€”
Reply to this email directly or view it on GitHub
#20.

from sharepointplus.

docmbg avatar docmbg commented on June 12, 2024

Ok, so the error is caused by the code on line 1160:
var err = res.getElementsByTagName("errorstring");

from sharepointplus.

Aymkdn avatar Aymkdn commented on June 12, 2024

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.

docmbg avatar docmbg commented on June 12, 2024

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.

Aymkdn avatar Aymkdn commented on June 12, 2024

from sharepointplus.

docmbg avatar docmbg commented on June 12, 2024

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.

Aymkdn avatar Aymkdn commented on June 12, 2024

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.

docmbg avatar docmbg commented on June 12, 2024

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.
image

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.

Aymkdn avatar Aymkdn commented on June 12, 2024

Are you using Sharepoint 2013 or 2010 ?

from sharepointplus.

docmbg avatar docmbg commented on June 12, 2024

2010

from sharepointplus.

Aymkdn avatar Aymkdn commented on June 12, 2024

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.

docmbg avatar docmbg commented on June 12, 2024

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.

Aymkdn avatar Aymkdn commented on June 12, 2024

from sharepointplus.

docmbg avatar docmbg commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.