SUMMARY Since some recent update (I can't pinpoint the exact version, sorry), I've been unable to open PDF files directly from KBibTeX (using the "View Document" option). Instead, there is a "Malformed URL" error. I've double-checked filenames and also tried replacing the local file reference with its full path, to no avail. (Actually, since everything was working fine prior to some recent update, this could not have been the cause anyway, but it never hurts to try...) STEPS TO REPRODUCE 1. Create new bib entry 2. Add local file reference (e.g., to a PDF) 3. Right-click on entry --> View Document OBSERVED RESULT Error: "Malformed URL [full path of file]" EXPECTED RESULT The document opens. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.19.2 KDE Frameworks Version: 5.71.0 Qt Version: 5.15.0
Just updated to KDE 5.19.3 / Frameworks 5.72.0, but the problem persists.
I cannot reproduce the problem. KBibTeX does nothing special with the URL, it just passes it to the KDE subsystem (KRun::runUrl) to do something with it. Can you open the PDF file both using Dolphin and from the command line using 'kde-open5'? kde-open5 PDFFILENAMELIKEINKBIBTEX If either of above fails, it is a strong sign that the problem is not due to KBibTeX.
With kde-open5 it works just fine, both with relative and absolute paths. I also tried creating a fresh .bib file with a single entry and it still produces the same error.
(In reply to modanese from comment #3) > With kde-open5 it works just fine, both with relative and absolute paths. > > I also tried creating a fresh .bib file with a single entry and it still > produces the same error. Two things you can try: 1. Create a new account on the same machine, login, and start KBibTeX. Can the issue still be reproduced? If yes, some settings in you home directory are causing the problem. 2. Can you re-create the same problem with a more recent version of KBibTeX? The used function KRun::runUrl has been deprecated in recent KDE Frameworks versions: https://api.kde.org/frameworks/kio/html/classKRun.html#a73cdb95167576c44fcf19f1ac0d98ecf Newer KBibTeX versions, such as the upcoming 0.10 have a different code now to open URLs. Can you please try this code to see if the problem still persists? In case you are wondering how to test the code that will become 0.10, please read here: https://userbase.kde.org/KBibTeX/Development#Quick_Start_to_Run_KBibTeX_from_Git The invocation of run-kbibtex.sh would be: bash run-kbibtex.sh 'https://invent.kde.org/office/kbibtex.git' 'kbibtex/0.10'
While testing in a fresh /home directory, I *accidentally* discovered the source of the problem. Namely the URL error appears only if there are *at least 2 or more links* in the bib entry, either to local or external files. (In my bib file this *always* results in an error because I all my entries have DOI/links/etc. in addition to the PDFs.) So new steps to reproduce: 1. Create new bib entry 2. Add two or more local file references (e.g., to PDF files) 3. Right-click on entry --> View Document --> Select one of the two entries
Also, I tried to download the run-kbibtex.sh script, but the link appears to be dead (cgit.kde.org does not resolve to an IP address).
(In reply to modanese from comment #6) > Also, I tried to download the run-kbibtex.sh script, but the link appears to > be dead (cgit.kde.org does not resolve to an IP address). That was an outdated/broken link. I fixed it now, please check and let me know if there are more problems.
I can confirm the problem is fixed using the latest git version (commit 75f6a5135...), both with relative and absolute links (or combinations thereof).
Just wanted to add that I also experience the issue, so I would exclude it's a fault (or extremely exotic configuration) only for user modanese@kit.edu. Same setup Arch, Kde, and Okular viewer.
(In reply to Filippo Volpe from comment #9) > Just wanted to add that I also experience the issue, so I would exclude it's > a fault (or extremely exotic configuration) only for user modanese@kit.edu. > Same setup Arch, Kde, and Okular viewer. Good to know that two users independently can confirm the issue as I have problems to reproduce it. Filippo: can you please confirm that the latest Git version fixes the problem? Fetch 'run-kbibtex.sh' as explained earlier, then run: bash run-kbibtex.sh 'https://invent.kde.org/office/kbibtex.git' 'master' Both Filippo and modanese: please check if the code for the upcoming release of 0.10 also contains the fix. You can test the code by running: bash run-kbibtex.sh 'https://invent.kde.org/office/kbibtex.git' 'kbibtex/0.10'
0.10 also works for me.
Confirm that both master and 0.10 works for me.
(In reply to modanese from comment #11) > 0.10 also works for me. (In reply to Filippo Volpe from comment #12) > Confirm that both master and 0.10 works for me. Ok, I take it as a given that the problem is fixed and resolved as of the hopefully soon-to-be-released version 0.10. Thank you for your quick feedback!