Conflict with RokCommon Library and RokSprocket

Last update: 13 February, 2017

There is a conflict between Yoast SEO (Premium) in combination with RokCommon Library and RokSprocket. Our developers have looked into the issue and determined we are unable to fix by making a code change to our plugin. Technical details regarding the issue:

In JavaScript it is possible to add or overwrite any build-in function on objects within the language. For example it is possible to add a nice Array.sum function to make your code prettier with things like [1,2,3].sum(). This is widely regarded as a bad practice within the JavaScript community because it has a lot of drawbacks.

In the context of this issue, MooTools is overwriting the build-in bind function on JavaScript Function objects. It changes it from expecting multiple arguments to expecting one argument with an array. We use the bind functionality extensively in the plugin to make our code as readable and maintainable as possible. Before bind some of this code would be much longer and harder to understand. MooTools has removed this overwriting since version 1.3: But by default MooTools includes a compatibility layer that still overwrites bind.

The easiest way to fix this issue is disable the 1.2-compatibility layer included in MooTools within the RockSprocket plugin. Because the MooTools within the plugin is 1.4.5.

Your best bet to resolve these issues is to contact RokSprocket to see if they can fix this issue.

Was this article helpful? ·