ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
65679
|
Mon Dec 17 19:18:13 2007 |
| Val Schmidt | vschmidt@ldeo.columbia.edu | Question | Mac OSX | 2.6.1 | Re: Moving a logbook from one installation to another |
Stefan, I'm still stumped. I'm sorry for the hassle.
I've removed all the demo entries from both my logbook and the demo. I restarted elog in verbose mode and everything seems normal. I've even run the binary from my old elog installation on the config and logbooks in the new place and it works like a champ.
So I think I've concluded that my new compilation is mucky'd up. The logbooks and config file are fine.
So for the record, the new installation is on MacOS 10.5 (Leopard). The compiler is gcc4.0. There is one warning when I compile:
src/elog.c: In function 'url_encode':
src/elog.c:209: warning: pointer targets in passing argument 2 of 'strlcpy' differ in signedness
But this is not likely the problem.
So I stuck a debug statement into the code and recompiled to see the dates that are read from the logbook. Here is what I found:
DEBUG: Thu Nov 08 18:37:57 2001
DEBUG: Sun, 09 Apr 2006 12:38:31 +52175311
DEBUG: Sun, 09 Apr 2006 12:41:17 +52175311
DEBUG: Mon, 10 Apr 2006 09:24:26 +52175311
DEBUG: Mon, 10 Apr 2006 09:29:50 +52175311
DEBUG: Mon, 10 Apr 2006 16:15:31 +52175311
DEBUG: Mon, 10 Apr 2006 18:22:16 +52175311
DEBUG: Mon, 10 Apr 2006 18:23:20 +52175311
I haven't yet been able to figure out what this last number is and if it should indeed be part of the date. Any ideas here?
Thanks,
-Val
Stefan Ritt wrote: |
Val Schmidt wrote: |
I've attempted to move a logbook from an old elog installation to a new one on another system. The version of elog is the same (2.6.1) in both. Both systems have the same name and the logbooks are and installation are going in the same place. So all paths are identical. Also, for the new installation, I've simply recompiled the same sources used to install the original one. The only difference is an upgrade in the OS.
I've rsync'd the directory and contents from the old installation to the logbooks/ directory for the new one. I then over-wrote the standard config file with the new one. I then started elogd in the new place.
What I find is
a) The default entry from the demo logbook is inserted into my logbook. This I can live with but it was unexpected.
b) The dates for all my entries as shown in my browser have years starting in 1946, rather than 2006. This is particularly odd since all of the actual log files have the correct dates.
c) The numbering of entries has been reset to 1.
|
That sounds really strange. The only thing I can think of is that the demo entry conflicted with your other entries and two of them have the same entry ID. The entry ID is a unique key which identifies each entry. If you look into the raw logbook file 011108a.log with a text editor, you will see them as
$@Mid@$: 1
Date: Thu Nov 08 18:37:57 2001
Author: Stefan Ritt
Type: Routine
Category: General
Subject: Welcome
Attachment:
Encoding: ELCode
========================================
[B]Congratulations for installing ELOG sucessfully!
[/B]
This is a demo entry to ensure the elogd server is working correctly.
Click [I]"New"[/I] to add new pages and [I]"Delete"[/I] to delete this page.
so in this case the ID is 1. When you rsync'ed your entries into the demo logbook directory, you probably got two entries with the ID 1, which screws up elogd. Try to delete the file 011108a.log before you do the rsync. If you start elogd interactively with the "-v" flag, you will see some debugging output which can you help identify some problems:
[ritt@pc5082 ~/elog]$ ./elogd -v
elogd 2.7.0 built Dec 13 2007, 08:05:12 revision 1977
Config file : /afs/psi.ch/user/r/ritt/elog/elogd.cfg
Resource dir : /afs/psi.ch/user/r/ritt/elog
Logbook dir : /afs/psi.ch/user/r/ritt/elog/logbooks/
Indexing logbook "demo" in "logbooks/demo/" ...
Config [demo], MD5=F2E39262960C779517FEE576C17B1ED0
Entries:
ID 1, 011108a.log, ofs 0, thead, MD5=81D89C3C94C6626BB7FF191026040E83
After sort:
ID 1, 011108a.log, ofs 0
ok
Server listening on port 8080 ...
|
|
65680
|
Tue Dec 18 09:41:16 2007 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Mac OSX | 2.6.1 | Re: Moving a logbook from one installation to another | First of all, you should also describe what has been improved. While for you it is important what is not working, for me it is also important what is working, to get more information if such a problem should occur again. So is your demo entry still there? Is the numbering still starting from 1 after you removed the demo entry?
The suspicious dates Sun, 09 Apr 2006 12:38:31 +52175311 ring actually a bell: Under MacOS, there was always the problem with the timezone. The last number in the date string is the time zone in minutes (where the hour has actually 100 minutes). So an GMT offset of one hour would be +0100, two hours +0200 and so on. Somehow it seems like your number are screwed up completely. So +52175311 is equivalent to ~59 years, which explains why your dates are around 1946. The question is now how did these number go into your entries? Have you copied the *.log files over from the old location or generated newly? Did the old files already have this problem (load the *.log files into an ASCII editor!). The time zone is handled inside ELOG in the following function:
/* workaround for wong timezone under MAX OSX */
long my_timezone()
{
#if defined(OS_MACOSX) || defined(__FreeBSD__)
time_t tp;
time(&tp);
return -localtime(&tp)->tm_gmtoff;
#else
return timezone;
#endif
}
As you can see, MAXOSX needs a different treatment. I got this code from someone else since I don't have a Mac available. One suspicion I have is that the variable OS_MACOSX is not defined correctly. There is some code which checks for __APPLE__ and then defines OS_MACOSX. Maybe put a print statement next to time(&tp); to see if that code is really executed.
Val Schmidt wrote: |
Stefan, I'm still stumped. I'm sorry for the hassle.
I've removed all the demo entries from both my logbook and the demo. I restarted elog in verbose mode and everything seems normal. I've even run the binary from my old elog installation on the config and logbooks in the new place and it works like a champ.
So I think I've concluded that my new compilation is mucky'd up. The logbooks and config file are fine.
So for the record, the new installation is on MacOS 10.5 (Leopard). The compiler is gcc4.0. There is one warning when I compile:
src/elog.c: In function 'url_encode':
src/elog.c:209: warning: pointer targets in passing argument 2 of 'strlcpy' differ in signedness
But this is not likely the problem.
So I stuck a debug statement into the code and recompiled to see the dates that are read from the logbook. Here is what I found:
DEBUG: Thu Nov 08 18:37:57 2001
DEBUG: Sun, 09 Apr 2006 12:38:31 +52175311
DEBUG: Sun, 09 Apr 2006 12:41:17 +52175311
DEBUG: Mon, 10 Apr 2006 09:24:26 +52175311
DEBUG: Mon, 10 Apr 2006 09:29:50 +52175311
DEBUG: Mon, 10 Apr 2006 16:15:31 +52175311
DEBUG: Mon, 10 Apr 2006 18:22:16 +52175311
DEBUG: Mon, 10 Apr 2006 18:23:20 +52175311
I haven't yet been able to figure out what this last number is and if it should indeed be part of the date. Any ideas here?
Thanks,
-Val
Stefan Ritt wrote: |
Val Schmidt wrote: |
I've attempted to move a logbook from an old elog installation to a new one on another system. The version of elog is the same (2.6.1) in both. Both systems have the same name and the logbooks are and installation are going in the same place. So all paths are identical. Also, for the new installation, I've simply recompiled the same sources used to install the original one. The only difference is an upgrade in the OS.
I've rsync'd the directory and contents from the old installation to the logbooks/ directory for the new one. I then over-wrote the standard config file with the new one. I then started elogd in the new place.
What I find is
a) The default entry from the demo logbook is inserted into my logbook. This I can live with but it was unexpected.
b) The dates for all my entries as shown in my browser have years starting in 1946, rather than 2006. This is particularly odd since all of the actual log files have the correct dates.
c) The numbering of entries has been reset to 1.
|
That sounds really strange. The only thing I can think of is that the demo entry conflicted with your other entries and two of them have the same entry ID. The entry ID is a unique key which identifies each entry. If you look into the raw logbook file 011108a.log with a text editor, you will see them as
$@Mid@$: 1
Date: Thu Nov 08 18:37:57 2001
Author: Stefan Ritt
Type: Routine
Category: General
Subject: Welcome
Attachment:
Encoding: ELCode
========================================
[B]Congratulations for installing ELOG sucessfully!
[/B]
This is a demo entry to ensure the elogd server is working correctly.
Click [I]"New"[/I] to add new pages and [I]"Delete"[/I] to delete this page.
so in this case the ID is 1. When you rsync'ed your entries into the demo logbook directory, you probably got two entries with the ID 1, which screws up elogd. Try to delete the file 011108a.log before you do the rsync. If you start elogd interactively with the "-v" flag, you will see some debugging output which can you help identify some problems:
[ritt@pc5082 ~/elog]$ ./elogd -v
elogd 2.7.0 built Dec 13 2007, 08:05:12 revision 1977
Config file : /afs/psi.ch/user/r/ritt/elog/elogd.cfg
Resource dir : /afs/psi.ch/user/r/ritt/elog
Logbook dir : /afs/psi.ch/user/r/ritt/elog/logbooks/
Indexing logbook "demo" in "logbooks/demo/" ...
Config [demo], MD5=F2E39262960C779517FEE576C17B1ED0
Entries:
ID 1, 011108a.log, ofs 0, thead, MD5=81D89C3C94C6626BB7FF191026040E83
After sort:
ID 1, 011108a.log, ofs 0
ok
Server listening on port 8080 ...
|
|
|
66106
|
Thu Dec 11 03:13:31 2008 |
| Dennis Seitz | dseitz@berkeley.edu | Bug report | Mac OSX | 2.7.5 | Attribute value lost when adding to another extendable attribute | Here is an excerpt from my config file:
Type Last Edit = datetime
Preset Last Edit =$entry time
Locked Attributes = Last Edit
Subst on edit Last Edit = $date
Preset on Duplicate Last Edit = $date
I have another attribute called Part that I've made extendable.
When I duplicate an entry, Last Edit is updated with the current date correctly. However, as soon as I click the Add Part button next to my extendable Part attribute, and the page reloads to show the entry box for the Part field, the Last Entry field is replaced with a "-".
I have to submit and then re-edit the entry to get Last Edit to have a valid value again.
*EDIT*:
I noticed that any time the page reloads while in the entry screen this happens, e.g. by selecting plain instead of html format.
|
66109
|
Fri Dec 12 08:07:59 2008 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | Mac OSX | 2.7.5 | Re: Attribute value lost when adding to another extendable attribute |
Dennis Seitz wrote: |
Here is an excerpt from my config file:
Type Last Edit = datetime
Preset Last Edit =$entry time
Locked Attributes = Last Edit
Subst on edit Last Edit = $date
Preset on Duplicate Last Edit = $date
I have another attribute called Part that I've made extendable.
When I duplicate an entry, Last Edit is updated with the current date correctly. However, as soon as I click the Add Part button next to my extendable Part attribute, and the page reloads to show the entry box for the Part field, the Last Entry field is replaced with a "-".
I have to submit and then re-edit the entry to get Last Edit to have a valid value again.
*EDIT*:
I noticed that any time the page reloads while in the entry screen this happens, e.g. by selecting plain instead of html format.
|
Thanks for reporting that problem. It has been fixed in SVN revision 2156. |
66112
|
Sat Dec 13 02:13:51 2008 |
| Dennis Seitz | dseitz@berkeley.edu | Bug report | Mac OSX | 2.7.5 | Re: Attribute value lost when adding to another extendable attribute |
Stefan Ritt wrote: |
Dennis Seitz wrote: |
Here is an excerpt from my config file:
Type Last Edit = datetime
Preset Last Edit =$entry time
Locked Attributes = Last Edit
Subst on edit Last Edit = $date
Preset on Duplicate Last Edit = $date
I have another attribute called Part that I've made extendable.
When I duplicate an entry, Last Edit is updated with the current date correctly. However, as soon as I click the Add Part button next to my extendable Part attribute, and the page reloads to show the entry box for the Part field, the Last Entry field is replaced with a "-".
I have to submit and then re-edit the entry to get Last Edit to have a valid value again.
*EDIT*:
I noticed that any time the page reloads while in the entry screen this happens, e.g. by selecting plain instead of html format.
|
Thanks for reporting that problem. It has been fixed in SVN revision 2156.
|
Excellent! Thank you. |
66228
|
Fri Feb 27 16:43:01 2009 |
| Dennis Seitz | denseitz@comcast.net | Bug report | Mac OSX | 2.7.5 | Attachment problems | Apologies if these are known bugs, I'm very busy at the moment but I wanted to post this before I forget:
I'm using Safari on a Mac to make Elog entries.
1) The preview of some pdf attachments in edit mode displays huge areas of white space around each page. I can send examples if you'd like - please email me directly, for some reason I never get email notifications from this forum (and they aren't being tagged as spam, so I don't know where they go).
2) When that happens, the text entry area for ELcode format expands horizontally to match the huge pdf file width. Text without line feeds then doesn't wrap until the huge window width is filled, so I have to scroll horizontally all the time while editing to see what I've written.
3) So I turned off attachment previewing as a workaround (Preview attachments = 0 ). That worked fine by not expanding the entry area, but I noticed some odd behavior. The list of attachments below the text entry area is badly formatted. Here's a screen shot:

