Product Custom Inputs: Troubleshooting
Troubleshooting Product Custom Inputs: missing menu entry, fields not appearing, locked button, 404 on the Shop API, known limitations and FAQ.
Product Custom Inputs: Troubleshooting
This documentation always describes the latest published version.
The admin menu entry is missing
Symptom: There is no "Product Custom Input Fields" entry under "MMKreativ Plugins" (the group itself can come from another plugin).
Check: Is the route import present in config/routes.yaml? The plugin deliberately hides the entry when the route is not registered, instead of throwing an error.
Solution: Add the import @MmdSyliusProductCustomInputsPlugin/config/routes/admin.yaml (see Installation) and clear the cache. The setup command also prints the snippet when the import is missing.
The setup command aborts
Symptom: mmd:product-custom-inputs:setup ends with an error message.
Check:
- Does it report that migrations the plugin builds on are still open ("Migrations this plugin builds on are still open")? Then Sylius core migrations have not run yet.
- Does it report that the migrations are not registered with Doctrine? Then the bundle is not enabled, or
sylius_core.prepend_doctrine_migrationsis set tofalse.
Solution: In the first case, run php bin/console doctrine:migrations:migrate and repeat the setup command. In the second case, check the bundle entry and the setting.
The fields do not appear in the add-to-cart form
Symptom: The input fields are missing on the product page.
Check:
- Is the field attached to the product in the admin (product form, "General" tab)?
- Is the "Enabled" switch on the settings page turned on?
- Has the setup command run?
Solution: Attach the field, enable the switch or run php bin/console mmd:product-custom-inputs:setup.
The plugin does not abort on database errors but logs them: if the table does not exist yet, the form renders without fields, and if the switch cannot be read, the plugin counts as enabled.
So when fields are missing, check the log first.
The button stays locked after a validation error
Symptom: After an invalid input, "Add to cart" cannot be clicked anymore, even after the correction.
Check: Do you override custom_inputs.html.twig on the product page?
Solution: Take over the data-model handling from the original template (see Storefront).
POST to the Shop API returns 404
Symptom: POST .../custom-inputs responds with 404 although the order and item exist.
Check:
- Is the order still a cart?
- Does the order belong to the signed-in customer, or is it a guest order?
- Does the field belong to the item's product?
- Is the plugin enabled in the admin?
Solution: Fix whichever case applies. All four deliberately produce the same 404 response.
New inputs overwrite old ones
This is intended: adding the same variant to the cart again increases the quantity of the existing line, and the new inputs replace the previous ones.
Known limitations
- Fields cannot be created or changed through the API, only read and deleted.
- Concurrent POSTs for the same field on the same item are not guarded.
- Dates and times are not adapted to the locale in the display.
- Invoices and delivery notes are not covered. You can, however, print the inputs in your own templates with the Twig function
mmd_order_item_custom_input_values. - The Behat scaffold exists but contains no scenarios yet. Testing is done with PHPUnit.
FAQ
Can a field behave differently on each product? No. Required flag, position and all limits belong to the field. For different rules, create a second field.
Are there per-channel settings? No, only the shop-wide switch.
Do values survive when I detach a field from a product? Yes, inputs already collected on order items stay. If you delete the field itself, its values are deleted with it.