6.0.0-git
2019-03-24

[#8609] Can't delete faces
Summary Can't delete faces
Queue Ansel
Queue Version FRAMEWORK_3
Type Bug
State Not A Bug
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester tx4587 (at) crawford (dot) homeunix (dot) net
Created 2009-09-28 (3464 days ago)
Due
Updated 2009-11-03 (3428 days ago)
Assigned 2009-10-24 (3438 days ago)
Resolved 2009-10-28 (3434 days ago)
Milestone
Patch No

History
2009-11-03 19:19:48 Michael Rubinsky Comment #22 Reply to this comment
I am unable to reproduce. Also, based on what you have said, all the 
code that performs the deletion is running successfully, otherwise, a 
'1' would not be returned from the ajax call. Additionally, you have 
indicated that code is being run that should not be triggered by the 
actions that you said you took. This is what has led me to believe you 
install is broken in someway.

If any of the assumptions I have made about your comments are 
incorrect, please post the correct information. Otherwise, someone 
that is actually able to reproduce this will have to debug it.

2009-11-03 16:19:18 tx4587 (at) crawford (dot) homeunix (dot) net Comment #21 Reply to this comment
I've noticed that this bug has been closed, however I'm still having 
the delete faces issue, one of your last comments has been that there 
is likely something incorrect about the install, I've gone over it 
again and haven't found anything amiss. How should I continue?
2009-10-29 18:36:42 tx4587 (at) crawford (dot) homeunix (dot) net Comment #20 Reply to this comment
I'm out of ideas. All the code that deletes the face is being 
run...and from the lack of error messages being thrown, it looks like 
it's being run successfully.



I just realized that it may be helpful to know which version of PHP 
I'm running 5.2.9 "Centos Testing Version). I also tried to access the 
delete mech. from the "Edit Faces in this gallery" link, still no joy. 
Is it possible that there is an issue with me using postgresql?



The only time the code that executes this statement is run is when you 
are attempting to geotag an image, from the map_edit.php page. If all 
you did, as you say, is to view an image, and you got this error, then 
something is pretty badly broken on your install.



That's certainly possible, I did install pretty recently, I'll go 
through the install again to see if I've missed anything, note that I 
am using the cvs version. since the released version wouldn't display 
any pictures.
2009-10-29 17:55:25 Michael Rubinsky Comment #19 Reply to this comment
The faces are not being deleted, I'm no longer getting the errors.
The last post was the results of the different tabs from FireBug. It
seems like it's doing everything correctly, the faces just stay.
I'm out of ideas. All the code that deletes the face is being 
run...and from the lack of error messages being thrown, it looks like 
it's being run successfully.
Furthermore, I was looking at the postgresql log while trying to
delete the faces, I didn't get an error there but I did recieve the
following error when selecting a picture to view, not just the face.
Wondering if this is causing some state data to not be loaded. Just a
wild guess though:
ERROR:  column "%" does not exist at character 109
STATEMENT:  SELECT DISTINCT image_location, image_latitude,
image_longitude FROM ansel_images WHERE image_location LIKE "%"
The only time the code that executes this statement is run is when you 
are attempting to geotag an image, from the map_edit.php page. If all 
you did, as you say, is to view an image, and you got this error, then 
something is pretty badly broken on your install.
2009-10-28 20:33:46 tx4587 (at) crawford (dot) homeunix (dot) net Comment #18 Reply to this comment
The faces are not being deleted, I'm no longer getting the errors. The 
last post was the results of the different tabs from FireBug. It seems 
like it's doing everything correctly, the faces just stay.



Furthermore, I was looking at the postgresql log while trying to 
delete the faces, I didn't get an error there but I did recieve the 
following error when selecting a picture to view, not just the face. 
Wondering if this is causing some state data to not be loaded. Just a 
wild guess though:

ERROR:  column "%" does not exist at character 109

STATEMENT:  SELECT DISTINCT image_location, image_latitude, 
image_longitude FROM ansel_images WHERE image_location LIKE "%"
2009-10-28 19:38:29 Michael Rubinsky Comment #17 Reply to this comment
I have the following configurations set:
extensions.firebug.service.breakOnErrors;false
javascript.options.strict;false

the "javascript.options.strict" was set to true before, but have
changed it to false, however the behavior is the same.
The errors you were getting regarding assigning to a undeclared 
variable would ONLY be thrown if you are using strict mode...  You say 
the behavior is the same, does that mean that you are still getting 
those errors or simply that the face is not being deleted?
However I'm getting better results from FireBug:
Post:
face        25
image        451

Response:
1
The '1' in the response indicates that the face WAS deleted. Are you 
*100%* sure that the face is still showing up for you? I don't see any 
code path that would lead to a 1 being returned that didn't delete the 
face without other errors.
Regarding the other requests I tried the following browsers:
Safari 4:
Several navigation problems using Safari, I had to go directly to
ansel to test.
Can you elaborate? I use Safari pretty frequently, and do not have any 
"navigation" issues.



It failed strangely, I clicked the "Edit Faces" link
and it looked like it went and searched for similar pictures, one of
them even found a second picture that had the same face.
When you click edit faces on an image with no faces currently found, 
and you have a faces driver that is capable, Ansel tries to find faces 
in the image automatically. Is this what you are seeing?
IE7:
The Page went blank when loading pictures of any kind, so I was
unable to get to the link "Edit Faces"
I've had no issues with IE7.



Are you sure that you have the latest Ansel code? I remember you said 
you installed from a snapshot, have you updated the snapshot any time 
recently?


2009-10-28 19:19:03 tx4587 (at) crawford (dot) homeunix (dot) net Comment #16 Reply to this comment
I have the following configurations set:

extensions.firebug.service.breakOnErrors;false

javascript.options.strict;false



the "javascript.options.strict" was set to true before, but have 
changed it to false, however the behavior is the same. I also closed 
the browser after changing the settings to make sure that they are 
loaded.



However I'm getting better results from FireBug:

Params:

requestType

url        /ansel/view.php?gallery=22&slug=&image=451&view=Image&page=0



Headers:

Date        Wed, 28 Oct 2009 19:16:51 GMT

Server        Apache/2.2.3 (CentOS)

X-Powered-By        PHP/5.2.9

Expires        Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control        no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma        no-cache

Connection        close

Transfer-Encoding        chunked

Content-Type        text/html; charset=UTF-8

Request Headers

Host        crawford.homeunix.net

User-Agent        Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; 
rv:1.9.0.15) Gecko/2009101600 Firefox/3.0.15

