First off, kudos! What a great concept! Looking forward to the first release.

I tried both the beta and dev version, but it seems toggling an item doesn't make it permanent (in the database). Firebug does show a call to todo/toggle/1, but no response.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Yuri’s picture

Yes, checking the boxes should be permanent...
Subscribing

Oliver Huynh’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta2
Status: Active » Patch (to be ported)
FileSize
64 bytes

This is absolutely a bug. Please apply attaching patch.

yannickoo’s picture

oliverhuynh, how did you create the patch? Please read http://drupal.org/node/707484.

The attached patch works.

Oliver Huynh’s picture

Status: Patch (to be ported) » Needs review

Sorry. I made with other patch app. This needs review. I tested it ok.

Oliver Huynh’s picture

Status: Needs review » Patch (to be ported)
Pomliane’s picture

Priority: Normal » Critical
Status: Patch (to be ported) » Needs work

Patch #3 does not work here.

Priority from Normal to Critical because if "Checking an item off the list doesn't make it permanent", what is the point of this module?

yannickoo’s picture

Pomliane, why you say that the patch does not work here? It's a one liner and it's necessary that we put the content of node_load($nid) in a variable. In this case $node = node_load($nid);

Pomliane’s picture

@yannickoo, the patch does not solve anything here: checking an item off the list still doesn't make it permanent.

It seems $nid is not defined in todo_filter_toggle() and, as a consequence, a new dummy node is created each time the function is called.
With a static $nid value in todo_filter_toggle(), the target node is saved but todo items states are not saved either...

yannickoo’s picture

@Pomliane, my patch was the "fix" for comment #2.

zanix’s picture

Version: 6.x-1.0-beta2 » 7.x-1.0
Assigned: Unassigned » zanix
Status: Needs work » Closed (fixed)

This is fixed in 6.x-1.0 and 7.x-1.0.

Knarf31’s picture

Version: 7.x-1.0 » 6.x-1.0
Status: Closed (fixed) » Active

Hi,

this still isn't fixed for me:
I'm using the latest 6.x-1.0 version and firebug is giving me a 403 - forbidden error each time i try to check or uncheck an item.

Any ideas?

zanix’s picture

Does the user you are logged in as have permission to edit the node?

zanix’s picture

It also looks like the user you are logged in as has to have the ability to use the filter type selected for the body of the node.

zanix’s picture

sweenyy was the solution I posted correct? Can I mark this issue as resolved?

zanix’s picture

Status: Active » Closed (works as designed)

Closing since there is no response and todo is working as designed

inteja’s picture

Version: 6.x-1.0 » 7.x-1.x-dev
Status: Closed (works as designed) » Active

I'm sorry but this doesn't work for me at all. I've tried both 7.x-1.0 and 7.x-1.x-dev and neither are doing an ajax save node when a todo list item is checked or unchecked. I've checked node access and edit permissions and even tried allowing all anon and authenticated users full edit rights, but it made no difference.

There are no js errors.

inteja’s picture

I have also just tested todo filter 7.x-1.x-dev on a totally clean install of the latest Drupal core 7.23 and am experiencing the same issue, so it's unlikely to be a module conflict. Just to be sure I also tried changing the todo filter ordering, but that didn't work either.

zanix’s picture

If you are using Chrome or Firefox, can you look at the Network tab in the inspect tool and see what the response is when you check an item on/off?

inteja’s picture

Doesn't look like it's using the full path to my Drupal instance.

404 Not Found
Request URL:http://localhost/todo/toggle/body[0]-1-2  
zanix’s picture

Ah, looks like the JavaScript is using a fixed path, not a relative one.
Drupal.settings.basePath needs to be added to the JavaScript file.

For Drupal 7, in the file todo_filter.js
Change this

$.post('/todo/toggle/' + $(this).attr('rel'));

To this

$.post(Drupal.settings.basePath + 'todo/toggle/' + $(this).attr('rel'));

I need to double check if D6 has this JS variable or not.

inteja’s picture

Works great, thanks zanix.

zanix’s picture

Great, I will get this added to dev soon

ergonlogic’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
3.02 KB

hook_node_view_alter() is only called when nodes are fully rendered. Notably, it isn't called when fields are displayed in Views or Panels. Switching to hook_field_attach_view_alter() fixes this. The attached patch also implements the change to the js suggested in #20.

zanix’s picture

Good catch, I didn't think about having to check Panels or views.

  • Commit d556240 on 7.x-1.x by zanix:
    Issue #803224 by ergonlogic: JavaScript is using a fixed path and switch...

  • Commit c3fc15b on 6.x-1.x by zanix:
    Issue #803224 by inteja: JavaScript is using a fixed path
    
zanix’s picture

Status: Needs review » Fixed

Commit d556240 on 7.x-1.x
Commit c3fc15b on 6.x-1.x

  • Commit c6467c3 on 7.x-1.x by zanix:
    Issue #803224 by zanix: Added valid check for #object fixing Undefined...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.