GithubHelp home page GithubHelp logo

Comments (5)

colemanw avatar colemanw commented on August 20, 2024

@jaapjansma you just have to add the mixin tag to your info.xml, per #233, you should type:

civix mixin:menu-xml

So I think this is a documentation issue rather than a bug?

from civix.

totten avatar totten commented on August 20, 2024

@jaapjansma Yeah, to rewind a half-step -- civix v22.05 has converted several boilerplate hooks to mixins. This article describes the change in more detail: https://civicrm.org/blog/totten/civix-v2205-how-remove-million-lines-extra-code

Key points:

  • If an extension was initialized before v22.05, then you should run civix upgrade to convert it. (This removes the hooks and updates info.xml).
  • If you create a new extension on v22.05, it will activate mixins as-needed (ex: generate:page needs to register menu items; so it activates <mixin>[email protected]</mixin>). Here's how that should look: https://gist.github.com/totten/c15833c5fd5937924427b977cc2f3ff1

If that doesn't help solve the issue, then there could be some bug or omission (in how civix applies changes). A quick-and-dirty resolution could be this: activate all mixins. (This is functionally equivalent to the old templates -- which activated all boilerplate.) This command should work on civix v22.05.5+:

civix mixin --enable-all

Of course, if there is some bug or omission, then it would be great to learn more (eg a link to an extension that doesn't upgrade cleanly; or a console log where it fails to enable a mixin). I do have a feeling that we'll find some cases that need more polish.

from civix.

jaapjansma avatar jaapjansma commented on August 20, 2024

Ah ok. I did not try the mix-in method I was not aware I should do that.

from civix.

colemanw avatar colemanw commented on August 20, 2024

Civix will automatically convert your extension to using mixins (in a backward-compatible way using shims) if you type civix upgrade.

from civix.

totten avatar totten commented on August 20, 2024

It sounds like we can close this. Feel free to reopen if there's another issue.

from civix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.