Restore original button for custom css (OJS 3.2)

Hi,
after a test update from 3.1.2-4 to 3.2.1-2 a “Restore original” button appeared in Settings>Website>Advanced >Journal style sheet.
We understood that “Restore original” is a function to restore a deleted css, and the we saw that its’ normal behavior is to disappears when changing tab/page.
Can anybody confirm how “Restore original” works, that it should not be here after an update and how to remove it now?
We checked documentation but there’s nothing about “Restore orignal”.
Best regards,
Stefano
immagine

Hello @bolelligallevi,

“Restore Original” only works before the changes are saved. For example: you already have a CSS file uploaded. You upload a new CSS file. Before you click “Save”, the “Restore Original” button will appear and it will allow you to revert to the CSS file that was there before. Once you “Save”, that option is no longer available because the old file is overwritten. When you browse away from the page without saving, the new CSS file has not yet been saved to the system, so the old file is effectively still there.

Best regards,

Roger
PKP staff

1 Like

Hello @rcgillis,

thanks for your answer.
Now the Restore Original behavior is clear, but we confirm the issue I mentioned in the previous post: after a version update (3.1.2-4 to 3.2.1-2) we have a “Restore Original” button for each journal that had a css before update, despite the css after the update are the same.
How can we remove this inconsistent Restore Original, and report this issue to developers in order to avoid it in future versions?
Best regards
Stefano

Hi @bolelligallevi,

I believe this might have been fixed in 3.3, but I can’t be sure. I recall working on a similar issue at some point in the past, but I can’t remember if it was precisely this issue. I’ve tried looking through the history to identify the precise fix, but I suspect it might have been included in the major UI refactor for 3.3.

Are you able to reproduce this problem after you upload a file, then reload the page? If it still occurs, then I can try to reproduce it and see if there is a simple fix we can backport.

Hi Nate,

I made this test:

  1. Settings>Website>Appearance click Advanced tab (see first screenshot)
  2. click on Remove
  3. click un Upload file
  4. after upload (see second screenshot) reload the page (Edge refresh command) without saving
  5. click on Advanced tab: the css is the original one, and the Restore Original button is still there

Let me know if this is the test you need to reproduce the issue.
Best regards
Stefano

immagine

immagine

immagine