Thread: [Refdb-users] php web addnote functional
Status: Beta
Brought to you by:
mhoenicka
|
From: Matt P. <mat...@ut...> - 2004-02-13 12:37:39
|
Hey folks, I have finally (after demonstrating to myself many times over that I'm a terrible programmer) gotten a barely adequate version of a web 'add note' page working. You can find it here: http://www.derailleur.org/webref/index.php?format=risx&field=CK&searchText=Garthwaite2002 a couple of serious problems: -searching by author is entirely broken. THis seems to be an issue with my refdb installation, as it doesn't work from refbc either. - searches don't work on regex's -- that is, they only work when the precise, full field value is entered. Again this seems to be a problem with my installation of refdb: refdbc: getref :CK:=Martin2001 gets a reference, whereas refdbc: getref :CK:=Martin does not. - the 'comment.php' page has no prodection against double-loading, so it's easy to screw up and addyour comment twice just by hitting the reload button. - this last leads me to another issue with my refdb installation: I can't delete notes. e.g.: refdbc: deletenote :NID:>0 0 datasets deleted, 0 skipped ... and also I periodically lose the capacity to add notes, and have to rebuild my db to get it back So there appears to be something seriously wrong with my refdb install, which I will look into. But for the meantime, the addnotes is working ok, please give ocmmetns.! matt |
|
From: Bruce D'A. <bd...@fa...> - 2004-02-13 13:51:37
|
On Feb 13, 2004, at 7:37 AM, Matt Price wrote: > I have finally (after demonstrating to myself many times over that I'm > a terrible programmer) gotten a barely adequate version of a web 'add > note' page working Cool. I still think Moveable Type's pop-up comments UI is a better model though. Even with one record, I find the notes UI now a little confusing (if I have the notes displayed, how do I get rid of them? What does "add note" do?). If there are many records, it seems like it'll be more confusing. Bruce |
|
From: Markus H. <mar...@mh...> - 2004-02-13 22:14:20
|
Hi Matt, Matt Price writes: > Hey folks, > > I have finally (after demonstrating to myself many times over that I'm > a terrible programmer) gotten a barely adequate version of a web 'add > note' page working. You can find it here: > http://www.derailleur.org/webref/index.php?format=risx&field=CK&searchText=Garthwaite2002 > First of all, thanks for this effort. Much appreciated. > a couple of serious problems: > > -searching by author is entirely broken. THis seems to be an issue > with my refdb installation, as it doesn't work from refbc either. > This is related to the next "problem". > - searches don't work on regex's -- that is, they only work when the > precise, full field value is entered. Again this seems to be a > problem with my installation of refdb: > refdbc: getref :CK:=Martin2001 > gets a reference, whereas > refdbc: getref :CK:=Martin > does not. > As you're running the CVS version, you're ahead of the latest NEWS file (not yet checked in) which will explain a change in the query syntax. Queries using '=' or '!=' now default to a literal match, this is why refdbc: getref :CK:=Martin2001 works for you. If you want a partial or a regexp match, you have to use the new tilde operators '~' and '!~' instead: refdbc: getref :CK:~Martin So if I understand your problem correctly, this is an "early adopter" issue. Sorry for the inconvenience. > - this last leads me to another issue with my refdb installation: I > can't delete notes. > e.g.: > refdbc: deletenote :NID:>0 > 0 datasets deleted, 0 skipped The deletenote command expects a whitespace-separated list of ID values, like this: refdbc: deletenote 1 3 4-6 The < and > operators are not (yet) implemented. > ... and also I periodically lose the capacity to add notes, and have > to rebuild my db to get it back > This is a serious issue that I can't reproduce here. In order to fix this I seriously need more debug information. If you find the time, please - start refdbd with a log level of 7 - start with a fresh database - use a defined set of notes and add them until addnote fails - send me the log and the set of notes that caused the failure. I can't fix things which I can't reproduce. I need these data. Thanks Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
|
From: Matt P. <mat...@ut...> - 2004-02-13 23:54:38
|
On Fri, Feb 13, 2004 at 10:32:20PM +0100, Markus Hoenicka wrote: > Hi Matt, > > Matt Price writes: > > Hey folks, > > > > I have finally (after demonstrating to myself many times over that I'm > > a terrible programmer) gotten a barely adequate version of a web 'add > > note' page working. You can find it here: > > http://www.derailleur.org/webref/index.php?format=risx&field=CK&searchText=Garthwaite2002 > > > > First of all, thanks for this effort. Much appreciated. > > > a couple of serious problems: > > > > -searching by author is entirely broken. THis seems to be an issue > > with my refdb installation, as it doesn't work from refbc either. > > > > This is related to the next "problem". > > > - searches don't work on regex's -- that is, they only work when the > > precise, full field value is entered. Again this seems to be a > > problem with my installation of refdb: > > refdbc: getref :CK:=Martin2001 > > gets a reference, whereas > > refdbc: getref :CK:=Martin > > does not. > > > > As you're running the CVS version, you're ahead of the latest NEWS > file (not yet checked in) which will explain a change in the query > syntax. Queries using '=' or '!=' now default to a literal match, this > is why > refdbc: getref :CK:=Martin2001 > works for you. If you want a partial or a regexp match, you have to > use the new tilde operators '~' and '!~' instead: > refdbc: getref :CK:~Martin > > So if I understand your problem correctly, this is an "early adopter" > issue. Sorry for the inconvenience. > > > - this last leads me to another issue with my refdb installation: I > > can't delete notes. > > e.g.: > > refdbc: deletenote :NID:>0 > > 0 datasets deleted, 0 skipped > > The deletenote command expects a whitespace-separated list of ID > values, like this: > refdbc: deletenote 1 3 4-6 > The < and > operators are not (yet) implemented. > > > ... and also I periodically lose the capacity to add notes, and have > > to rebuild my db to get it back > > > > This is a serious issue that I can't reproduce here. In order to fix > this I seriously need more debug information. If you find the time, > please > > - start refdbd with a log level of 7 > - start with a fresh database > - use a defined set of notes and add them until addnote fails > - send me the log and the set of notes that caused the failure. > > I can't fix things which I can't reproduce. I need these data. Hey Markus, sorry to take so long getting you data, but I'm being somewhat unsystematic at the moment -- I will do my best to reproduce the error faithfully and get back to you, but it will likely be a couple of days at best. Looking at my mail it sounds rather plaintive, and I don't mean that actually -- I suspect the problem may lie, for instance, in a faulty installation ofm ysql sor some such. anyway it's my birthday and we have a babysitter so I'm off to the movies -- more sometime later! matt . > > Thanks > Markus > |
|
From: Markus H. <mar...@mh...> - 2004-02-14 00:53:33
|
Matt Price writes: > Hey Markus, sorry to take so long getting you data, but I'm being > somewhat unsystematic at the moment -- I will do my best to reproduce > the error faithfully and get back to you, but it will likely be a > couple of days at best. Looking at my mail it sounds rather > plaintive, and I don't mean that actually -- I suspect the problem may > lie, for instance, in a faulty installation ofm ysql sor some such. > No, don't take me wrong. I'm just trying to get 0.9.4 out the door, and I can't do that as long as there are unresolved issues. That's why I'm pressing a bit, sorry about that. > anyway it's my birthday and we have a babysitter so I'm off to the > movies -- more sometime later! > congrats & enjoy! Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
|
From: Markus H. <mar...@mh...> - 2004-02-15 23:01:10
|
Matt Price writes: > Hey Markus: > > a couple notes: > > I may have overstated my problems with refdb earlier. I think my > 'addnote' issues don't actually require rebuilding the database, but > rather, just restarting refdbd. obviously that's way less drastic. > I could track down the problem with the help of your logs. I can't explain why in your case restarting refdbd got you around the problem (it can't, if I understand my code correctly :-). In any case, no one wouldn't want to restart an app anyway. I think I've fixed the problem. In brief, adding a dataset or a note involves creating a temporary citation key if the dataset doesn't specify one. If there is a problem with a dataset and it is not removed properly from the database again, this citation key may block the next addnote/addref command as it has to be unique. That is, this problem occurred only with a database engine that does not use transactions, only with datasets that cause a parse error (see below), and only with datasets that don't specify a citation key. I've fixed the code that removes partial datasets if you can't do a rollback, and I've also fixed a bug that swallowed the error message of the XML parser. It now returns for your dataset: refdbc: addnote ../pseudotest/data/xnoteset.xml server error: Parse error at line 50: not well-formed (invalid token) Now it should be pretty clear what's going on. > As for the note, the stumbling block seems to be the presence of the > character '&'. Do you know why this would be? being quite ignorant > of almost all the technologies involved here, I'm not sure what the > issue is. > Yep. The ampersand is one of the reserved characters in XML (others would be < and >). In order to use a literal ampersand in an XML document, use the entity "&" instead. Same with "<" and ">" for < and >, respectively. Thanks again for helping me spot this bug. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |