Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 62 of 805  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subject
  69371   Mon Jun 14 18:06:06 2021 Idea Andreas Luedekeandreas.luedeke@psi.chCommentLinux | AllV3.1.4Re: Request: make $text available for "subst"

I should tell that I found a simpler way to achieve the same:
I suppress the "text" field and use a single line text input field instead.
The single line input in "free text" modes just contains "<br>" : I would have had to use those in the text field anyway.

Andreas Luedeke wrote:

Hi Stefan,
no problem: if I just strip all newlines from the $text field (in HTML you use <br> anyway, the newline has no function apart from whitespace), and my multiline attribute is fine to go.
I do not intend to make the attribute editable: it is just used for display. Because that allows me to create the attribute either from free text or from combining other fields - depending on conditional attributes.

As a special feature you could strip all newlines beforehand, when providing the $text for subst statements.

Cheers, Andreas

Stefan Ritt wrote:

Sure, attributes can be shown multi-line, but they cannot be stored in the elog internal database. The database is a very old design and only allows for single line attributes. Just look at a YYMMDDa.log file and you will see that. I would have to change the database format to somethign more advanced like XML, but that would take me a couple of weeks or months.

Soooorrryy! ;-)

Andreas Luedeke wrote:

While the input widget of text attributes is a single line, they can easily be multi-line in the display - when you use HTML at least.
And of course the user can parse the text field and generate a single line, if he wants to.
If you leave it to me, I'll create wonderful applications to that feature :-)

Please? ;-)

Stefan Ritt wrote:

$text is the full body text and can go over many lines. Since attributes are restricted to single lines, it's not possible to substitute them with the body text.

Stefan

Andreas Luedeke wrote:

Hi Stefan,

I've just tried to read the $text with subst into another field and failed.
It looks like $text is only available for the execution of shell scripts in the "execute new|edit|delete = <script>" command.

Could that be added? I can think of a multitude of applications:

  • In my case I want to fill an attribute X either with free text or generated from other fields. The list view will show just X and not how it was generated.
  • I could fill an attribute automatically with the character length of the text.
  • I could parse the text in a shell script and set other attributes according to the content.

Thank you for considering it.

Cheers, Andreas

 

 

 

 

 

  69370   Mon Jun 14 17:25:02 2021 Idea Andreas Luedekeandreas.luedeke@psi.chBug reportAllV3.1.4Bug Report with CSS includes (was Re: How to format a column in list display?)

Okay, found some solution for my problem:

List Change Pikett = <div class="pikett">$Pikett</div>
CSS=pikett.css

And file themes/default/pikett.css contains:

.pikett {
  background-color:white;
  font-size:16px;
  font-family:monospace;
  text-align:left;
}

That works like a charm - until I log in to the logbook. Then the include of the CSS in the header is garbled with some "prefix" of random chars:

<link rel="stylesheet" type="text/css" href="elog.css">
<link rel="stylesheet" type="text/css" href="`=T ýpikett.css">

And a quick check in the source code shows some bad code:

L7615: function "show_html_header"

         rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s%s\">\n", css_base, css);

Here css_base is a not initialized local variable of the function. In fact the above line is the only reference of that variable char css_base[1000].

The bug is still present in elog-3.1.4-611489b

 

Andreas Luedeke wrote:
There is the nice conditional formatting feature for List display:
Cell Style <attribute> <value> = <style>
I would like to use it without conditions: some attributes should always be formatted in a specific way.
 
Specifically I want a generated attribute (combined from other attributes) to be display in monospace font.
The "Format Pikett = 0, attribname, messagelist" works nicely for the single entry display (pik1), but not for List view (pik-list).

Would it be possible to create a new command "List format <attribute> = <css_class_name>,<css_class_value>,<width>,<size>", or is there another way to achieve this?

 

  69369   Mon Jun 14 16:15:10 2021 Warning Sebastian Schenksebastian.schenk@physik.uni-halle.deBug reportLinux | Windows | Mac OSX | All | Other3.1.4Additional forbidden attributes

Hello Stefan,

I stubbled on a issue with our elog.
We introduced an attribute "mode" to one of the elogs and it breaks the "Find" function as this attribute is already used for the viewing settings "full", "summary" and "threaded".
(HTTP parameter pollution)

I suspect other special attributes used by the internals of elog should also not be allowed.
A quick search in the "Find" reveals these attributes in the URL, so I guess, these should also be avoided.
This list could be incomplete

npp, ma, da, ya, mb, db, yb, attach, reverse, mode

A simple workaround would be updating the documentation to add these to the list of forbidden attributes.
https://elog.psi.ch/elog/config.html
Maybe a warning can be added, if the elog behaves unexpected, try other attribute names, as they can conflict with internal attributes.

A fix could be to add a prefix for internal attributes, which can't be used for user attributes.

Best wishes,
Sebastian

 

PS: I also noticed using the "Find" command, the generated URL contains 2 reverse attributes like "reverse=0&reverse=1"

  69368   Thu Jun 3 16:02:02 2021 Reply Sebastian Schenksebastian.schenk@physik.uni-halle.deQuestionWindows3.1.4-3Re: Problem with a self-compiled code.

