openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

Loop in Semantic model detected in UI, not when loading .items file

Open crazyelectron-io opened this issue 1 year ago • 1 comments

OpenHAB 4.1.0.

When accidentally creating a loop in the semantic model for a Group Item (made it member of itself while mass-editing) with an .items file, no error/warning is logged. Only when selecting the Locations-tab in MainUI an error is displayed:

A a loop has been detected in the semantic model: alarmSystem is both descendant and parent of alarmSystem. Please correct and refresh.

(also notice the grammar error in the message "A a loop..." :grin:)

I would have suspected the check to be done at file load time (and logged accordingly).

UPDATE: It looks like when removing the offending group membership from the Items file and trigger a reload by saving it, an error entry appears in openhab.log:

ERROR] [s.internal.SemanticsMetadataProvider] - Recursive group membership found: alarmSystem is both, a direct or indirect parent and a child of alarmSystem.

crazyelectron-io avatar Jan 02 '24 08:01 crazyelectron-io

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/semantic-model-loop-detected-in-ui-not-when-loading-items-file/152570/1

openhab-bot avatar Jan 02 '24 08:01 openhab-bot