Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 274 of 807  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Author Author Email Category OS ELOG Versiondown Subject
  67967   Mon Jun 8 12:02:30 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.0-2Re: ckeditor "Insert Timestamp" bug (was: Three problems with elogd 3.1.0-2)

Indeed the "str" variable at the gettimedate function had the wrong string size, so that all date strings got truncated at 8 characters. That's what you've seen. Also the ../../?cmd=gettimedate was wrong and it should be ./?cmd=gettimedate. I committed the fix to GIT so it will be contained in the next release ofe log.

David Wallis wrote:

Andreas,

I too was able to track the problem down to the "gettimedate" function in elogd.c. It looks like the code is using a variable named "str" for several different purposes. I haven't had a chance to do any testing, but my suspsicion is that the size of the dynamically allocated variable is ending up too small for the time stamp string, so it gets truncated.

 

Your point about the topic title is a good one - I'll split this into separate issues, thanks!

Andreas Luedeke wrote:
I can confirm that there is currently a problem with the ckeditor "Insert Timestamp" button.
It apparently calls javascript code in ckeditor/plugins/timestamp/plugin.js
to catch a string from the URL "../../?cmd=gettimedate"
(I think this is one too many "../", but anyway). if you try this for the Forum:
https://midas.psi.ch/elogs/Forum/?cmd=gettimedate
it returns the wrong string. It is "Forum" instead of the date.

PS to David: The subject "Three problems ..." is not giving any indication what it is about. I would find it better in this case to post three entries to the Forum, each with a striking title :-)

David Wallis wrote:

Additional info:

"Time format = %Y" results in "2015" being pasted into the edit window when I hit the "time stamp" button.

"Time format = %m/%Y" results in the string "06/2015"

"TIme format = %m/%d/%Y" results in the string "06/04"

"Time format = %m/%d %H" results in the string "06/04 "

David Wallis wrote:

I just updated to the latest official release (V3.1.0-2411f95) and have these problems:

  1. The Time Stamp button pastes the logbook name when "Time format" is not specified in elogd.cfg, and when it is set to "%m/%d/%Y %H:%M", it adds the string "5/28/."
  2. Drag and drop for attachments dosn't work on either Chrome 37.0.2062.94 (64-bit) or FIrefox 31.5.3 (both on Linux). D&D works on the midas.psi.ch demo page. On my logbooks, the "drop attachements here" area does not have a dashed line border
  3. Auto-saving does not seem to be working.

The "Syntax of elogd.cfg" help file doesn't seem to reflect some of these features... it took me a while to find the settings for LDAP authentication. Am I just missing some settings for these features?

My users are loving the new functionality added in 3.1!

 

 

 

 

  67983   Tue Jun 9 17:09:22 2015 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux3.1.0-2ELOG Forum: drafts cannot be deleted
> Another strange thing: the draft got submitted when I hit the "Back" button after reopening it.

Well, this is a problem indeed. When edit entries now, drafts gets saved regularly, overwriting your original entry. This is a limitation of the elog database, which cannot do full versioning. So "Back" is actually the same as "Commit without email notification". Or better "Commit some ten seconds ago". Now I 
don't know what the best solution is. I'm tempted to just remove the "Back" button and replace it with a "Delete" button. So people can either submit an entry or delete it completely. Any thoughts?
  67993   Wed Jun 10 10:43:02 2015 Reply Andreas Luedekeandreas.luedeke@psi.chBug reportLinux3.1.0-2ELOG Forum: drafts cannot be deleted
> > Another strange thing: the draft got submitted when I hit the "Back" button after reopening it.
> 
> Well, this is a problem indeed. When edit entries now, drafts gets saved regularly, overwriting your original entry. 
> This is a limitation of the elog database, which cannot do full versioning. 
> So "Back" is actually the same as "Commit without email notification". Or better "Commit some ten seconds ago". 
> Now I don't know what the best solution is.
> I'm tempted to just remove the "Back" button and replace it with a "Delete" button.
> So people can either submit an entry or delete it completely. Any thoughts?

I think it would be nice to have three options:
- "Submit": making the draft entry a "real" entry, with an ID
- "Abort": keeping the entry as a draft entry as it currently is (or was 10 sec ago)
- "Delete": removing the draft entry.

I understand that the draft is overwritten currently by the "Back" button, but why does it get an ID and does not stay as a "Draft"?
As a quick fix you may skip the "Abort" for now and just provide "Submit" and "Delete".
  67994   Wed Jun 10 10:55:00 2015 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux3.1.0-2ELOG Forum: drafts cannot be deleted
> I think it would be nice to have three options:
> - "Submit": making the draft entry a "real" entry, with an ID
> - "Abort": keeping the entry as a draft entry as it currently is (or was 10 sec ago)
> - "Delete": removing the draft entry.
> 
> I understand that the draft is overwritten currently by the "Back" button, but why does it get an ID and does not stay as a "Draft"?
> As a quick fix you may skip the "Abort" for now and just provide "Submit" and "Delete".

Any entry in elog (also drafts) need an ID in order to be stored on the server, no way around that.

The "Abort" button is exactly the same as the "Back" button, just the name is different. But I think the meaning will not be so clear
to the users. They could expect to abort the edit, and get the version as it was before they started editing (which is not possible).

