Snippet content always empty.

Created on 12 December 2023, 7 months ago

As a follow up to issue:
https://www.drupal.org/project/content_snippets/issues/3405913 πŸ› usort() deprecation on admin overview and PHP notice when creating a new snippet Fixed

On the 2.0.3 version of the module on a install of Drupal 10.1.5 i have created 5 snippets with content set to them.
Unfortunately whenever i try to use a snippet in a twig template, the result is always empty.

While debugging i found that:

dpm(content_snippets_retrieve_all());
dpm(content_snippets_retrieve('comment_not_logged_in_header'));

Both return empty values (empty array/null). The config in 'content_snippets.content' is always empty. I believe this is because no call is made to content_snippets.content in the SnippetEdit form used when creating a new snippet. As rightfully mentioned by @gcb on the mentioned issue switchting to content_snippets.items breaks the module.

Have i misconfigured the module or is there code missing to copy the snippets contents to the content_snippets.content config?

πŸ› Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands strakkie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024