Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   Bug with Drafts and Language German, posted by Andreas Luedeke on Mon Aug 21 11:45:06 2017 elog_lang_pending_draft_bug.png
    icon2.gif   Re: Bug with Drafts and Language German, posted by Andreas Luedeke on Mon Aug 21 12:16:05 2017 
Message ID: 68667     Entry time: Mon Aug 21 11:45:06 2017     Reply to this: 68668
Icon: Idea  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Bug report  OS: All  ELOG Version: 3.1.3-aded4ae 
Subject: Bug with Drafts and Language German 

Hi Stefan,

when one creates a new entry, and a draft entry exists for the logbook, then a menu appears (see attachment).
If one select "Neuen Eintrag anlegen" then it should ignore the draft and create a new entry.
This feat is done by adding a "&ignore=1" to the "new" command: "<URL>/?cmd=New&ignore=1".
The problem is, that it should not be "cmd=New&..." but "cmd=Neu", since the commands are part of the translation.
Due to this, no new entry can be created as long as a draft exists; at least not in any language other than english.
This problem apparently existed since the beginning of drafts, but it only created problems at our site recently.
Kind Regards
Andreas

PS: Here's a patch that works:

diff  elogd.c elogd.c-orig
9575,9576c9575,9576
<    rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='?cmd=%s&ignore=1';\">\n", loc("Create new entry"),
<             loc("New"));
---
>    rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%s';\">\n", loc("Create new entry"),
>             "?cmd=New&ignore=1");
Attachment 1: elog_lang_pending_draft_bug.png  11 kB  Uploaded Mon Aug 21 12:54:44 2017  | Hide | Hide all
elog_lang_pending_draft_bug.png
ELOG V3.1.5-fe60aaf