the problem has been fixed in trunk. The issue was *kinda non-existant* for 
javascript enabled browsers, because there was an onclick attribute on the 
delete button that called the delete url correctly.

Now there are both the full link to the delete url and the onclick 
attribute, so behaviour is consistent both in javascript-enabled and 
javascript-disabled browsers.

Il giorno venerdì 11 gennaio 2013 14:24:46 UTC+1, Christian Espinoza ha 
scritto:
>
> This Problem is currently active in 2.3.2 
>
> There is something with the link for delete action at generation of grid code:
>
> With 2.2.1
>
> View->http://127.0.0.1:8000/webapp/admin/users/view/auth_user/6?_signature=d408cbb7bcbce4ec22a9089465dcefc7f1f2a5db
> Edit- 
> <http://127.0.0.1:8000/webapp/admin/users/view/auth_user/6?_signature=d408cbb7bcbce4ec22a9089465dcefc7f1f2a5dbEdit->>http://127.0.0.1:8000/webapp/admin/users/edit/auth_user/6?_signature=a688c63924538f53fdf0da2630790d780204403d
> Delete- 
> <http://127.0.0.1:8000/webapp/admin/users/edit/auth_user/6?_signature=a688c63924538f53fdf0da2630790d780204403dDelete->>http://127.0.0.1:8000/webapp/admin/users?_signature=ca13c286893cff85c6916ff7723d3f0cd8e24c56#null
>
> With 2.3.2
>
> View->http://127.0.0.1:8000/webapp/admin/users/view/auth_user/6?_signature=d408cbb7bcbce4ec22a9089465dcefc7f1f2a5db
>
> Edit->http://127.0.0.1:8000/webapp/admin/users/edit/auth_user/6?_signature=a688c63924538f53fdf0da2630790d780204403d
>
> Delete->http://127.0.0.1:8000/avl/admin/users#null
>
> As you can see the Delete option link doesn't point to any function at both 
> versions
>
>
> Christian.
>
>
> El miércoles, 26 de diciembre de 2012 20:48:21 UTC-3, Massimo Di Pierro 
> escribió:
>>
>> Can you please open a ticket about this?
>>
>> On Wednesday, 26 December 2012 13:40:15 UTC-6, BJ wrote:
>>>
>>> The problem is in sqlhtml.py
>>>
>>> In latest version from line 2293-2297 is following content:
>>>
>>> if deletable and (not callable(deletable) or deletable(row)):
>>>                         row_buttons.append(gridbutton(
>>>                             'buttondelete', 'Delete',
>>>                             callback=url(args=['delete', tablename, id
>>> ]),
>>>                             delete='tr'))
>>>
>>> but it should be:
>>>
>>> if deletable and (not callable(deletable) or deletable(row)):
>>>                         row_buttons.append(gridbutton(
>>>                             'buttondelete', 'Delete',
>>>                             buttonurl=url(args=['delete', tablename, 
>>> id]), <--- Missing line to define URL for Delete button
>>>                             callback=url(args=['delete', tablename, 
>>> id]), <--- We need this for warning message (I believe so?)
>>>                             delete='tr'))
>>>
>>> But we also need to update gridbutton function (line 1806) because we 
>>> need button URL and warning. I have tried to add "buttonurl" but now the 
>>> record is deleted even if I select "Cancel".
>>>
>>> I don't know how to fix this because I don't how to handle callback.
>>>
>>> Boris
>>>
>>>
>>> Dne sreda, 19. december 2012 17:23:18 UTC+1 je oseba Mandar Vaze 
>>> napisala:
>>>>
>>>> I know it is a tough one, but can you guess what "could" be the problem 
>>>> ? As I mentioned, "explicitly" adding db.commit() helps "resolve" the 
>>>> problem (Whether in gluon/sqlhtml.py or separately in my custom ondelete)
>>>>
>>>> Does that give you any hints ? I debugged but (obviously) couldn't find 
>>>> the culprit.
>>>>
>>>> Any pointers on how to troubleshoot/debug this ? I think at least one 
>>>> more person has similar problem (One that started this thread)
>>>>  
>>>>
>>>>> Really not relevant all the modify_grid() part. That doesn't belong to 
>>>>> web2py, which you are addressing the bug to. 
>>>>>
>>>>
>>>> I know. But it was something different - so I thought it may be 
>>>> relevant.
>>>>  
>>>>
>>>>> Without the table model, all code is quite useless. We don't need your 
>>>>> app. Just *an* app showing the problem.
>>>>>
>>>>
>>>> Ahh, I see. Let me try to create that (app) 
>>>>
>>>> -Mandar
>>>>
>>>

-- 



Reply via email to