-
Notifications
You must be signed in to change notification settings - Fork 56
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
Menu mixin problem on older version of civi #257
Comments
I have the same issue: in older versions of CiviCRM my menu items disappear whenever I do a clear cache. And unlike above the civicrm/menu/rebuild?reset=1 does not bring it back |
I have the same issue and discovered the cuase in the boilerplate code generated by civix. in Change foreach ($mixins as $mixin) {
// If there's trickery about installs/uninstalls/resets, then we may need to register a second time.
if (!isset(\Civi::$statics[__FUNCTION__][$mixin])) {
\Civi::$statics[__FUCTION__][$mixin] = 1;
$func = $_CIVIX_MIXIN_POLYFILL[$mixin];
$func($mixInfo, $bootCache);
}
} to foreach ($mixins as $mixin) {
// If there's trickery about installs/uninstalls/resets, then we may need to register a second time.
if (!isset(\Civi::$statics[$longName][$mixin])) {
\Civi::$statics[$longName][$mixin] = 1;
$func = $_CIVIX_MIXIN_POLYFILL[$mixin];
$func($mixInfo, $bootCache);
}
} I will submit a patch for civix soon. |
Good detective work @jaapjansma - looks like the before version would cause multiple extensions to interfere with each other. |
Yes indeed it does. I did the discovery on a Civi 5.37 version. |
Ah and I see that I need to update the code in core and then update civix |
I have created a PR: civicrm/civicrm-core#25179 @colemanw are you able to review that PR? After the PR is ok and merged we can update CiviX to load the fixed boilerplate. |
totten/civix#257 Fix Civix not correctly loading Mixinx
Apply update polyfill. Add test coverage for generating multiple extensions. (#257)
Well done @jaapjansma! The update works for me. Applied updates to both |
Thanks @totten |
Would it be wise to release new version of civix and inform the community through mattermost that an update of civix is advisable to do? So that extension developers get the new polyfill as soon as they work on their extensions with civix? |
This is on 5.44. There's an argument to upgrade and I can't reproduce the problem on master so I don't know how much time I'll spend tracking it down but what happens is that if you clear cache, the menu route disappears (visiting the url in the browser goes to the civi dashboard) and you need to visit
/civicrm/menu/rebuild?reset=1
to get it to come back.The extension also uses hook_navigation_menu, but might not be relevant.
In info.xml it has
<format>22.05.2</format>
andIn xml/Menu:
The text was updated successfully, but these errors were encountered: