Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended measures are broken with Akeneo 2.3 #64

Open
Silarn opened this issue Aug 13, 2018 · 0 comments
Open

Extended measures are broken with Akeneo 2.3 #64

Silarn opened this issue Aug 13, 2018 · 0 comments

Comments

@Silarn
Copy link

Silarn commented Aug 13, 2018

I've largely diagnosed this issue and created a workaround. Here is the problem as I understand it:

Core Akeneo 2.3 has updated the MeasureBundle to use a new MeasureManager service to store and load the measure configuration. In addition, the measure config is stored without the top-level 'measures_config' node and is now just an array of the families.

So, during the MeasuresCompilerPass run, you must redefine the call to the MeasureManager to set the config:

        $container
            ->getDefinition('akeneo_measure.manager')
            ->removeMethodCall('setMeasureConfig')
            ->addMethodCall('setMeasureConfig', [
                $container->getParameter('akeneo_measure.measures_config')
            ]);

However, this will not fix the issue as the MeasureManager expects the data as an array of the families and the ExtendedMeasureBundle currently generates and reads this data with the 'measures_config' top node.

In my local fix I simply overrode the MeasureManager to add this node when reading the config array, but the real fix is probably to update the ExtendedMeasureBundle to drop the 'measures_config' node from the config generation and to use the MeasureManager to retrieve the measure data.

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

No branches or pull requests

1 participant