Sylius Media Alt Text: Troubleshooting
Troubleshooting the Sylius Media Alt Text plugin: missing menu entry, missing fields in the image form, Storefront still showing the name, 422 from the Admin API, known limitations and FAQ.
Sylius Media Alt Text: Troubleshooting
This documentation always describes the latest published version.
The menu entry is missing in the admin
- Symptom: The sidebar has no "Image Alt Texts" entry under "MMKreativ Plugins".
- Check: Does
config/routes/mmd_sylius_media_alt_text.yamlexist? The setup command reports a missing import. - Solution: Import the route (see Installation) and clear the cache. Without the route, the plugin leaves the entry out instead of breaking the sidebar.
The alt text fields are missing in the image form
- Symptom: No editor appears in the product, category or avatar form.
- Check: Is "Output alt texts" turned on in the settings? Has
mmd:media-alt-text:setupbeen run (if the table is missing, the plugin treats the output as turned off and writes a warning to the log)? - Solution: Run the setup command and turn the switch on.
The Storefront still shows the product name
- Symptom: Despite maintained text, the
altattribute contains the name. - Check:
- Is the output turned on?
- Does the text exist in the displayed language or the default language? A third language is not used.
- Does your theme override the template under
templates/bundles/SyliusShopBundle? In that case your template wins.
- Solution: Use
mmd_image_alt(image, fallback)in your own template (see Storefront).
The Admin API responds with 422
- Symptom:
PUTor upload withaltTextsfails. - Check: Is every language enabled in the shop, is every text at most 255 characters long, is
altTextsan object with string values, and isdecorativea boolean? - Solution: Correct the request. Nothing is saved partially.
Tables do not match after an update
- Symptom: Errors about missing tables or columns.
- Solution: Run
bin/console mmd:media-alt-text:setupagain. If it reports pending Sylius migrations, rundoctrine:migrations:migratefirst.
Known limitations
- Database: MySQL and MariaDB only; the migrations refuse other platforms.
- Many images per page: The alt text of an image is read with one query and remembered for the request. A Shop API list with many images costs one query per image.
- Decorative images in links: The product gallery gets an
aria-labelwith the product name for this case. - Additional image types: There is no tag, only the override route through the registry (see Extending).
- Detection of decorative images: An image counts as decorative as soon as one of its rows is marked that way.
FAQ
Does the plugin make my shop BFSG-compliant? No. It provides the missing alt text field; the rest of the shop needs its own audit.
Are texts lost if I turn the output off? No, they stay stored.
Does the setting apply per channel? No, it applies to the whole shop.
Can I set texts with a script? Yes, through the Admin API, or for an initial state with the backfill command.