Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.
This repository was archived by the owner on Mar 8, 2021. It is now read-only.

Cached and nested snippets not working in EVO 1.2 #1089

@vinelandit

Description

@vinelandit

a) Snippets called in [!snippetName!] format are not parsed, and just return the literal [[snippetName]] (replacing the [!!] brackets with [[]])

b) Nested snippets in alternating cached/uncached format, i.e. [!outerSnippet? &param='[[innerSnippet]]'!] are not parsed, and nested snippets using uncached format throughout throw a MySQL error.

(Backticks replaced with quotes in sample calls to avoid being marked up)

Example call:

[[Ditto? &documents='[[getVal? &docid='1' &field='featurePanel1']]' &tpl='homePanel' &extenders='summary' &truncLen='180' &truncOffset='90' ]]

Example error (similar error occurs when the inner snippet is called in uncached format, and the whole call unparsed and returned literally when the outer snippet is in uncached format):

« MODX Parse Error »
Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[[getVal?&docid=) AND sc.published=1 AND sc.deleted=0) AND (sc.privateweb=0) GRO' at line 1
SQL > SELECT DISTINCT sc.id FROM 'ajfadmin_modx'.'modx_site_content' sc LEFT JOIN 'ajfadmin_modx'.'modx_document_groups' dg on dg.document = sc.id WHERE (sc.id IN ([[getVal?&docid=) AND sc.published=1 AND sc.deleted=0) AND (sc.privateweb=0) GROUP BY sc.id
Error information
Current Snippet Ditto ... etc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions