Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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." #186

Closed
Sesha-Netwoven opened this issue Dec 4, 2020 · 2 comments · Fixed by #190

Comments

@Sesha-Netwoven
Copy link

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

=========================================
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

======================================================

@pinkylabs
Copy link

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

@awsles
Copy link

awsles commented Apr 29, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants