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

External files do not open anymore (Windows 10) #6863

Closed
1 task done
podkop opened this issue Sep 3, 2020 · 7 comments · Fixed by #6928
Closed
1 task done

External files do not open anymore (Windows 10) #6863

podkop opened this issue Sep 3, 2020 · 7 comments · Fixed by #6928
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs external files
Milestone

Comments

@podkop
Copy link

podkop commented Sep 3, 2020

JabRef version 5.1--2020-08-30--e023aa0
Windows 10 10.0 amd64, Java 14.0.2

After updating JabRef from 5.0 to the newest version downloaded from here: https://www.fosshub.com/JabRef.html ("JabRef Windows Installer"), external files linked to the bibliography entries do not open anymore. Everything worked with the same bib file in the previous JabRef version.

  • "Linked files" icons are still shown near entries. However when clicking on such an icon, JabRef opens my default documents folder.
  • Context menu items "Open folder" and "Open file" are dimmed.
  • In the entry editor / "General" pane, when hovering over the file name element, a tooltip appears with the text "Could not find file ...".
  • When adding a link to a pdf file using the entry editor (by navigating to the file), the path do the pdf file does not become relative path, as in the previous JabRef version.

The same behavior was also observed for latest development version (JabRef-5.2.msi, 2020-09-03 13:04, 178.9 MB, JabRef 5.2--2020-09-03--1283f9f).

Steps to reproduce the behavior:

  1. Create any bibliography entry
  2. In the entry editor / "General" pane, click "+" icon on the right of the "File" field, and select a pdf file
    The file name appears in the "File" field, the "Open file" icon appears near the entry, but the corresponding functionality does not work as described above.

Below is an example of a bibliography entry (among tens of entries in my bibliography file, all having links to pdf files, none of them work). The entry has two links to a same pdf file. The first one is relative, it was added in a previous version of JabRef, and worked as expected in the previous version. The second link is absolute, it was added in the current version of JabRef. None of the links work; the described behavior applies to both of them.

@Article{Monkk2013,
  author    = {Mikko M{\"o}nkk{\"o}nen and Artti Juutinen and Adriano Mazziotta and Kaisa Miettinen and Dmitry Podkopaev and Pasi Reunanen and Hannu Salminen and Olli-Pekka Tikkanen},
  title     = {Spatially dynamic forest management to sustain biodiversity and economic returns},
  doi       = {http://dx.doi.org/10.1016/j.jenvman.2013.12.021},
  issn      = {0301-4797},
  number    = {0},
  pages     = {80--89},
  url       = {http://www.sciencedirect.com/science/article/pii/S030147971300769X},
  volume    = {134},
  abstract  = {Removed for shortening},
  file      = {:Papers/Optimization_and_Decision_Making/Forest_Management/Spatially_dynamic_forest_management_to_sustain_biodiversity_and_economic_returns_2014.pdf:PDF;:C\:/Mytemp/dropbox/Bibliography/Papers/Optimization_and_Decision_Making/Forest_Management/Spatially_dynamic_forest_management_to_sustain_biodiversity_and_economic_returns_2014.pdf:PDF},
  journal   = {Journal of Environmental Management},
  keywords  = {Biodiversity; Cost-effectiveness; Forest management; Land use planning; Multi-objective optimization},
  timestamp = {2014.01.29},
  year      = {2014},
}
@Bassbiest
Copy link

I can confirm all of the above.

JabRef 5.1--2020-08-30--e023aa0
Windows 10 10.0 amd64
Java 14.0.2

@Siedlerchr
Copy link
Member

Check your settings for the file directories.

@Bassbiest
Copy link

The settings for default file directories were empty. Setting general or user-specific file directory worked. I can open files directly from JabRef again.

@Siedlerchr
Copy link
Member

It's a nasty bug which somehow slipped into the 5.1 release.

@podkop
Copy link
Author

podkop commented Sep 8, 2020

@Bassbiest

The settings for default file directories were empty. Setting general or user-specific file directory worked. I can open files directly from JabRef again.

Can you please specify, which settings are you talking about?

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Sep 8, 2020
@Siedlerchr Siedlerchr added this to the v5.2 milestone Sep 8, 2020
@Siedlerchr
Copy link
Member

@podkop
Copy link
Author

podkop commented Sep 9, 2020

@Siedlerchr Thanks a lot, got it. I guess it is clear that option "Search and store files relative to library file location" should be switched on by default for compatibility with previous versions.

There is a related issue. Links to files where the absolute path is given do not work. I guess they worked before 5.0. Maybe this functionality was removed intentionally. However, I know a use case where having absolute links to files would be convenient.

In order to make absolute links work, it would be enough to check if the full file name starts with the drive letter or slash, and do not prepend the main directory if yes. Do you think it is worth creating new issue?

@calixtus calixtus self-assigned this Sep 15, 2020
calixtus added a commit that referenced this issue Sep 21, 2020
Siedlerchr pushed a commit that referenced this issue Sep 25, 2020
…ile" to true (#6928)

* Fixes #6863

* CHANGELOG.md

* Reworded bibLocationAsPrimary to reflect real meaning of the preference setting, changed default val to true

* Cleanup of deprecated methods LinkedFiles(String, String, String) and List<String> getFileDirectories(...)

* Reworded package filelist to linkedfile

* Fixed SpringerFetcher
@koppor koppor moved this to Done in Prioritization Nov 10, 2022
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 external files
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants