The refresh error is a bit annoying, especially if one is using draggableviews in a non admin way.. As a temporary solution, I simply tossed in a node presave function into a module.. thought I would post it so that others could do the same until a solution is found which removes the need for such function. Note, this will not always work unless you never enter a value into the integer field.. a simple way to ensure that this always happens is to unset the field using a form_alter.

/*
 * This is a quick fix to the problem with draggable views which causes an error
 * if more than one node has the same value for integer. Therefore, unless the
 * user has set the integer field, then it is set to the node created unix timestamp.
 */
function modulename_nodeapi(&$node, $op) {
  switch($op){
    case "presave":
        if(!isset($node->field_integer[0]['value'])) {
          $node->field_integer[0]['value'] = $node->changed;
        }
      break;
  }
}

Comments

ultimateboy’s picture

Humm. That just does not work. Appears to work until you try to edit the node. /me tries to figure something else out.

ultimateboy’s picture

Status: Active » Closed (won't fix)

For now, I am just going to say will not fix, to get it off of the normal issue listing..

ultimateboy’s picture

Status: Closed (won't fix) » Fixed

Well. This actually did work, and quite well for that matter. The problem was coming from a bit more custom code I was applying to hook_nodeapi().

I think that this is actually a wonderful solution to this problem... It is simple and should work, every time without fail.

Status: Fixed » Closed (fixed)

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

looplog’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Yes the refresh error is the one thing holding me back from using this module. So, what exactly should I do with the above code to get a temporary fix?

ultimateboy’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

You will have to create a custom module to invoke the hook_nodeapi(). The above code is the only thing required within your .module file. You will also have to create a .info file for your custom module. Read the documentation pages on creating modules for more information.