diff --git a/web/src/main/webapp/xslt/common/base-variables-metadata.xsl b/web/src/main/webapp/xslt/common/base-variables-metadata.xsl index 1ea889b8235..73b2f683f62 100644 --- a/web/src/main/webapp/xslt/common/base-variables-metadata.xsl +++ b/web/src/main/webapp/xslt/common/base-variables-metadata.xsl @@ -106,10 +106,11 @@ then /root/request/currTab else if (/root/gui/currTab != '') then /root/gui/currTab - else $editorConfig/editor/views/view[@default]/tab[ + else ($editorConfig/editor/views/view[@default and + gn-fn-metadata:check-elementandsession-visibility($schema, $metadata, $serviceInfo, @displayIfRecord, @displayIfServiceInfo)]/tab[ @default and gn-fn-metadata:check-elementandsession-visibility($schema, $metadata, $serviceInfo, @displayIfRecord, @displayIfServiceInfo) - ]/@id"/> + ]/@id)[1]"/>