ConvertTo-Space : Cannot create object of type "ConfluencePS.Space". Cannot convert value "29290657992" to type "System.Int32". Error: "Value was either too large or too small for an Int32."
Sesha-Netwoven opened this issue · 2 comments
we are trying to fetch the page details from all spaces in our testing environment using Confluence PowerShell commands and Get-ConfluencePage or Get-ConfluenceSpace is throwing an error saying
we went through the package "ConfluencePS.psm1" where it throwing an error. i have attached the powershell script where its throwing an error.
=========================================
ConvertTo-Page : Cannot create object of type "ConfluencePS.Page". Cannot convert value "2155413513" to type "System.Int32". Error: "Value was either too large or too
small for an Int32."
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.5.0\ConfluencePS.psm1:1070 char:43
- $result | & $converter
-
- CategoryInfo : InvalidArgument: (:) [ConvertTo-Page], RuntimeException
- FullyQualifiedErrorId : ObjectCreationError,ConvertTo-Page
======================================================
For my specific use case (uploading attachments, converting page and downloading/uploading page) I have fixed some of the Int32 types to Int64 types:
- in C# Page class
- in Get-Attachment.ps1
- Get-Page.ps1
- Set-Page.ps1
It worked for me, but it's obviously a mini quick-fix.
See ".patch" file against ConfluencePS v2.5.0 0001-hotifx.patch.txt
Can we get this pulled in and fixed please? I am having the same issue with Get-ConfluencePage and Set-ConfluencePage.
@pinkylabs - Have you done a pull request for your changes? I saw the diff text...