Hello Maxim,

I just stumbled on a similar issue. Also with a self-compiled elogd on Ubuntu.

We also use a custom css and by clicking on the "New" or "Reply" or "Duplicate" the elog generates the entry editor.
On the first load of this page the link to the css file is sometimes corrupted by having some garbage characters in it.
<link rel="stylesheet" type="text/css" href="ƒŒüthemes/name.css">

I found the bug in the code and made a PR on the bitbucket. Here is the commit to fix it yourself.
https://bitbucket.org/merrx/elog/commits/cea193ded7161bb6d1f67725ca109d2d4341128a

Best wishes,
Sebastian

Maxim wrote:

Dear, sir! There is a problem with a configuration file.

The code was compiled by Cygwin (gcc-core, gcc-g++, make, gdb, libssl-dev).  After a compilation a reference to our own css-file was written in configuration file and css-file was included in a folder “themes/default” of the project.

The problem is that in running elog-3.1.4-1 (and upper versions) css-file name in a code of a page has some random symbols before file-name, for example: <link rel="stylesheet" type="text/css" href="ø9öÿeLogOUK.css">. It was found that the problem is resolved if a string “Password file=passwd” is deleted, but in this case it is impossible to set passwords to the users.

Here is an example of configuration file which is taken from the forum and just one string (CSS=elogOUK.css) has added to the code

____________________________________________________________________

What can be done to resolve this problem?

 

  69367   Mon May 31 14:51:39 2021 Question Maximmaxsimuus69@gmail.comQuestionWindows3.1.4-3Problem with a self-compiled code.

Dear, sir! There is a problem with a configuration file.

The code was compiled by Cygwin (gcc-core, gcc-g++, make, gdb, libssl-dev).  After a compilation a reference to our own css-file was written in configuration file and css-file was included in a folder “themes/default” of the project.

The problem is that in running elog-3.1.4-1 (and upper versions) css-file name in a code of a page has some random symbols before file-name, for example: <link rel="stylesheet" type="text/css" href="ø9öÿeLogOUK.css">. It was found that the problem is resolved if a string “Password file=passwd” is deleted, but in this case it is impossible to set passwords to the users.

Here is an example of configuration file which is taken from the forum and just one string (CSS=elogOUK.css) has added to the code

 

[global]

 

; port under which server is listening

Port = 8080

 

CSS = eLogOUK.css

 

[Accelerator]

Comment = Accelerator Logbook

 

; use user level password access

Password file = passwd

Login expiration = 1000

Admin user = ritt

Self register = 1

 

; look and feel

Guest menu commands = Back, Find, Login, Help

Guest find menu commands = Find, Login, Help

Date format = %B %d, %Y

 

; attributes

Attributes = Author, Author Email, Category, Subject

Options Category = Routine entry, Shift summary, Problem, Fix, Question, Info, Other

Extendable attributes = Category

Required Attributes = Category, Subject

Thread display = $Subject, entered by $author on $Entry date

Quick filter = Date, Category

 

; title as shown in the browser

Page Title = Accelerator Logbook - $subject

 

; preset author and email

Preset Author = $long_name

Preset Author Email = $user_email

 

; these attributes cannot be changed

Locked Attributes = Author, Author Email

 

; only author can change its own entry

Restrict edit = 1

 

; options for reply

Subst on reply subject = Re: $Configuration Name

Remove on reply = Author, Author Email

 

; No Email notification

Suppress Email to users = 1

 

____________________________________________________________________

What can be done to resolve this problem?

  69366   Sat May 22 20:44:33 2021 Question Phil Rubinrubinp@cern.chQuestionLinux3.1.3Naming a Notebook KTAG Wipes Out Formatting. Why?

An experiment's ELOG installation, using the default theme, names logbooks after its subsystem's acronyms.  One subsystem is referred to as KTAG, but when this name (or its lowercase version) is used for a logbook name, the logbook appears unformatted.  Changing the name, even to K-TAG, works fine.  Nothing close to KTAG appears in elog.css.  Does anyone know why this happens and whether it is possible or worth the while to get around the "problem"?

  69365   Thu May 20 21:01:41 2021 Question Gabriel Lopezgabelopez@bnl.govQuestionLinux3.1.4-3New user not working

Running elog-3.1.4-3 Can't add users through the web interface. Clicking add user and writing all the fields in with something doesn't add a user into the PWD file of that logbook. Running a tail -f on the password file shows elog writes the user info with the hashed password 3 times and then deletes the information about 20 seconds later. Has anyone else had a similar issue? This is running on RHEL8.3

  69364   Tue May 4 15:24:56 2021 Reply Sebastian Schenksebastian.schenk@physik.uni-halle.deBug reportLinux3.1.2Re: Bug: "Append on edit" triggers too often

I can confirm the issue also for "prepend on edit".
To be more precise, it gets executed everytime the condition state changes, if placed in the config without condition, or if placed in a condition, everytime the condition gets activated.

Faith wrote:

The command "Append on edit = " is getting executed everytime, when a dropdown menu is changed. This happens even at the first creation of an entry, so the append text stucks up multiple times in the text body.

 

ELOG V3.1.5-3fb85fa6