Skip to content

Fix: Add .rendered guard to prevent synchronizationSettings double-render error#62

Open
Sebastian80 wants to merge 1 commit intomollie:masterfrom
netresearch:fix/sync-settings-double-render
Open

Fix: Add .rendered guard to prevent synchronizationSettings double-render error#62
Sebastian80 wants to merge 1 commit intomollie:masterfrom
netresearch:fix/sync-settings-double-render

Conversation

@Sebastian80
Copy link
Copy Markdown

Summary

  • The transport form template renders form.parent.synchronizationSettings without checking .rendered, causing a Twig double-render error on OroCommerce 6.1.x
  • Oro's logWarnings sync setting (added without an applicable restriction) makes synchronizationSettings.count > 0 for all integration types, triggering the conditional render in update.html.twig before Mollie's template renders the same field again

Changes

  • Resources/views/Form/fields.html.twig: Add and not form.parent.synchronizationSettings.rendered to the existing is defined check, matching the guard pattern used by Oro's own IntegrationBundle/Resources/views/Form/fields.html.twig

Test plan

  • Install on OroCommerce 6.1.x (with the logWarnings sync setting present)
  • Create a new Mollie integration — verify no Twig error
  • Edit an existing Mollie integration — verify no Twig error
  • Verify the "Log warnings" checkbox appears in the Synchronization Settings section

Closes #61

…-render error

The transport form template renders form.parent.synchronizationSettings
without checking if it was already rendered by Oro's update.html.twig.
This causes a Twig error on OroCommerce 6.1.x where the logWarnings
sync setting (added without an applicable restriction) makes
synchronizationSettings.count > 0, triggering Oro's conditional render
before the transport widget renders it again.

Matches the pattern used by Oro's own IntegrationBundle form template.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

synchronizationSettings double-render error when creating/editing integration on Oro 6.1.x

1 participant