Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
Symptom: The placeholder {{snippet:...}} appears unchanged in the shop.
Check:
mmd_snippets filter itself.Solution: Fix the cause you found, then run bin/console cache:clear.
Symptom: I changed a snippet, but the shop still shows the old state.
Check: Did you change only the content or the name, or did you toggle Active? Such changes do not trigger a cache invalidation, see Technical Details. A deactivated snippet therefore stays visible, and a newly activated one does not appear yet.
Solution: Run bin/console cache:clear or wait up to one hour. If you use an HTTP cache, the cached product page may additionally contain the old state, so you have to clear that cache as well.
Symptom: The formatting of the snippet is missing on the product card in the listing.
Check: Is it the description preview of a product card?
Solution: This is intended. On product cards the description is reduced to plain text with striptags after the replacement. The formatting is kept in the product description of the product layout.
Symptom: An element or attribute from the content is missing in the output.
Check: Does the content contain scripts, event attributes or other unsafe parts?
Solution: Shopware's HTML sanitizer removes such parts when the content is inserted. Use regular HTML instead.
Symptom: A snippet with uppercase letters in the identifier cannot be created.
Check: Is there already a snippet that differs only in case?
Solution: The identifier is unique regardless of case. Choose a different name.
Symptom: The admin menu entry is missing or the admin interface misbehaves.
Check: Did you clear the browser cache and activate the plugin after the installation?
Solution: Clear the browser cache, run bin/console assets:install and bin/console cache:clear, and reload the administration. The browser console shows further errors.
mmd_snippets filter is applied: in the product description of the CMS product layout and on product cards. The shipped template for the classic product detail page is inactive under Shopware 6.7.Is the content inserted exactly as I enter it? No. The content is cleaned with Shopware's HTML sanitizer, unsafe parts are removed.
How many database queries are there? One cache lookup per distinct identifier of a description, plus a repository search on a miss. After that the content stays in the cache for an hour.
Can I use the mmd_snippet() function in product descriptions? No. It only works in Twig templates. In stored content use the placeholder syntax.
What happens on uninstall? The tables and with them all snippets are dropped, unless you keep the user data. See Installation.