I tried to reproduce this with a new entry but the text was formatted properly for that entry.
P.S. While editing this entry, I see that the text area width is again being set by the width of the picture I've attached - try it yourself; if you try to resize your browser window smaller while editing, the text will only wrap until the width of the attachment is reached - the text no longer wraps at smaller widths than the attachment. |
66229
|
Fri Feb 27 17:25:30 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | Mac OSX | 2.7.5 | Re: Attachment problems |
Dennis Seitz wrote: |
Apologies if these are known bugs, I'm very busy at the moment but I wanted to post this before I forget:
I'm using Safari on a Mac to make Elog entries.
1) The preview of some pdf attachments in edit mode displays huge areas of white space around each page. I can send examples if you'd like - please email me directly, for some reason I never get email notifications from this forum (and they aren't being tagged as spam, so I don't know where they go).
2) When that happens, the text entry area for ELcode format expands horizontally to match the huge pdf file width. Text without line feeds then doesn't wrap until the huge window width is filled, so I have to scroll horizontally all the time while editing to see what I've written.
3) So I turned off attachment previewing as a workaround (Preview attachments = 0 ). That worked fine by not expanding the entry area, but I noticed some odd behavior. The list of attachments below the text entry area is badly formatted. Here's a screen shot:

I tried to reproduce this with a new entry but the text was formatted properly for that entry.
P.S. While editing this entry, I see that the text area width is again being set by the width of the picture I've attached - try it yourself; if you try to resize your browser window smaller while editing, the text will only wrap until the width of the attachment is reached - the text no longer wraps at smaller widths than the attachment.
|
Your problem 1) is probably caused by ImageMagick. I use that package to convert PDFs to images. If this package estimates the paper size from the PDF incorrectly, you're screwed. You can go and actually locate the thumbnail pictures in the ELOG directory (should be named xxxxxx_yyyyyy_<name>-0.png). If you check these pictures, they are probably already huge.
Problem 3) indeed is a small bug in elogd, which I fixed in revision #2178. If you can download the SVN version and recompile elogd, you should be fine:

