ServiceStack / Issues

Issue Tracker for the commercial versions of ServiceStack
11 stars 8 forks source link

Locode application (Chinook) breaking when EditAction in version 6.30+ #781

Closed rajeps closed 2 years ago

rajeps commented 2 years ago

Describe the issue

Simple Chinook locode app downloaded and no changes made - run with 6.3.0+ version of Servicestack then the edit action doesn't work. It breaks with the following error.

petite-vue.js?vfx=6.21:1 ReferenceError: type is not defined
    at getPrimaryKeyByProps (locode:921:38)
    at getPrimaryKey (locode:911:16)
    at Object.getId (locode:931:43)
    at Proxy.getId (locode:3772:39)
    at eval (eval at We (petite-vue.js?vfx=6.21:1:8737), <anonymous>:3:27)
    at Le (petite-vue.js?vfx=6.21:1:8684)
    at Be (petite-vue.js?vfx=6.21:1:8608)
    at get (petite-vue.js?vfx=6.21:1:13956)
    at el.onclick (locode:1881:22)
Le @ petite-vue.js?vfx=6.21:1
Be @ petite-vue.js?vfx=6.21:1
get @ petite-vue.js?vfx=6.21:1
el.onclick @ locode:1881 
locode:1839 Uncaught TypeError: Cannot read properties of undefined (reading '$page')
    at Proxy.set (locode:1839:28)
    at Proxy.to (locode:1855:18)
    at el.onclick (locode:1881:19)

However, the same works without any fix on 6.2.0 version.

Not sure if this is a bug with latest release or some changes needed to make it compatible with new version. Please advice.

Thanks, Raj

Reproduction

Download Chinook app and make sure the local environment is referencing ServiceStack 6.3.0+ [(https://github.com/NetCoreApps/Chinook/archive/refs/heads/main.zip)]

Run this as is with the version and try to edit any record which is displayed. The edit screen doesn't appear and we could notice console errors as above.

Expected behavior

The edit screen and flow should work without the type reference error.

System Info

Windows 10
VS 2022 Community
IIS Express
Servicestack 6.3.0+
.NET 6

Additional context

No response

Validations

mythz commented 2 years ago

This should now be fixed from this commit, this change is now available from v6.3.1+ that's now available on MyGet.

thx for Reporting! 👍