Squidex Rule started error

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Rule tab suddenly error when clicking, and there are no rules can be displayed and firing. When viewing Consumer error, here is error:
An error occurred while deserializing the Document property of class Squidex.Infrastructure.States.MongoState`1[[Squidex.Domain.Apps.Entities.Rules.DomainObject.RuleDomainObject+State, Squidex.Domain.Apps.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]: Object has no discriminator '$type.

We can fix it. Even after delete the app and recreated it, rules can be visible, and not firing

Expected behavior

Rule tab click should display all rules and each rule should fire for events

Environment

App Name:

  • [x ] Self hosted with docker, paid subscriber from Relx
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [VERSION] 7.2

Browser:

  • [x ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [x ] Edge

No applicable to browser.

Others:

Have you made a downgrade?

7.5 to 7.2? Someone did an upgrade to 7.5, I think then downgraded to 7.2. Why downgrading causes rule broken? is it a known issue? Now I don’t see any app in the instance has rule working, no error. I am seeking your support on how to fix this. Thanks.

are you part of XpertHR?

This is not a known issue. I never design for downgrading…

Somewhere between 7.2 and 7.6 I have made a change to the type system to improve serialization performance. And therefore the discriminators have been changed from $type to actionType or
triggerType. For backwards compatibility the new type system can also handle $type, but obviously the old serializer cannot handle the new discriminator names.

To handle your downgrade you have to fix it in the DB manually.

actionType => $type or §type
triggerType => $type or §type

(I think that $ is not supported in MongoDB, therefor I use § as a fallback, when it is a normal property name).

Thanks, I will following your instruction to see if will resolve. The error is related to what you mention here

1 Like