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

[Craft 4] Investigate why auto-bootstrapping is initializing twice. #54

Open
joshuapease opened this issue Aug 29, 2022 · 4 comments
Open
Labels
bug Something isn't working

Comments

@joshuapease
Copy link
Contributor

No description provided.

@matthisamoto
Copy link

matthisamoto commented May 17, 2024

Y'all ever figure this one out? Noticed this as well on some inherited work.

@joshuapease
Copy link
Contributor Author

Hey @matthisamoto! We did resolve this issue.

In our case, we had both the bootstrap() and init() method.

The solution was to remove the init()

Commit: 4a1d3a5

@matthisamoto
Copy link

@joshuapease Awesome, yeah I went looking because I was seeing most noticeably in how Sections or Fields appears twice in the CPNav, and I found that not explicitly loading it in app.php eliminates this, presumably because it's now auto-loading (this was on a project we upgraded to Craft 4.x).

That said I don't know that that's the same problem described in this issue, and something you all probably figured out a while back!

@joshuapease
Copy link
Contributor Author

joshuapease commented May 17, 2024

Was just about to comment about that scenario as well!

This particular issue was happening for new installs.

But you're correct, older versions required that you manually bootstrap the module in app.php or as a sub-module.

Here's some old docs talking about both of those ways of initializing the module. Both can be removed with the Craft 4 version of the base module (since it bootstraps automatically now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants