- Neu: Die Neuerung in diesem Release ist etwas schwierig zu erklären und richtet sich ausschließlich auf das Filterverhalten. Man stelle sich vor ein Filter hat zwei Modi: 1. strikt (hard) oder nicht strikt (soft). Diese Modi sind dann relevant, wenn ein Filter keine Ergebnisse mehr hat, sprich keine Einträge mit diesem Filter mehr möglich sind. Ein strikter Filter wird die SQL Abfrage nun dahingehend manipulieren, das in jedem Fall ein unmögliches Ergebnis entsteht z.B. id=-1. Ein weicher / nicht strikter Filter, wird schlichtweg nichts tun und wird ignoriert. Soviel zur Erkläreung, nun zur Änderung.
CC hatte bislang eine Art Mix. Einige Filter wurden strikt behandelt, andere wiederum nicht. Von nun an sind standardmäßig alle Filter "nicht strikt". Ziehen sich also zurück, wenn sie keine Ergebnisse produzieren und nur die restlichen Filter werden das Ergebnis beinflussen.
Diese Einstellung kann global (Systemeinstellungen) oder je Tabelle (Globale Variable) oder per Filter (Globale Variable) individuell angepasst werden. Möchte man z.B. einen bestimmten Filter eher passiv fahren, aber einen anderen strikt -> dieser würde, wenn kein Ergebnis ist, die Abfrage dahingehen manipulieren, dass die Liste leer wird (Liste-Einstellungen werden berücksichtigt), kann man dies nun gezielt steuern. Siehe Beispiel unten... - Kleinere Fehlerchen behoben und Updates an der API
- Update: Die Google-API Abfrage im Umkreissuche Filter wird nun gecached, was besonders bei vielen Einträgen, einen enormen Performance-Schub gibt.
- Update: Smart-Filtering: Eigene Url-Parameter im SmartFiltering müssen nicht mehr zwingend reale Filter sein.
Level: Tabelle
PHP-Code:
$GLOBALS['PCT_CUSTOMCATALOG']['cc_myTable']['strictMode'] = true; // all filters for cc_myTable will be strict
PHP-Code:
$GLOBALS['PCT_CUSTOMCATALOG']['FILTER']['meineTags']['strictMode'] = true; // filter with name/parameter meineTags will be strict
$GLOBALS['PCT_CUSTOMCATALOG']['FILTER'][10]['strictMode'] = true; // filter with id=10 will be strict
Das Modul kann wie gewohnt direkt ersetzt werden. Der interne Cache sollte geleert oder deaktivert sein.
Ein Datenbankupdate nicht nötig.
Changelog:
Code:
New: Toggle the strictness of a filter (strict mode true/false) by the Global setting: $GLOBALS['PCT_CUSTOMCATALOG']['FILTER'][-NAME-OR-ID-OF-THE-FILTER-]['strictMode'] = true|false; (#609)
New: Strict filter will force an impossible query result by a query on the id column (e.g. id='-10' -> 10 is the ID of the filter that is strictly forcing the negativ result) (this setting is resepecting the list / filter module setting: tl_module.customcatalog_filter_showAll) (#609)
New: Toggle global strictness of all filters or by table using the Global system setting (default: false) or $GLOBALS['PCT_CUSTOMCATALOG'][-TABLENAME-]['strictMode'] = true|false; (#617)
Fixed: CustomElements attribute: Wrong inputType name in DCA configuration
Fixed: Write error log on reader pages when no entry can be found because the value is NULL
Fixed: Missing sql AND when filter type is wrapperStop (#608)
Fixed: API Job: The mode option "auto" was not declared in DCA yet
Fixed: Respect the reference attributes in palettes (#614)
Fixed: API Job: Certain inserttags like date were not replaced duo to caching option in replaceInsertTags method (#620)
Added: API Base: Pass the data index and the job index to the jobs object when processing (#610)
Added: Inserttag to return total amount of items returning 0 on empty results, respecting filtersets: {{customcatalog::TABLENAME-OR-ID::rtotal::(optional)FILTERSET-IDS}} (#604)
Added: API CSV: Allow custom enclosures by $GLOBALS['PCT_CUSTOMCATALOG_API']['ENCLOSURE'][ID-OF-THE-API-RECORD] (#606)
Update: API CSV: Always use str_getcsv. It's more convenient than explode. (#606)
Update: Filter conditions mode (show all or remove on empty result) can be set up in filter module now. (#605)
Update: Geolocation filter: Use file_get_contents instead of Contao request class to fetch Google Maps API results (#603)
Update: Geolocation filter: Cache the request results for further usage to avoid multiple (unessessary) Google Maps API calls (#602)
Update: A respectable url parameters must not be a filter just an active value (#612)
Update: SelectDb attribute: key field and value field are mandatory now by DCA (#615)


Einen Kommentar schreiben: