Disabled python extensions still capture their trigger
AdamPS opened this issue · 6 comments
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-genericQtDiag output
Command not found.Terminal output (stdout and stderr)
No terminal running.I think it's a new bug introduced in a recent release.
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 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 (?)).
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?
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?
Great thanks