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

When I install a minimal plugin, it breaks the portal #640

Open
exelotl opened this issue Dec 6, 2022 · 4 comments
Open

When I install a minimal plugin, it breaks the portal #640

exelotl opened this issue Dec 6, 2022 · 4 comments

Comments

@exelotl
Copy link
Contributor

exelotl commented Dec 6, 2022

Hi, I wrote a super simple plugin which adds an atom feed to flaskbb: https://git.sr.ht/~exelotl/flaskbb-plugin-atom

If I run pip install flaskbb-plugin-atom (in my virtualenv) then the flaskbb portal plugin stops working, as pictured below:

Screenshot from 2022-12-06 02-17-21

If I remove my plugin with pip uninstall flaskbb-plugin-atom then the portal starts working again.

This would lead me to believe there's something wrong with my plugin, but it's about as simple as you can get (just a route, a template, and a couple of settings - made from the cookiecutter template). I also don't understand how this could happen when my plugin isn't even enabled.

Have I done something wrong or could this be a deeper issue somewhere?

@sh4nks
Copy link
Member

sh4nks commented Dec 12, 2022

Your plugin looks fine. I don't have access to my computer at the moment (not sure when I have though..). I can't have a closer look at your problem atm - sorry!

@nikita-popov
Copy link

nikita-popov commented Feb 16, 2023

@exelotl, looks like problem in wrong hook name in flaskbb-plugin-atom/atom/__init__.py

Current is:

@hookimpl
def flaskbb_tpl_before_navigation():
    return render_template("atom_navlink.html")

Need to change to:

@hookimpl
def flaskbb_tpl_navigation_before():
    return render_template("atom_navlink.html")

After changing hook name, the download of the file is successful.

P.S.
With RSS icon <i class="fa fa-rss"></i> atom looks cool :)
image

@exelotl
Copy link
Contributor Author

exelotl commented Feb 16, 2023

@nikita-popov Oh thanks, that is indeed a problem.

But unfortunately it doesn't seem to fix the issue with the Portal plugin being broken while my plugin is installed.

Does my plugin break the Portal for you too?

@nikita-popov
Copy link

No, both works fine after that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants