oroinc / OroCRMMailChimpBundle

OroCRM package, integrates marketing functionality with MailChimp.
https://mailchimp.com/
9 stars 8 forks source link

MemberExtendedMergeVarSerializer Doesn't Implement the supportsNormalization Function #8

Open archy-bold opened 8 years ago

archy-bold commented 8 years ago

As above, the normalizer, MemberExtendedMergeVarSerializer doesn't have a supportsNormalization function which means whenever an entity is looking to be normalized, this normalizer matches any configurable entity, because it's delegated to the function in the ConfigurableEntityNormalizer class.

This means that if the MailChimp bundle is loaded before any other bundles, its normalizers are loaded first and the MemberExtendedMergeVarSerializer is used as the normalizer for any of that bundle's configurable entities.

The workaround is to ensure affected bundles are loaded first, but this won't always be possible.

You can do this by reducing to priority to below the MailChimp bundle's priority of 102. For example:

bundles:
    - { name: Acme\Bundle\MyBundle\AcmeMyBundle, priority: 101 }
dagostinelli commented 8 years ago

I think I have a similar problem. I just opened this issue.

How do we implement your work around (to ensure affected bundles are loaded first)?

Aside.. I don't entirely understand how OroCRM works internally yet. I'm still new at it. If you could explain how bundles work, that might help me and others with these issues.

archy-bold commented 8 years ago

I've edited my original answer, the fix will only work if it's affecting your own personal bundle, you can edit the priority of other bundles, but you shouldn't really be doing that.

However, it doesn't look like your issue is the same and is likely another issue.

More information on Symfony2 bundles can be found here.