Hi , I also do not go on what may be the . I wondered how the new posts were displayed in the forum again below, although the setting is enabled on the latest posts only . After I looked for a Hot , I found that the postings in the table "node" and " node_revision " in the column "sticky" with be " -100 " saved . But it should be only 1 or 0 , yes.

So I searched the internet for solutions but unfortunately without success . The website of Drupal 6 after Drupal 7 updated and everything else the side works well . Only the order of the posts are not correct.

I can indeed change it manually in the database and then the message will again appear at the top . Only when I create a neunen contribution of this is again stored with Sticky -100 and so also put back down. I really do not know what can cause or where the -100 comes from.

Has anyone ever had of you , or does anyone know what the lie kann.Ich am now really to despair , and grateful for any hint or help

regards
Patrick

I hope you understand my bad english

Comments

fugazi’s picture

I get out when I activate the hoes in the Type Settings On peak, the contribution in the "sticky" is written with 100. What can it ever be. Somewhere he must yet come forth it its to 0 or 1, rather than 100 or -100.

Which modules can cause something like that, or where the command can sticky -100 or 100 coming from. Would be really grateful for any help, tip, suggestion.

regards
Patrick

I have again attached a screenshot for better understanding.

Screenshot

fugazi’s picture

I have found the error and evildoers. It is the modules links (I hope) to disable the module stores it the posts as usual with 0 and 1 The file it appears to have caused the weblinks.weight.inc

<?php

/**
 * @file
 * Enable submission and display of categorized web links.
 * This is an add-in that allows Web Links to act as though the Weight
 * module is present. "Borrowed" from the Weight module.
 */

/**
 * Convert our weight to 'encoded' sticky value for DB.
 * Stickiness is the inverse of weight - stickiness is sorted DESC while
 * weight is sorted ASC so we invert the weight before saving...
 * If the sticky box is checked, subtract weight from 100;
 * unweighted sticky nodes will have a value of 100.
 */
function weblinks_weight_encode(&$node) {
  if ($node->sticky == 1) {
    $node->sticky = 100 - $node->node_weight;
  }
  // Unweighted non-sticky nodes will have a value of -100.
  else {
    if ($node->sticky == 0) {
      $node->sticky = -($node->node_weight + 100);
    }
  }
}

/**
 * Convert our weight back out of sticky.
 */
function weblinks_weight_decode(&$node) {
  if ($node->sticky == 0 || $node->sticky == 1) {
    $node->node_weight = 0;
    return;
  }
  
  if ($node->sticky > 0) {
    $node->node_weight = 100 - $node->sticky;
    $node->sticky = 1;
  }
  else {
    $node->node_weight = -($node->sticky + 100);
    $node->sticky = 0;
  }
}
jonathan1055’s picture

This issue is discussed on #2030765: Editing a sticky node sets db field to -100 for non-weblinks nodes. Do not encode weight and remove the weight.inc file where I have added a patch to fix the code and correct the sticky values in the node and node_revision table.

Jonathan