From ef51ea50a1420fc54896c1588e242e08d96b2121 Mon Sep 17 00:00:00 2001 From: Simon Stier <52674635+simontaurus@users.noreply.github.com> Date: Sat, 8 Mar 2025 05:06:27 +0100 Subject: [PATCH] fix: trim '-' from property labels before calling DIProperty::newFromUserLabel Refs: #920 --- formats/datatables/SearchPanes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/formats/datatables/SearchPanes.php b/formats/datatables/SearchPanes.php index 9c8b47c85..e6089b58d 100644 --- a/formats/datatables/SearchPanes.php +++ b/formats/datatables/SearchPanes.php @@ -126,7 +126,8 @@ private function getPanesOptions( $qobj = $querySegmentList[$rootid]; - $property = new DIProperty( DIProperty::newFromUserLabel( $printRequest->getCanonicalLabel() ) ); + // lookup the property by the provided label, trim leading '-' to handle inverse properties + $property = new DIProperty( DIProperty::newFromUserLabel( ltrim( $printRequest->getCanonicalLabel(), '-' ) ) ); $propTypeid = $property->findPropertyValueType(); if ( $isCategory ) {