You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was attempting to scan through files to find ones with a particular property set, and ran into an error:
3: from /work/gitlab/experiments/sharepoint-label-scan/.bundle/ruby/2.6.0/gems/sharepoint-ruby-0.1.1/lib/sharepoint-properties.rb:27:in `block in add_property'
2: from /work/gitlab/experiments/sharepoint-label-scan/.bundle/ruby/2.6.0/gems/sharepoint-ruby-0.1.1/lib/sharepoint-properties.rb:67:in `get_property'
1: from /work/gitlab/experiments/sharepoint-label-scan/.bundle/ruby/2.6.0/gems/sharepoint-ruby-0.1.1/lib/sharepoint-properties.rb:83:in `get_deferred_property'
/work/gitlab/experiments/sharepoint-label-scan/.bundle/ruby/2.6.0/gems/sharepoint-ruby-0.1.1/lib/sharepoint-ruby.rb:86:in `query': The expression "Web/GetFileByServerRelativePath(decodedurl='/sites/CAD/UNITED STATES/more-path-data/CAD Backgrounds 4.26.2019/A18-Build Out-Floor Plan - PARTIAL FOURTH FLOOR PLAN - PART 'C'.dwg')/Properties" is not valid. (Sharepoint::SPException)
It seems that while this value does get properly url-encoded with %27 instead of a single apostrophe ', it doesn't seem to be what sharepoint wants. Apparently sharepoint wants two apostrophes '' instead of a single apostrophe.
While I think the proper fix is probably in sharepoint-ruby.rb (in #api_path), the simple fix I used was to change this in sharepoint-properties.rb:
# line 80-84defget_deferred_propertyproperty_namedeferred_data=@data[property_name]['__deferred']uri=deferred_data['uri'].gsub(/^http.*\/_api\/web\//i,'').gsub(/%27/,"''")@site.query:get,uriend
Though, I'm not sure deferred uri's are used anywhere else, so it might be considered reasonable.
The text was updated successfully, but these errors were encountered:
I was attempting to scan through files to find ones with a particular property set, and ran into an error:
It seems that while this value does get properly url-encoded with
%27
instead of a single apostrophe'
, it doesn't seem to be what sharepoint wants. Apparently sharepoint wants two apostrophes''
instead of a single apostrophe.While I think the proper fix is probably in sharepoint-ruby.rb (in #api_path), the simple fix I used was to change this in sharepoint-properties.rb:
Though, I'm not sure deferred uri's are used anywhere else, so it might be considered reasonable.
The text was updated successfully, but these errors were encountered: