-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Changes in entry preview are not saved #6447
Comments
Thanks for the report. Does the Preview update if you close and reopen the entry editor? |
No. |
@Siedlerchr I am interested in this issue. Can you give me any suggestions or any relevant code where the bug might be? |
@dimitra-karadima Some points: PreviewTab (in the preferences) as well and for the entry editor it might be the PreviewPanel. Probably that the PreviewPreferences are not reloaded in the PreviewPanel when a new style or a modified style is saved Maybe @leitianjian can help you a bit, she/he worked recently in that area |
@Siedlerchr thanks for the guidance! I will check it out. |
My point of view was to find out where the new changes are being saved in order to update there the PreviewTab. I have found that this happens in https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/preferences/PreviewTabViewModel.java#L204 so I made an instance of PreviewPanel in order to update Layout, but it didn't work. I don't know if it is that I created a new Object or it was the wrong thought. @Siedlerchr or anyone else any thoughts? |
Hi, I think this bug is hard to locate and has huge gaps between the previous bug I fixed and this one. I also stuck in it. If you don't mind and you don't work on it, I will fix this bug. If you are still working on it, keep going on, we can discuss it according to your progress. Sorry for my late reply. I do not receive any notification that I have been mentioned. Sorry again. |
@leitianjian I am not working on it because I am kinda stuck. All I have found was what I mentioned above. I am kind of busy so you can work on it if there are a lot of steps left, but if I am on the right path we can discuss it and try to find the solution together. |
Thanks for your kindness. In fact, I find that your path is not exactly correct. We should not initialize another object of PreviewPanel which is JavaFX Vbox. I think we should modify some code to let the PreviewPanel content update after saving the preferences, which is a little difficult and deep tasks. The things I'm doing now is to figure out how the preview showing on the EntryEditor, and trying to give an elegant solution to update the preview. If you are still interested in it. Feel free to ask, we can work on this bug together. |
Thanks to @leitianjian this should be fixed |
Sorry for the delay in testing the fix. |
ping @Siedlerchr @leitianjian |
Hello, |
Still reproducible in the current dev version. Problem was that the layout was not found due to incorrectly using a l10n value for comparison |
Introduce internal name for finding layout Fixes #6447
* Fix preview settings not saved due to l10n Introduce internal name for finding layout Fixes #6447 * rename getInternalName
The issue is now finally resolved in the latest master (currently building) We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you. Please remember to make a backup of your library before trying-out this version. |
Works in |
Can also confirm that it works. |
Fixed, indeed. Thank you @Siedlerchr! |
Every time I open JabRef something in the customized entry preview style I have already changed many times is reset again.
So, |
@AtrusRiven Which version of JabRef are you using? |
I'm using the actual master build ( |
Indeed, can reproduce this. for some reason it's not saved after a restart or reset on a restart. |
@AtrusRiven You have triggered an edge case, it's the Preferences Migration that is executed on startup that overwrites your changes. Just add a space after the HtnlChars Formatter Name : jabref/src/main/java/org/jabref/migrations/PreferencesMigrations.java Lines 313 to 319 in b9be53e
|
Thanks, now it works. What is this replacement for? |
It's a migration if you come from a previous version. E.g. If some internal fields or prefs got renamed |
At the moment, switched on Markdown results in a line break as I mentioned above. Would it be possible to remove that automated line break? |
Bug seems to be in JabRef 5.4--2021-11-15--8a3b77b @Siedlerchr Please, re-open. |
Can confirm, the bug is very annoying. |
@fl-la Solution/workaround:
|
I'm facing a similar issue: Whenever to try to edit the Entry Preview, it fails. It doesn't show on the preview tab, by contrast with what the author of this issue is experiencing, and rebooting doesn't make any change whatsoever. However, using JabRef 5.5 portable, the issue is the same as yours: editing will only take effect after rebooting, and is shown in the preview tab. Curiously, going back to JabRef 5.4 which is installed system-wide, reveals the edited entry preview, but I still can't edit it. Also curiously, I found a situation where this does not seem to apply when using JabRef 5.5.
For some reason, having the It seems that, after fooling around, some edits take place immediately, others don't and some aren't even allowed. This seems like quite a strange bug, and I'm not sure if I'm making myself clear, so feel free to ask me for further information. System:
|
41531558a8 Fix unsigned newspaper articles throughout Chicago 17 (#6486) 7678212826 Create trames.csl (#6479) 0cae26ac85 Update hochschule-fur-soziale-arbeit-fhnw.csl (#6480) 85c4b693a2 Update to UP Harvard Theology & Religion (#6485) c273aa7e43 Update ieee.csl (#6481) fe67b80e47 Update open-window.csl (#6367) f2229705ef Create iainutuban-tarbiyah.csl (#6361) 1867a56a26 Create business-and-human-rights-journal (#6359) 1371dbdf26 Update iso690-author-date-es.csl (#6477) 6953a43efd Update ieee.csl (#6478) f56d5ef1cc Create czech-journal-of-international-relations.csl (#6453) 678b53f99c Update harvard-stellenbosch-university.csl (#6464) 3074938038 Update ucl-university-college-apa.csl (#6475) 27dab9ea0f Update iso690-author-date-es.csl (#6476) a8aea63d00 Create elsevier-american-chemical-society.csl (#6342) f8f290fa63 Update iso690-author-date-es.csl (#6472) 7fdc621eee Update journal-of-neolithic-archaeology (#6466) 7025568e70 Update offa.csl (#6465) 2d69299b19 Create uni-fribourg-theologie.csl (#6473) 8db531a73e Create travail-et-emploi.csl (#6351) c8b54fc531 Make monash-university-harvard dependent style (#6470) b95f59ff5c Update journal-of-the-marine-biological-association-of-the-united-kingdom.csl (#6456) a12b513119 Update universite-du-quebec-a-montreal.csl (#6463) 048e6641e4 Update zeitschrift-fur-geschichtsdidaktik.csl (#6454) f0d3d7ef15 Update journal-fur-kulturpflanzen-journal-of-cultivated-plants.csl (#6447) 3b814fe048 Update the-accounting-review.csl (#6459) f24befd580 Update survey-of-ophthalmology.csl from ama.csl to its own independent style (#6460) c868ab54f6 Create vancouver-alphabetical.csl (#6461) 782e39cfe1 Update american-institute-of-physics.csl (#6457) a56cf03e3c Fix Chicago Cases & Newspaper sorting (#6458) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: 41531558a873b2533f2d17d8d6484c2408174fce
JabRef 5.1--2020-05-04--b5599c9
Linux 4.9.0-12-amd64 amd64
Java 14.0.1
Changes in the entry preview format are accounted for only after restarting.
Note 1: may seem similar to issue #5464, but the present issue is about the content of the preview.
Note 2: issue is present with "Show preview as tab in entry editor" checked or unchecked.
Steps to reproduce the behavior:
\begin{journal} <em>\format[HTMLChars]{\journal}, </em>\end{journal}
into
\begin{journal} <em>\format[HTMLChars]{\journal},HereIsMyChange </em>\end{journal}
==> The preview is updated accordingly.
The preview shows:
HereIsMyChange
is not displayed ==> The preview is NOT updated.The preview shows:
HereIsMyChange
is displayed ==> The preview is updated NOW.The text was updated successfully, but these errors were encountered: