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

Opening BibTex file (doubleclick) from Folder with spaces not working #6487

Closed
cpsychal opened this issue May 16, 2020 · 25 comments · Fixed by #6503 or #7551
Closed

Opening BibTex file (doubleclick) from Folder with spaces not working #6487

cpsychal opened this issue May 16, 2020 · 25 comments · Fixed by #6503 or #7551
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@cpsychal
Copy link

When double click a BibTeX file in the file browser, then JabRef opens with message “File not found”.
The file opens only through the menu of Jabref: File–> Open…
That happens after the last upgrade.

@mr-j-s
Copy link

mr-j-s commented May 18, 2020

Same problem, Windows 10, Jabref v5.0 cannot open .bib files with double-click. Only "File->Open" or drag-n-drop*.
Surprisingly, double-click always works if file is located on desktop (discovered by accident)!
Not opening behaviour depends on whether JabRef application was already launched or not when trying to open with double click:

  1. not launched => I get an error message
    "Error opening file 'filename.bib'.
    File not found"
  2. launched => I get NO error message and TWO tabs appear:
    first one called "untitled", second called "filename.bib", but both are empty ("no content in table")

(*) Maybe this should be a separate issue, but opening by drag-n-drop also has a problem, it works only if I drag file in the panel with tabs (see the screenshot below):
image
It means that I need to have at least one file already opened, otherwise there is no panel with tabs and this method will not work.
image

I suggest to make empty JabRef window also active for drag-n-drop.

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label May 18, 2020
@RickVandoorne
Copy link

I have the exact same problem. I am also running Windows 10 and have the same behaviour as @MrJoposranchik and @cpsychal.

@Siedlerchr
Copy link
Member

Regarding Drag and Drop: I think the Drag and drop listener is installed on the tab bar. That would explain at least the opening of files. Must be probably moved to JabRefFrame or so.

@Siedlerchr Siedlerchr changed the title Open BibTeX file through the file browser Open BibTeX file through the file browser and Drag and drop on empty database not working May 19, 2020
@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label May 19, 2020
@Siedlerchr
Copy link
Member

Doube clicking on a bib file works and opens JabRef fine in the latest development version
@cpsychal Can you please give us a bit more details, e.g. which OS you are using and if you have tested the latest development version?

@cpsychal
Copy link
Author

cpsychal commented May 19, 2020 via email

@RickVandoorne
Copy link

Doube clicking on a bib file works and opens JabRef fine in the latest development version
@cpsychal Can you please give us a bit more details, e.g. which OS you are using and if you have tested the latest development version?

The behaviour I experience is that JabRef opens but it gives an error message. One can close this error message and the application does not close, but it does not load the bib file. One then has to go and open the bib file from within JabRef.

Error

@Siedlerchr
Copy link
Member

Siedlerchr commented May 21, 2020

The drag and drop should be fixed by @MootezSaaD now in the latest development version:
https://builds.jabref.org/master/

Edit// I could not reproduce the issue with the double clicking on Windows 10

Please remember to make a backup of your library before trying out the new version.

@mr-j-s
Copy link

mr-j-s commented May 21, 2020

Doube clicking on a bib file works and opens JabRef fine in the latest development version
@cpsychal Can you please give us a bit more details, e.g. which OS you are using and if you have tested the latest development version?

