Search

I'm trying to filter a navigation data source by two values, a static and a dynamic one:

navigation + {$ds-sprache}

{$ds-sprache} returns the currently selected language (either deutsch or englisch in my case).

I was expecting that + will only return pages that have both types attached (navigation and deutsch/englisch). But it seems always return pages that match the first or the second value. Looking at datasource.navigation.php it seems like Symphony is checking, if is should join types by AND or OR.

I'm a bit lost: am I doing something wrong or is this a Symphony bug.

It's a Symphony bug, regardless of filter, page types use IN which will never work for AND operations.

Thanks Brendan - I just posted it on the issue tracker.

Line 16 of datasource.navigation.php looks odd to me:

$types = preg_split('/'.($filtertype == DS_FILTER_AND ? '+' : ',').'s*/', $filter, -1, PREG_SPLIT_NO_EMPTY);

It doesn't look like $filtertype would ever equal DS_FILTER_AND and therefore fall back onto the default DS_FILTER_OR.

I'm slow.

:)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details