2.1Beta: Infobox when saving a new article is not shown

Found a bug? Tell us!!
User avatar
onli
Regular
Posts: 2115
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.1Beta: Infobox when saving a new article is not shown

Post by onli » Sun Sep 11, 2016 11:50 pm

It will be the way we clear the cache. This is how we do it:

Code: Select all

serendipity.eraseEntryEditorCache = function() {
    serendipity.cache("serendipity[body]", null);
    serendipity.cache("serendipity[extended]", null);
}
This will then later set null as the cache content:

Code: Select all

event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").put(data, id)
Probably IE does not want to set null as the cache content. And yes, it is a bug: https://developer.microsoft.com/en-us/m ... es/106663/.

We could replace null with "". I'll test it in FF and then let you test it in other browsers…

Still, separate bug. Do you want to go ahead and remove the backend js from preview_iframe?

User avatar
onli
Regular
Posts: 2115
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.1Beta: Infobox when saving a new article is not shown

Post by onli » Sun Sep 11, 2016 11:56 pm

onli wrote:We could replace null with "". I'll test it in FF and then let you test it in other browsers…
Worked for me. I pushed it, https://github.com/s9y/Serendipity/comm ... 3b9fb95d1f. Would be great if you could test it in Chrome and IE.

User avatar
yellowled
Regular
Posts: 6906
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2.1Beta: Infobox when saving a new article is not shown

Post by yellowled » Mon Sep 12, 2016 10:29 am

onli wrote:Would be great if you could test it in Chrome and IE.
So the expected behaviour is

A. autosave still works
B. editing + saving the saved entry does not create a new entry
C. saving the entry clears the entry cache/editor

which I tested in

* Chrome/Mac: works as expected
* Safari/Mac: works as expected
* Safari/iOS: works as expected
* IE 11/Win 10: works as expected \o/
* Edge 13/Win 10: works as expected \o/

I won't test IE 8 + 9 again since this should not affect them since they don't support indexedDB anyway. Also won't bother testing IE 10 again since that is really going down fast in user numbers.

Went ahead and removed the backend JS assets from the preview_iframe.tpls for 2k11, clean-blog and timeline. And here's a nice one: We do not have any theme in additional plugins that ever used this (I guess because all the modern ones in there are child themes of 2k11), so a) nothing to edit there and b) no issues with backwards compatibility. \o/

Can you please document this in docs/NEWS?

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
yellowled
Regular
Posts: 6906
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2.1Beta: Infobox when saving a new article is not shown

Post by yellowled » Mon Sep 12, 2016 12:42 pm

yellowled wrote:Went ahead and removed the backend JS assets from the preview_iframe.tpls for 2k11, clean-blog and timeline.
Teeny, tiny thing: since we just removed all serendipity_getFile instances which loaded admin theme assets in preview_iframe.tpls … do we actually still need the frontend=true thingy? Would it be useful to keep around even if we don't need it?

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
onli
Regular
Posts: 2115
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.1Beta: Infobox when saving a new article is not shown

Post by onli » Mon Sep 12, 2016 5:17 pm

Themes like next still need that to load their frontend css in the iframe, if I don't get confused right now.

User avatar
onli
Regular
Posts: 2115
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.1Beta: Infobox when saving a new article is not shown

Post by onli » Mon Sep 12, 2016 5:43 pm

yellowled wrote: Can you please document this in docs/NEWS?
Done: https://github.com/s9y/Serendipity/comm ... 12d196be83

Post Reply