Nodes order weights are not reloaded with submitted values when Entity Cache module is enabled.
Entity cache has to be reset after updating the taxonomy_index table.
To resolve this problem, I added some ligne to nodeorder.admin.inc:

function nodeorder_admin_display_form_submit($form, &$form_state) {
  $tid = $form['#term']->tid;
  $ids = array();
  foreach ($form_state['values'] as $nid => $node) {
    // Only take form elements that are blocks.
    if (is_array($node) && array_key_exists('weight', $node)) {
      db_update('taxonomy_index')->fields(array('weight' => $node['weight']))
        ->condition('tid', $tid)
        ->condition('nid', $nid)
        ->execute();
        $ids[] = $nid;
    }
  }

  drupal_set_message(t('The node orders have been updated.'));

  if (module_exists('entitycache')) {
    cache_clear_all($ids, 'cache_entity_node');
  }

  cache_clear_all();

  return;
}
CommentFileSizeAuthor
#2 2684301-2-invalidate-entitycache.patch1006 bytesgreggadsdon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MaherSakka created an issue. See original summary.

greggadsdon’s picture

I've attached a patch. I've cleared the cache using a broader method as it could clear other caching systems too, but it does clear entitycache as above.

davps’s picture

Status: Active » Needs review