paranext / paranext-core

Electron client, extension host, and C# library for Paranext
https://paranext.github.io/paranext-core/
MIT License
17 stars 2 forks source link

Exceptions are thrown and Settings.xml and settings.json not updated after JSON RPC conversion #1256

Closed roopa0222 closed 4 weeks ago

roopa0222 commented 4 weeks ago

Describe the bug Exceptions are thrown when no validation rule is given for Project settings and User settings. I am using TPKJ project to update the Settings.xml. Notice that Settings.xml and settings.json are not updated with the given information on UI

To Reproduce Steps to reproduce the behavior: In my test extension I have Project Settings and Settings input with validation rules.

  1. On Settings Test
  2. Enter TestWhite in Settings Background Color (No Validation Rule) :
  3. Notice that settings.json is not updated with "paranextExtTesting.backGroundColor_TC12":"TestWhite" at C:\Users{UserName}.platform.bible\data
  4. See error message displayed in the console.

Similarly

  1. Enter WhiteTest at ProjectSettings BackgroundColor (No Validation) :
  2. Notice that Settings.xml is not updated with "paranextExtTesting.backGroundColor_projectSetting_TC13":"WhiteTest" at C:\Users{UserName}.platform.bible\projects\Paratext 9 Projects\TPKJ
  3. See error message displayed in the console.

Expected behavior Settings.xml and settings.json must be updated without any exceptions. In case of Validation rule returns false, error must logged

Find the attachment for log file Screenshot 2024-10-31 140720

main.log