Please disregard the 'View article...' shown at the bottom of many posts as this is the result of restoring old forum posts from a backup.

Error on upgrading to 2.4.2

I manage several sites that use Exponent. Only one of them is maintained with Git. On that site when I get to the database upgrade step, I get this error: Fatal error: cannot declare class order, because the name is already in use in /framework/modules/ecommerce/models/order.php on line 0.

I am able to continue setup by changing the URL from upgrade-3 to upgrade-4. This site has been getting stuck on step 3 for the last few versions but this is the first time I actually got an error message. 


  • Odd, you might check for another copy of 'order.php' in another 'model' folder like /framework/core/models (though we do now ship an empty one there, it was originally where the order.php file was kept). In any case, you can DELETE /framework/core/models/order.php since it will (eventually) be deleted in the upgrade.
  • I searched the system for any other copies of 'order.php'. The only locations found were /framework/modules/ecommerce/models and /external/easypost-php-3.4.0/lib/EasyPost

    I do not believe that I should remove either file?
  • Yes you are correct, those files are both needed. If the system had been upgraded from a VERY old version, at one point the /framework/modules/ecommerce/model/order.php (not the EasyPost external library) was in framework/core/models/

    I don't know if you have more data from the fatal error...the 'already in use' is the correct 'order' class, so it might be interesting to see what new 'order' class is trying to be instantiated.
  • After looking at my PHP error log, I found another entry from the same time that says: 

     Cannot declare class order, because the name is already in use in /home/plasma_admin/ on line 0

    That file was from 2016, I vaguely recall making the copy, but haven't needed it so I deleted it. The next time this site has an update, I will see if the errors go away.

  • You are not the only one that does that method as a backup technique and finds the way Exponent looks for class files ends up tripping over them.
Sign In or Register to comment.