Comments (9)
I have the same issue and discovered the cuase in the boilerplate code generated by civix.
in polyfill.php
a check is done whether the mixin function has already run. This is the case when you have multiple extensions enabled in CiviCRM.
Change polyfill.php
from
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.
@totten or @colemanw does this make sense to you?
from civix.
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
from civix.
Good detective work @jaapjansma - looks like the before version would cause multiple extensions to interfere with each other.
from civix.
Yes indeed it does. I did the discovery on a Civi 5.37 version.
from civix.
Ah and I see that I need to update the code in core and then update civix
from 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.
from civix.
Well done @jaapjansma! The update works for me. Applied updates to both civicrm-core
and civix
.
from civix.
Thanks @totten
from civix.
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?
from civix.
Related Issues (20)
- text when generating api entity should link to docs HOT 1
- generated entity xml does not have a title for id field
- `civix generate:upgrader` should use core upgrader (5.38+) HOT 8
- [DatabaseDriverNotSpecifiedException] HOT 1
- create composer.json on `generate:module` ? HOT 1
- civix generate:entity-boilerplate Not generating SQL in correct order for dependancies HOT 3
- civix the hook_civicrm_menuXml is gone HOT 5
- Teach civix about the [email protected] mixin HOT 6
- generate:entity-boilerplate errors output in auto_install.sql HOT 4
- generate:entity-boilerplate clean up issues HOT 5
- civix repair? HOT 4
- Boilerplate tempate(s?) idea
- php8 - civix upgrade - preg_match(): Passing null to parameter 2 ($subject) of type string is deprecated in src\CRM\CivixBundle\Upgrader.php on line 244 HOT 1
- Failed to locate scan-classes@1/mixin.php HOT 2
- `Civibuild create` fails with Redis due to cached extensions HOT 3
- php 8.1 compatibility HOT 2
- Smarty local mix-in missing? HOT 4
- php codesniffer warnings HOT 2
- Civix could (or should?) offer in-line-replacements for dropped deprecated functions HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from civix.