Problem with a self-compiled code., posted by Maxim on Mon May 31 14:51:39 2021
|
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? |
Re: Problem with a self-compiled code., posted by Sebastian Schenk on Thu Jun 3 16:02:02 2021
|
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?
|
|
Re: Problem with a self-compiled code., posted by Maxim on Wed Jun 23 14:08:15 2021
|
Good afternoon Sebastian!
Thank you very much for your help.
Sebastian Schenk wrote: |
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?
|
|
|
when using webserver authentication, how can I restrict the users that can edit any given elog?, posted by Christian Ospelkaus on Sat Jun 19 18:38:21 2021
|
Dear elog users & developers,
the subject line says it all: when using webserver authentication, how is it possible to restict access of users to any given elog? Only using the apche rules? Admin user and Login user do not seem to be doing anything for me. I am using elog as packaged by debian for buster, using an apache ssl proxy. Thank you for providing this software,
Christian |
Re: when using webserver authentication, how can I restrict the users that can edit any given elog?, posted by Christian Ospelkaus on Sun Jun 20 14:38:06 2021
|
Dear all,
I figured it out. Current global config is (using kerberos instead)
[global]
port = 8081
Default encoding = 0
SSL = 0
Authentication = Kerberos
URL = https://my_url_here/
interface = 127.0.0.1
Password file = global.pwd
SMTP host = my_mail_host
Logfile = /var/log/elog.log
Logging level = 3
User = elog
Grp = elog
Best,
Christian
Christian Ospelkaus wrote: |
Dear elog users & developers,
the subject line says it all: when using webserver authentication, how is it possible to restict access of users to any given elog? Only using the apche rules? Admin user and Login user do not seem to be doing anything for me. I am using elog as packaged by debian for buster, using an apache ssl proxy. Thank you for providing this software,
Christian
|
|
How to format a column in list display?, posted by Andreas Luedeke on Fri Apr 23 20:08:10 2021 
|
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? |
Bug Report with CSS includes (was Re: How to format a column in list display?), posted by Andreas Luedeke on Mon Jun 14 17:25:02 2021
|
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:
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?
|
|
Bug Report with CSS includes (was Re: How to format a column in list display?), posted by Sebastian Schenk on Mon Jun 14 18:51:59 2021
|
Hi Andreas,
the bug you have found was already reported in an earlier issue, together with the same solution you have found.
https://elog.psi.ch/elogs/Forum/69368
Best wishes,
Sebastian
Andreas Luedeke wrote: |
[...]
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:
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
|
|
Request: make $text available for "subst", posted by Andreas Luedeke on Mon Mar 22 14:56:12 2021
|
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 |
Re: Request: make $text available for "subst", posted by Stefan Ritt on Mon Mar 22 15:10:12 2021
|
$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
|
|
Re: Request: make $text available for "subst", posted by Andreas Luedeke on Mon Mar 22 19:59:13 2021
|
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
|
|
|
Re: Request: make $text available for "subst", posted by Stefan Ritt on Wed Mar 24 10:06:26 2021
|
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
|
|
|
|
Re: Request: make $text available for "subst", posted by Andreas Luedeke on Wed Mar 24 22:09:56 2021
|
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
|
|
|
|
|
Re: Request: make $text available for "subst", posted by Andreas Luedeke on Mon Jun 14 18:06:06 2021
|
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
|
|
|
|
|
|
Re: Request: make $text available for "subst", posted by Sebastian Schenk on Tue Mar 23 13:42:27 2021
|
I am not Stefan, but maybe I can add to this issue.
Personally I think it is not a good way to dump all the information into the text field and try to let the server parse it.
This could be archived more simply by using e.g. the python elog scripts or using the elog command tool to directly submit well structured elog entires.
As you have mentioned you could use the "execute new|edit|delete" commands to do the things you want to do.
Let the called script fetch the elog entry and alter it in the way you like and resubmit the entry.
(You have to make sure to don't generate a endless loop and you have to proably have to use a forwarding script as the elog "execute" command waits for finished execution).
This way you don't touch the 1500 characters limit of passing $text to the execute command.
Also the point "filling an attribute X with free text" needs some kind of (extended) parsing, which isn't possible with the subst command.
In our elog we such an attribute X, which is in some conditions filled with a set of other attributes and on other conditions just a normal input field, so the user could type custom text in.
"fill an attribute automatically with the character length of the text" could be done with the above mentioned execute command or it could be done on the clientside (e.g. browser using javascript or if automatically generated by a script, then directly by the script)
I hope it helps to build our application.
Best wishes,
Sebastian
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
|
|
Additional forbidden attributes, posted by Sebastian Schenk on Mon Jun 14 16:15:10 2021
|
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" |
Naming a Notebook KTAG Wipes Out Formatting. Why?, posted by Phil Rubin on Sat May 22 20:44:33 2021
|
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"? |
New user not working, posted by Gabriel Lopez on Thu May 20 21:01:41 2021
|
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 |
Bug: "Append on edit" triggers too often, posted by Faith on Tue May 4 14:45:47 2021
|
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. |
Re: Bug: "Append on edit" triggers too often, posted by Sebastian Schenk on Tue May 4 15:24:56 2021
|
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.
|
|
|