Accept        text/javascript, text/html, application/xml, text/xml, */*

Accept-Language        en-us,en;q=0.5

Accept-Encoding        gzip,deflate

Accept-Charset        ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive        300

Connection        keep-alive

X-Requested-With        XMLHttpRequest

X-Prototype-Version        1.6.1

Content-Type        application/x-www-form-urlencoded; charset=UTF-8

Referer        https://crawford.homeunix.net/ansel/view.php?view=Image&gallery=22&image=451

Content-Length        17

Cookie        default_imp_view=imp; Horde=841pgfma6bhujs7dcrc8f40n23; 
auth_key=701791cb7a7bc147fa11c4ffecec10b5; 
imp_key=55faac689bb6b74ae40dfb4c2a128159; horde_menu_expanded=expwebsite



Post:

face        25

image        451



Response:

1



Regarding the other requests I tried the following browsers:

Safari 4:

Several navigation problems using Safari, I had to go directly to 
ansel to test. It failed strangely, I clicked the "Edit Faces" link 
and it looked like it went and searched for similar pictures, one of 
them even found a second picture that had the same face.



IE7:

The Page went blank when loading pictures of any kind, so I was unable 
to get to the link "Edit Faces"



Looks like Firefox is the best of breed so far, I'm using version 3.0.14.
2009-10-28 18:50:17 Michael Rubinsky Comment #15
State ⇒ Not A Bug
Reply to this comment
...or alternatively, just don't tell FF to break on errors.



Setting to strict mode, and breaking on errors is what is causing this 
error. Since strict mode causes all kinds of problems with 
prototype.js as an example, I don't consider this a bug in horde/ansel.
2009-10-28 18:43:50 Michael Rubinsky Comment #14 Reply to this comment
Ah.... you've turned on strict javascript checking in FF.  Please 
disable it and try again.
2009-10-28 18:33:07 Michael Rubinsky Comment #13 Reply to this comment
What version of FF are you using? Can you try another browser?
2009-10-27 17:26:33 tx4587 (at) crawford (dot) homeunix (dot) net Comment #12 Reply to this comment
The horde log didn't change but a new Firebug entry showed up, hope 
this helps:

===

assignment to undeclared variable params

deleteFace(451, 25)view.php...image=451 (line 126)

function onclick(event) { deleteFace(451, 25); }(click clientX=913, 
clientY=153)view.php...nt/seq/15 (line 2)

[Break on this error] params = {'image': image_id, face: 
face_id};\nview.php...image=451 (line 126)

===


2009-10-27 14:24:41 Michael Rubinsky Deleted Original Message
 
2009-10-27 14:24:36 Michael Rubinsky Deleted Original Message
 
2009-10-27 14:24:14 Michael Rubinsky Comment #11 Reply to this comment
Really not sure what's going on there, but I made some other necessary 
changes to the code while I was poking around that might have an 
effect on what you are seeing. Please try updating or applying the 
changes and try again...





http://cvs.horde.org/diff.php/ansel/lib/XRequest/Attic/EditFaces.php?rt=horde&r1=1.14.2.3&r2=1.14.2.4&ty=u
2009-10-27 00:23:34 tx4587 (at) crawford (dot) homeunix (dot) net Comment #10
New Attachment: prototype.js
Reply to this comment
Sorry must have forgotten the attachment.
2009-10-27 00:22:19 tx4587 (at) crawford (dot) homeunix (dot) net Comment #9 Reply to this comment
Ok I'm getting into things here I'm not sure about forgive me if this 
isn't right, however I got this response, this looks like it's related 
to the message I put in my last post, but this time upon clicking on 
the message the following 1 lined code appeared in a new window 
However it is absolutely huge so I'm going to attach it.



Then a few seconds later the following appeared



===

reference to undefined property responder[callback]

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

c()prototype.js (line 1)

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

[Break on this error] if (Object.isFunction(responder[callback])) 
{\nprototype.js (line 1343)

===



Looks like there is at least a line number this time. Clicking on the 
link brought me to a huge window of code in which this was highlighted:

       if (Object.isFunction(responder[callback])) {
2009-10-26 23:02:29 Jan Schneider Comment #8 Reply to this comment
You need to link to the uncompressed JS files to make this easier to 
debug.  Change the following item in the 'ansel' and 'horde' block in 
horde/config/registry.php:

      'jsuri' => $webroot . '/ansel/js/src',

      'jsuri' => $webroot . '/js/src',


2009-10-26 22:56:37 tx4587 (at) crawford (dot) homeunix (dot) net Comment #7 Reply to this comment
Using FireBug, (Which I don't really know how to use by the way) I get 
this message when I click on the "Trash Can"



===

reference to undefined property f[d]

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

anonymous(function())prototype.js (line 1)

c(function(), Object name=x)prototype.js (line 1)

anonymous("onLoading", Object options=Object transport=XMLHttpRequest, 
Object request=Object transport=XMLHttpRequest, Object 
name=a)prototype.js (line 1)

anonymous(1)prototype.js (line 1)

anonymous()prototype.js (line 1)

anonymous()prototype.js (line 1)

[Break on this error] var 
Prototype={Version:"1.6.1",Browser:(...lement.ClassNames.prototype,Enumerable);prototype.js (line 
1)

===
2009-10-26 22:46:50 tx4587 (at) crawford (dot) homeunix (dot) net Comment #6
New Attachment: horde_faces_bug_8609.patch
Reply to this comment
I didn't use CVS but used the snapshot from the 26th. In any case I 
saw that there was some code the attachment is the patchfile I created 
and applied between the two versions:



In any case the logging information was the exact same as before. No 
new messages
2009-10-24 18:22:08 Michael Rubinsky Comment #5
State ⇒ Feedback
Reply to this comment
I am still unable to duplicate locally, but I've made some changes to 
write some info to the log if deletion fails in any way that is 
currently checked for. Please update your code from CVS, and try 
deleting the face(s) again. Then check the horde log for any error 
output and post back here.



Alternatively, if you are using Firefox, and use the Firebug 
extension, you could watch for the return value of the ajax call that 
performs the face deletion.
2009-10-24 18:19:21 CVS Commit Comment #4 Reply to this comment
Changes have been made in CVS for this ticket:

Add some Horde logging when deleting a face fails, in an attempt to get to the
bottom of Bug: 8609
http://cvs.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde&r1=1.517.2.71&r2=1.517.2.72&ty=u
http://cvs.horde.org/diff.php/ansel/lib/XRequest/Attic/EditFaces.php?rt=horde&r1=1.14.2.2&r2=1.14.2.3&ty=u
2009-10-21 13:50:00 Jan Schneider State ⇒ Assigned
 
2009-09-29 15:32:01 tx4587 (at) crawford (dot) homeunix (dot) net Comment #3 Reply to this comment
Well your steps are what I did, here is some more detail I'm using 
version 1.0.1-cvs. I'm also using postgres 8.4.1, and when setting the 
logging for horde to debug the only result I get when clicking on the 
trash icon is the following:



=====

Sep 29 08:26:37 HORDE [debug] [horde] SQL connection setup for Alarms, 
query = "SET datestyle TO 'iso'" [pid 15412 on line 414 of 
"/var/www/html/horde-webmail-1.2.4/lib/Horde/Alarm/sql.php"]

Sep 29 08:26:37 HORDE [debug] [ansel] Hook _horde_hook_share_init in 
application horde not called. [pid 15412 on line 1713 of 
"/var/www/html/horde-webmail-1.2.4/lib/Horde.php"]

Sep 29 08:26:37 HORDE [debug] [ansel] Max memory usage: 3670016 bytes 
[pid 15412 on line 339 of 
"/var/www/html/horde-webmail-1.2.4/lib/Horde/Registry.php"]

=====



Which doesn't seem to say much to me at least.

[Show Quoted Text - 16 lines]
2009-09-29 14:32:02 Michael Rubinsky Comment #2
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
I am unable to reproduce this. This is what I did to try:



1. Click on "Faces" menu item.

2. lick on one of the displayed faces, which brings up the Image view 
for the image containing the face

3. Click "Edit Faces" in the faces widget

4. Click the trash can icon next to the face.

5. Return to the "Faces" page.



The image of the face originally clicked on is no longer displayed for me.





Please check your log files for any relevant errors, or clarify the 
steps needed to reproduce if not what I outlined above.



Thanks.
2009-09-29 02:26:46 Chuck Hagenbuch Assigned to Michael Rubinsky
State ⇒ Assigned
 
2009-09-28 23:10:57 tx4587 (at) crawford (dot) homeunix (dot) net Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Can't delete faces
Queue ⇒ Ansel
Milestone ⇒
Patch ⇒ No
Reply to this comment
If you go to the "Faces" tab and then click on a face and bring the 
picture up that contains the face, then try to click on "Edit Faces" 
then click on the trash can icon to delete the face, it disappears but 
then it's back if you back to the "Faces" tab.



Looks like it's not being deleted permanently.



I don't know of any other way of deleting a face through the interface.

Saved Queries