So I'm tempted to just have "Submit" and "Delete". If one wants to abort, one can navigate away from the page, and confirm the "Leave page"
dialog box. So experts who know what they do can still do an abort if necessary.

Stefan
  68056   Wed Jul 22 22:54:59 2015 Entry Jaime Duranjduran@yorku.caBug reportLinux3.1.0-2elogd crashes with a URL

URL causes elogd to crash when a global password file name doesn't match any group's password file name. 

The offending URL is copied from the address field of the browser after sorting a logbook by on of the fileds.

After login out and using the copied URL, elogd shows the authentication dialog and then crashes after the credentials are submited.

Some debugging point me to a NULL pointer on the following instruction in line   25502  of elogd.c :

  if (lbs->pwd_xml_tree) {

The work around was to name the global password file as the password file of one of the groups.

  68064   Tue Aug 4 13:18:26 2015 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux3.1.0-2Re: elogd crashes with a URL

I could not reproduce your problem. I can only fix it if I can reproduce it, so let's agree on a common test base. May I ask you to do the following:

  • Download the most recent elog version from bitbucket and compile it
  • Create two new logbooks "demo1" and "demo2" with minimal configuration, but using yor global password file which differs from the group ones
  • Send me step-by-step instructions how to trigger the problem, including your elogd.cfg file and your password files (of course with fake accounts)

If I can reproduce the crash, I can fix it.

Jaime Duran wrote:

URL causes elogd to crash when a global password file name doesn't match any group's password file name. 

The offending URL is copied from the address field of the browser after sorting a logbook by on of the fileds.

After login out and using the copied URL, elogd shows the authentication dialog and then crashes after the credentials are submited.

Some debugging point me to a NULL pointer on the following instruction in line   25502  of elogd.c :

  if (lbs->pwd_xml_tree) {

The work around was to name the global password file as the password file of one of the groups.

 

  67959   Fri Jun 5 14:24:34 2015 Idea Stefan Rittstefan.ritt@psi.chInfoAll3.1.0+Different way CSS files are handled

Hi,

I just implemented a different way CSS files are handled in ELOG. Previously, we had the default.css, which could be adjusted for specific needs. Some people did that (like myself). So I changed a few colors etc. When I now implement a new feature in elog, it might need a new CSS class which I put in default.css. But this means that people who have modified this file get it either overwritten, or do not get the new styles.

In order to fix this, the default.css is now called elog.css and is always inluded in any ELOG page. If one specifies a CSS file with "CSS = <file.css>", then this CSS file is loaded in addition to elog.css. So one can put only the modifications into that file and inherits all the rest from elog.css. If new features come in elog.css, the installation with the personalized CSS file will then get the new features from the new elog.css automatically, and just overwrite a few settings in the personalized file. Here is an example:

elog.css:

td {
  color:black;
  font-size:12px;

}

Personalized file special.css, activated with "CSS = special.css" in the elogd.cfg file:

td {
  font-size:18px;
}

This personalized file now overwrites the font size from elog.css to 18 pixel, while maintaining all the rest from elogd.css.

The modification is committed to GIT and will be contained in the next release of elog.

/Stefan

  67960   Fri Jun 5 19:01:05 2015 Reply Andreas Luedekeandreas.luedeke@psi.chInfoAll3.1.0+Re: Different way CSS files are handled

Hi Stefan,

there is a little problem with the Makefile (on SL5 and SL6): the following line:

        @$(INSTALL) -m 0644 themes/default/* $(ELOGDIR)/themes/default/

/usr/bin/install: omitting directory `themes/default/icons'
make: *** [install] Error 1

When I go back to the old Makefile construct:

        @$(INSTALL) -m 0644 themes/default/icons/* $(ELOGDIR)/themes/default/icons/
        @for file in `find themes/default -type f` ;\
          do \
            if [ ! -f $(ELOGDIR)/themes/default/`basename $$file` ]; then  \
              $(INSTALL) -m 0644 $$file $(ELOGDIR)/themes/default/`basename $$file` ; \
           fi; \
          done

then it seems to work again.

Cheers

Andreas

Stefan Ritt wrote:

Hi,

I just implemented a different way CSS files are handled in ELOG. Previously, we had the default.css, which could be adjusted for specific needs. Some people did that (like myself). So I changed a few colors etc. When I now implement a new feature in elog, it might need a new CSS class which I put in default.css. But this means that people who have modified this file get it either overwritten, or do not get the new styles.

In order to fix this, the default.css is now called elog.css and is always inluded in any ELOG page. If one specifies a CSS file with "CSS = <file.css>", then this CSS file is loaded in addition to elog.css. So one can put only the modifications into that file and inherits all the rest from elog.css. If new features come in elog.css, the installation with the personalized CSS file will then get the new features from the new elog.css automatically, and just overwrite a few settings in the personalized file. Here is an example:

elog.css:

td {
  color:black;
  font-size:12px;

}

Personalized file special.css, activated with "CSS = special.css" in the elogd.cfg file:

td {
  font-size:18px;
}

This personalized file now overwrites the font size from elog.css to 18 pixel, while maintaining all the rest from elogd.css.

The modification is committed to GIT and will be contained in the next release of elog.

/Stefan

 

ELOG V3.1.5-3fb85fa6