title: Magento attribute values saved in admin disappear
body: <p>I had set up the catalog to sort on these values, which I saved through the admin last night. For most of a full day they were there. Now, like ghosts they have disappeared.</p>
  
  <p>I suspect the problem could be tied to values saved through the admin rather than imported.</p>
  
  <p>Can anyone point me to the source of this problem and the solution in the code?</p>
  
  <p>Between the last time I saw the values working on the frontend (a few hours ago) and now, I did several things:</p>
  
  <p>1.) Added 2 new attributes and some test values (unrelated to problem attribute), reindexed.</p>
  
  <p>2.) Tried to import unrelated values for 60,000 products. Import hanged, so</p>
  
  <p>3.) Imported values for 20,000 products at a time, no errors.</p>
  
  <p>4.) reindexed.</p>
  
  <p>Now all values saved manually are gone. Again, how can this happen? If they were saved to the DB, then shouldn't it take an delete call from the code to the DB to do this? How/why would such a call be made when I did not execute any such command in code or through admin? How can I fix this and avaoid in future?</p>
  
  <p>TO AXEL (clarifying):</p>
  
  <p>Thanks for your reply, @Axel.</p>
  
  <p>1.) I created a <strong>text attribute</strong> called "<strong>sort_order</strong>" and entered some integer values through the <strong>admin</strong>.</p>
  
  <p>2.) Then I did a <strong>full db backup</strong> with mysqldump.</p>
  
  <p>3.) Then, I created two new attributes, "<strong>random_order</strong>" (<strong>price</strong> type) and "<strong>random_order_1</strong>" (<strong>text</strong> type). The purpose was to experiment with two solutions for shuffling the products in the catalog pages.</p>
  
  <p>4.) Through phpMyAdmin I did a simple query to give me all products in random order:</p>
  
  <pre><code>SELECT  `sku` 
  FROM  `catalog_product_entity` 
  WHERE 1 
  ORDER BY RAND( )
  </code></pre>
  
  <p>and exported the result to csv. I simply used excel to number the items from 1-60,000, creating an import csv file with columns: <strong>sku</strong>, <strong>random_order</strong> (price type), <strong>random_order_1</strong> (text type), with both attributes having same integer values.</p>
  
  <p>5.) I used standard import method (<strong>replace existing complex data</strong>) in admin, 20k products at a time. After import, values for previously set and seemingly totally unrelated "<strong>random_order</strong>" have been deleted.</p>
  
  <p>Before reindexing, every item's <strong>sort_order</strong> is now reset to default (=1), but it still appears in proper order on the frontend (so value still exists in product flat table), while the <strong>random_order</strong> and <strong>random_order_1</strong> attributes have their imported values.</p>
  
  <p>After reindex, all trace of <strong>sort_order</strong> is wiped out. That would make sense if I was actually importing that attribute, but I'm not. No other attribute appears to have been affected.</p>
  
  <p>I restored db from mysqldump, tried whole process again. Same result.</p>