I was checking the previous dev version for 5 minutes when a new update appeared.
In the previous version double click opened a .bib file for me once, but only for the case when app was not started. After that with running app double click resulted in a single "untitled" tab. (I didn't investigate much)
In the latest development version double click doesn't work. If app was not running - empty JabRef window opens. If app was already running - "untitled" tab.
If file is on the desktop - it works in both cases! (Why? Is it true for other people with the same issue?)

Drag and drop works well now! Thank you, @MootezSaaD !

@Siedlerchr
Copy link
Member

Could you please completey uninstall JabRef and then reinstall the new version? It might that the file asociation is somewhat broken

@RickVandoorne
Copy link

I have completely uninstalled JabRef and installed the latest development version at https://builds.jabref.org/master/. This is the behaviour I get now:

  • If I double click on a .bib file while JabRef is NOT running then JabRef opens (it no longer gives me the error message). However, it does not open the file which I double clicked.

  • If I double click on a .bib file while JabRef is running it opens a new library called "untitled" but not the file I double clicked.

  • If I open JabRef first and then open a file using "File" → "Open library" it works fine.

@Siedlerchr Siedlerchr reopened this May 21, 2020
@mr-j-s
Copy link

mr-j-s commented May 21, 2020

I have completely uninstalled JabRef and installed the latest development version at https://builds.jabref.org/master/. This is the behaviour I get now:

  • If I double click on a .bib file while JabRef is NOT running then JabRef opens (it no longer gives me the error message). However, it does not open the file which I double clicked.
  • If I double click on a .bib file while JabRef is running it opens a new library called "untitled" but not the file I double clicked.
  • If I open JabRef first and then open a file using "File" → "Open library" it works fine.

It seems that we have exactly the same symptoms. However, I didn't try to reinstall from scratch yet. May I kindly ask you to try to place a .bib file on Desktop and open it with double-click to confirm or disprove that Desktop location is somewhat special?

@RickVandoorne
Copy link

I tried opening a .bib file directly on the desktop but the behaviour I get is exactly the same as with a .bib file placed elsewhere on the system. So I don't seem to get the special behaviour you described @MrJoposranchik .

@thanaset
Copy link

Same issue here.

JabRef version 5.0 on Windows 10

Opening .bib files from within JabRef is fine but clicking on a .bib file in Windows Explorer results in a blank page on JabRef.

Steps to reproduce the behaviour: double click on a .bib file icon.

@ihesham
Copy link

ihesham commented Jun 3, 2020

Same issue here.

JabRef version 5.0 on Windows 10

Opening .bib files from within JabRef is fine but clicking on a .bib file in Windows Explorer results in a blank page on JabRef.

Steps to reproduce the behaviour: double click on a .bib file icon.

Same issue above

@Siedlerchr
Copy link
Member

I have exported my Windows 10 registry settings for the file association and open with application.
While I have the dev version installed it should theoretically also work with the 5.0
It assumes that JabRef is installed under C:\Program Files\JabRef
Just remove the .txt file extension and execute it

WARNING: TRY AT YOUR OWN RISK
jabref_fileassociation.reg.txt

@mr-j-s
Copy link

mr-j-s commented Jun 3, 2020

I have exported my Windows 10 registry settings for the file association and open with application.
While I have the dev version installed it should theoretically also work with the 5.0
It assumes that JabRef is installed under C:\Program Files\JabRef
Just remove the .txt file extension and execute it

WARNING: TRY AT YOUR OWN RISK
jabref_fileassociation.reg.txt

Tried that, didn't fix the issue with double-click.

@mr-j-s
Copy link

mr-j-s commented Jun 3, 2020

I think I noticed something important:
double-click works for me not only from Desktop, but also from D:\biblio.bib and even e.g. D:\1\biblio.bib or D:\a\biblio.bib
BUT
if I try to open "D:\1 1\biblio.bib", it fails as usual (there is a space in the folder name)
I tried to replace all the spaces with underscores in the path to one of my .bib files and it also started to work.
Finally, I renamed it from "biblio.bib" to "bib lio.bib" and it started to fail again.
So any space in the path to file breaks it.

I hope this info will help to fix the issue!

@Siedlerchr
Copy link
Member

Thanks! Indeed that information could be helpful.

@RickVandoorne
Copy link

I did a test and got the same behavior as @mr-j-s .

If the file path to the ".bib" file has any spaces in it at any point, then when double clicking on the ".bib" file JabRef opens to a blank page, but it does not open the ".bib" file itself.

If there are no spaces in the file path. Then JabRef opens the ".bib" file as would be expected.

This file path did not work: "D:\New Folder\References.bib"
This file path did work: "D:\References.bib"

@RickVandoorne
Copy link

I tried opening a .bib file directly on the desktop but the behaviour I get is exactly the same as with a .bib file placed elsewhere on the system. So I don't seem to get the special behaviour you described @MrJoposranchik .

I have a space in the path to my desktop which explains why this did not work for me earlier.

@Siedlerchr Siedlerchr changed the title Open BibTeX file through the file browser and Drag and drop on empty database not working OPen BibTex file from Folder with spaces not working Jun 10, 2020
@Siedlerchr
Copy link
Member

I could reproduce this as well using a space in the folder. I checked the registry,, there the open with is correctly wrapped in spaces. Maybe an issue with our commandline parser

@Siedlerchr Siedlerchr changed the title OPen BibTex file from Folder with spaces not working Opening BibTex file from Folder with spaces not working Jun 10, 2020
@Siedlerchr Siedlerchr changed the title Opening BibTex file from Folder with spaces not working Opening BibTex file (doubleclick) from Folder with spaces not working Jun 10, 2020
@zongxian
Copy link

If the path contains Chinese characters, it will have the same error.

@sbubin
Copy link

sbubin commented Jan 5, 2021

Same issue. Jabref 5.2 on Windows 10. Cannot open a bib file by double clicking on it when the full path of that file contains spaces. If is is copied to a location with no spaces in the path then it works fine. I hope this bug gets fixed soon as I remember experiencing this annoying behavior of Jabref for quite some time.

@XDZhelheim
Copy link
Contributor

I'm trying to fix this. Got some clues already.

XDZhelheim added a commit to XDZhelheim/jabref that referenced this issue Mar 18, 2021
tobiasdiez pushed a commit that referenced this issue Mar 19, 2021
…h spaces not working (#7551)

* Fix #7416

* sync with origin

* backtracking file path argument

who invoked the method sendMessage(type=SEND_COMMAND_LINE_ARGUMENTS) when double-clicking

* fix #6487 (draft)

* fix

* moved encoding to sendMessage
created a new test in RemoteCommunicationTest

* move clone to sendMessage
@tobiasdiez
Copy link
Member

Thanks to @XDZhelheim this should now finally be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@koppor koppor moved this to Done in Prioritization Nov 10, 2022
koppor pushed a commit that referenced this issue May 1, 2023
a985762505 Update environmental-and-engineering-geoscience.csl (#6512)
5118058ea0 Update norsk-henvisningsstandard-for-rettsvitenskapelige-tekster.csl (#6515)
e9830d3f5e Create polish-archives-of-internal-medicine.csl (#6399)
05ef543bd6 Update ieee.csl (#6511)
b6e6292e4b Update universite-de-bordeaux-ecole-doctorale-de-droit.csl (#6510)
af38aba0e9 Create la-nouvelle-revue-du-travail.csl (#6400)
4b23d7a03e Create north-pacific-anadromous-fish-commission-bulletin.csl (#6436)
77ea82a242 Create journal-of-dental-traumatology.csl (#6403)
af4578d1a7 Make magnetic-resonance-in-medicine.csl AMA dependent (#6433)
5467a4f901 Create medizinische-universitaet-innsbruck-vancouver.csl (#6484)
8a3c0a2b9b Update united-states-international-trade-commissio (#6487)
789267a9cb Update cardiff-university-harvard.csl (#6482)
252a5b5c08 Locators in palaeontology journal styles (#6496)
3d2bff0794 Update ecosistemas.csl (#6503)
199baca2c6 Bump nokogiri from 1.13.10 to 1.14.3 (#6504)
feffe61ae4 Update universite-du-quebec-a-montreal-etudes-litteraires-et-semiologie.csl (#6505)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: a985762505418bd63c26a54c59b48e3ed7426953
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
10 participants