[BUG] Overlay Opt-Out doesn't work reading invalid tagpaths (".CanWrite")

v8.1.25

I have a View template that can accept a number of different options, and in some combinations, a binding is trying to read ".CanWrite" which results in an error displayed, despite "Overlay Opt-Out" checked on the binding:
image

"Tag properties can only occur after a tag name"

I'm using an expression transform to check if the tag is available, and ignore it if not:

if(isAvailable({value}), {value}, true)

I don't think overlay opt out is doing anything, because the issue here isn't the quality of the internal value, it's something about the syntax of the path you're checking itself. I would expect try() in the expression to work to suppress this... though the screenshot doesn't make sense with the error you're getting. Any kind of SSCCE or reproducible view you can upload would be interesting to look at.

I'll use try instead, but here's an example below. JSON of a simple View:

{
  "custom": {},
  "params": {},
  "props": {
    "defaultSize": {
      "height": 343,
      "width": 531
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Label"
        },
        "position": {
          "basis": "251px"
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "fallbackDelay": 2.5,
                "mode": "direct",
                "tagPath": ".CanWrite"
              },
              "transforms": [
                {
                  "expression": "if(isAvailable({value}), {value}, -1)",
                  "type": "expression"
                }
              ],
              "type": "tag"
            }
          }
        },
        "type": "ia.display.label"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}

Edit: I had to put the binding on the props.text instead of a custom key for the error overlay to show up

1 Like

Psst! I don't think the if() expression function does any short-circuiting, so your tag is evaluated regardless of isAvailable() result.