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

Disabled python extensions still capture their trigger #978

Closed
AdamPS opened this issue Jan 15, 2021 · 6 comments
Closed

Disabled python extensions still capture their trigger #978

AdamPS opened this issue Jan 15, 2021 · 6 comments
Labels
Bug P3 Medium Fix, but can wait if there's more import stuff to do.

Comments

@AdamPS
Copy link

AdamPS commented Jan 15, 2021

Great program many many thanks

Source

PPA 0.17.2-0 Ubuntu

Steps to reproduce

Enable main python extension, disable all individual python extensions. Type the trigger of an extension into the launcher, e.g. "php loop".

Expected behaviour

The disabled extension should be ignored so search for the text "php loop".

Actual behaviour

The disabled extension seem to capture its trigger. There are no available completions.

Additional info

Albert report output core: Albert version: 0.17.2 core: Build date: Oct 29 2017 00:00:00 core: Qt version: 5.12.8 core: QT_QPA_PLATFORMTHEME: core: Binary location: /usr/bin/albert core: SHELL: /bin/bash core: LANG: en_GB.UTF-8 core: XDG_SESSION_TYPE: x11 core: XDG_CURRENT_DESKTOP: ubuntu:GNOME core: DESKTOP_SESSION: ubuntu core: XDG_SESSION_DESKTOP: ubuntu core: OS: Ubuntu 20.04.1 LTS core: OS (type/version): ubuntu/20.04 core: Build ABI: x86_64-little_endian-lp64 core: Arch (build/current): x86_64/x86_64 core: Kernel (type/version): linux/5.4.0-60-generic
QtDiag output Command not found.
Terminal output (stdout and stderr) No terminal running.
@AdamPS
Copy link
Author

AdamPS commented Jan 15, 2021

I think it's a new bug introduced in a recent release.

@stale stale bot added the Stale Stale issue, closing soon. label Apr 15, 2021
@ManuelSchneid3r ManuelSchneid3r added Bug P4 Low Maybe wontfix. Most users wont even notice, probably not worth a fix. (Qt Bugs) Core and removed Stale Stale issue, closing soon. labels Apr 16, 2021
@KuenzelIT
Copy link

I've got the same problem when trying to search for php related stuff using duckduckgo. I don't have the php eval extension enabled. And I don't get any results if the search string starts with 'php'.

The same thing happens with other python extension that are not enabled, e.g. "test " or "awiki ".

@ManuelSchneid3r ManuelSchneid3r added Bug P3 Medium Fix, but can wait if there's more import stuff to do. and removed Bug P4 Low Maybe wontfix. Most users wont even notice, probably not worth a fix. (Qt Bugs) labels May 27, 2021
@mmpfister
Copy link

@ManuelSchneid3r I think the bug can be easily fixed by modifying the triggers function of the Python extension. It should be checked whether the respective Python module (PHP, Timer, etc.) is enabled and loaded (similar to the extension's handleQuery function) before returning its trigger. A quick test showed that this fixes the behavior described in this issue.

If you agree, I could open a pull request (possibly in the plugin-git for a separate issue (?)).

@KuenzelIT
Copy link

This quick fix would be awesome. I get this bug quite often while working with php and python. I assume another solution would be to delete the python extensions?

@tchar
Copy link

tchar commented Jul 8, 2021

Hello, I just discovered this issue and came here to see if anybody has the same problem.
For the moment, the only fix is to completely move the python extensions that are not enabled to another directory. But built in extensions won't change the issue.

However, the problem remains.
I have built an extension with no trigger similar to files from albert, but implements the proper .gitignore with pathspec so I avoid creating multiple .albertignore files in every directory..

When the search term is a keyword from another extension it does not even get triggered, which kinda messes up the whole idea of searching for files.

Same issue with a calculator I built to calculate anything. Every time the input is a keyword, the calculator doesn't trigger.

I guess if this is to be fixed albert has to also trigger python extensions with no trigger even if other extensions are enabled and triggered. Right?

@AdamPS
Copy link
Author

AdamPS commented Oct 8, 2022

Great thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug P3 Medium Fix, but can wait if there's more import stuff to do.
Development

No branches or pull requests

5 participants