Magento 2.1 – Category Move Error: Something Went Wrong While Saving the Category

categorycategory-treeerrorexceptionmagento-2.1

We are experiencing issues when trying to move or save a category in Magento 2.1.8

Trying to move a category results in:

There was a category move error.

Whilst trying to save gives this error:

Something went wrong while saving the category.

The following in the exception log is one clue:

main.CRITICAL: InvalidArgumentException: indexMethod must be one of  in
/home/site/websites/www.xxxxxxxxxx.com/htdocs/vendor/magento/framework/DB/TemporaryTableService.php:103

The only other error being in the console:

VM1871:6 Expected to start loader but did not find one in the dom

I've found people with similar errors on Google, but none with this exception.

I've tried:

  • Reindexing
  • Clearing caches
  • Recompiling
  • Truncating the url_rewrite table

But nothing has worked.

Any help would be greatly appreciated.

Best Answer

The user dakzilla over on GitHub had the same issue, and his solution worked for me.

During the upgrade from 2.1.7 to 2.1.8 (in my case), app/etc/di.xml was not updated properly.

Adding the following lines to the file (after comparing my file to that in the official download) and recompiling got rid of the errors.

<type name="Magento\Framework\DB\TemporaryTableService">
  <arguments>
    <argument name="allowedIndexMethods" xsi:type="array">
      <item name="HASH" xsi:type="string">HASH</item>
      <item name="BTREE" xsi:type="string">BTREE</item>
    </argument>
    <argument name="allowedEngines" xsi:type="array">
      <item name="INNODB" xsi:type="string">INNODB</item>
      <item name="MEMORY" xsi:type="string">MEMORY</item>
      <item name="MYISAM" xsi:type="string">MYISAM</item>
    </argument>
  </arguments>
</type>