Hi

Background

I have a case where nodes and terms are imported with PHP.
When importing, they have weight ranging from 1 to 1000.

If I look their weight in admin after import - it seems OK.
But after I change one terms weight, all weights are reset and weight counting starts from 0.

I kindly ask suggestions how to solve this kind of issue? (either by keeping weights or taking whole different approach to weight managemet for imported objects)

Example for illustrating the situation

Step 1

3 terms are imported with PHP:

  • term 1 - with weight: 300
  • term 2 - with weight: 345
  • term 3 - with weight: 421

Step 2

When updating term 1 weight in admin to something else, all weights get reset and they now start from 1.

Step 3

Term 4 is imported with weight 320.
By original imported weights, new term should be put between term 1(300) and term 2(345) - since it has weight of 320.

And expected result would be:

  • term 1 - with weight: 300
  • term 4 - with weight: 320
  • term 2 - with weight: 345
  • term 3 - with weight: 421

But since weights are reset, new order looks like that:

  • term 1 - with weight: 1
  • term 2 - with weight: 2
  • term 3 - with weight: 3
  • term 4 - with weight: 320

Any suggestions are appreciated!

Comments

adroid’s picture

Issue summary: View changes

typo

davisben’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I think there may be some confusion here. This module doesn't work on taxonomy terms. I think your problem is more of a core issue.