Andrew Fletcher published: 18 September 2023 (updated) 19 September 2023 1 minute read
Twig error
Twig\Error\SyntaxError: Unknown "filter" tag. in Twig\Parser->subparse() (line 6 of themes/custom/{theme}/templates/views/views-view-field--products--field_product_type.html.twig).
Line 6 of the views-view-field--products--field_product_type.html.twig file is
{% filter upper|escape('html') %}
The actual Twig file code
{% filter upper|escape('html') %}
{{ view.field.field_product_type.original_value -}}
{% endfilter %}
In Drupal 10, this is producing the error noted above - Unknown "filter" tag
Solution
Change the code as follows
{{ view.field.field_product_type.original_value|upper|escape('html') -}}
Related articles
Andrew Fletcher
•
22 Nov 2023
Fatal error: Maximum execution time of 30 seconds exceeded in ...
When reloading a page, you may encounter the following error:Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/content/core/lib/Drupal/Core/{some file .php} on line n SolutionTo resolve this issue, you need to adjust the max_execution_time parameter in the php.ini...
Andrew Fletcher
•
22 Nov 2023
To use Pinecone, OpenAI and a language model chain to answer questions in documents
Overview of the elementsSet Up API KeysObtain API keys for Pinecone and OpenAI.Store the keys securely. Consider using a credentials.py file (as mentioned in a previous response). Install Required LibrariesInstall the necessary Python libraries, such as Pinecone's Python client...
Andrew Fletcher
•
16 Nov 2023
Drupal and AWS - over 300 simultaneous database connections
The issue of over 300 simultaneous database connections in the context of AWS and Drupal can have several potential causes. Here are some common factors to consider:Server ConfigurationCheck your server configuration to ensure it can handle the expected number of simultaneous connections. This...