|
66230
|
Fri Feb 27 20:52:42 2009 |
| Dennis Seitz | denseitz@comcast.net | Bug report | Mac OSX | 2.7.5 | Re: Attachment problems |
Stefan Ritt wrote: |
Dennis Seitz wrote: |
Apologies if these are known bugs, I'm very busy at the moment but I wanted to post this before I forget:
I'm using Safari on a Mac to make Elog entries.
1) The preview of some pdf attachments in edit mode displays huge areas of white space around each page. I can send examples if you'd like - please email me directly, for some reason I never get email notifications from this forum (and they aren't being tagged as spam, so I don't know where they go).
2) When that happens, the text entry area for ELcode format expands horizontally to match the huge pdf file width. Text without line feeds then doesn't wrap until the huge window width is filled, so I have to scroll horizontally all the time while editing to see what I've written.
3) So I turned off attachment previewing as a workaround (Preview attachments = 0 ). That worked fine by not expanding the entry area, but I noticed some odd behavior. The list of attachments below the text entry area is badly formatted. Here's a screen shot:

I tried to reproduce this with a new entry but the text was formatted properly for that entry.
P.S. While editing this entry, I see that the text area width is again being set by the width of the picture I've attached - try it yourself; if you try to resize your browser window smaller while editing, the text will only wrap until the width of the attachment is reached - the text no longer wraps at smaller widths than the attachment.
|
Your problem 1) is probably caused by ImageMagick. I use that package to convert PDFs to images. If this package estimates the paper size from the PDF incorrectly, you're screwed. You can go and actually locate the thumbnail pictures in the ELOG directory (should be named xxxxxx_yyyyyy_<name>-0.png). If you check these pictures, they are probably already huge.
Problem 3) indeed is a small bug in elogd, which I fixed in revision #2178. If you can download the SVN version and recompile elogd, you should be fine:

|
Thanks for the bug fix, we'll get our installation updated ASAP. And I will look into why some of my pdf file image sizes are interpreted incorrectly by ImageMagick, it might having something to do with how I've generated them.
Is it possible to set the default image size to always scale to fit the browser window? For example, this entry has a png attachment, but it still suffers from the fact that the text window size is set by the width of the png image.
If I'm forgetting something, sorry, I'm writing in a hurry!
Dennis |
|