Page 1 of 1

No error when editing entry without category

Posted: Mon Feb 12, 2018 4:25 pm
by Barberousse

On S9Y 2.1.1, I noticed that there is no error shown when the entry has no category or no title, even if the serendipity_event_entrycheck plugin is set up to forbid such entries. The next problem is that the entry is not saved, but I have a message saying that "Serendipity is saving the entry" (or something like that, but in french, the attached image). Any idea ?

No error in apache2 log, PHP, Firefox 58.0.1 or Chromium 64.0.3282.140 Ubuntu

Re: No error in iframe when editing entry

Posted: Thu Feb 22, 2018 12:00 pm
by onli
Probably if you disable the plugin, saving those entries works again?

Re: No error in iframe when editing entry

Posted: Tue Mar 20, 2018 8:29 pm
by Barberousse
Weird, it seems that serendipity.checkSave() is never called in templates/2k11/admin/serendipity_editor.js.tpl, except from serendipity_event_autosave

And serendipity_event_autosave calls checkSave(), and not serendipity.checkSave()...

If I add the call to serendipity.checkSave() on

Code: Select all

<input type="submit" value="{$CONST.SAVE}">
which becomes

Code: Select all

<input type="submit" onclick="return serendipity.checkSave();" value="{$CONST.SAVE}">
in templates/2k11/admin/entries.tpl, I have this error:

Code: Select all

TypeError: el is null

Code: Select all

el = document.getElementById('categoryselector');
in serendipity.checkSave(), while calling code generated by event_hook(backend_entry_checkSave, ...) in plugins/serendipity_event_entrycheck/serendipity_event_entrycheck.php

Re: No error when editing entry without category

Posted: Thu Mar 22, 2018 2:55 pm
by Barberousse
I created 3 PR to correct the problem:

Edit (23/03/2018): the PR are merged now on master branch.

Maybe this should be ported to version 2.1 as well