Skip to content

ItemReport fails with "Value does not fall within the expected range" when no FolderSiteRelativeUrl filter is set #86

Description

@TheRealStriff

Description

When running ItemReport against a single site with no folder filter
(FolderSiteRelativeUrl left empty), the CAML query uses the site root
URL as the FolderServerRelativeUrl instead of each library's root URL.
This causes all non-empty libraries to fail.

Steps to Reproduce

  1. Open Files and Items Report
  2. Set Sites filter > Single Site URL
  3. Leave FolderSiteRelativeUrl empty (no folder filter)
  4. Run solution

Expected Behaviour

Each library is enumerated using its own root folder as the
FolderServerRelativeUrl (e.g. /sites/MySite/ArchivedDocuments)

Actual Behaviour

All libraries fail with:
Exception: Value does not fall within the expected range.

The log shows the CAML query is built with the site URL for every
library regardless of the library's actual path:
FolderServerRelativeUrl /sites/SPO-TMS-MHL (should be library URL)

This causes a secondary crash in DbHandlerSolution.ExportAllReports()
because the result data is malformed.

Log evidence

[SPOListItemCSOM] "Getting CAML Query: ViewXml,
FolderServerRelativeUrl /sites/SPO-TMS-MHL"
[SPOTenantItemsCSOM] "Exception: Value does not fall within
the expected range."
[ItemReport] "Exception: Exception has been thrown by the
target of an invocation." at DbHandlerSolution.ExportAllReports()

Environment

  • NovaPoint version: v0.15.1
  • Auth method: Delegated (interactive)
  • Site: Single Site URL with all libraries selected

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions