Midtown Posted June 9, 2013 Share Posted June 9, 2013 Hi, I've got this error appearing anytime I try to change ANYTHING regarding the carrier options. Anything from trying to delete a carrier option to trying to change an image will result in this error: PrestaShopException] Property Carrier->max_weight is not valid at line 837 in file classes/ObjectModel.php 831. 832. $message = $this->validateField($field, $this->$field); 833. if ($message !== true) 834. { 835. if ($die) 836. throw new PrestaShopException($message); 837. return $error_return ? $message : false; 838. } 839. } 840. 841. return true; Anyone have a clue? Thanks a lot in advance! Link to comment Share on other sites More sharing options...
Midtown Posted June 9, 2013 Author Share Posted June 9, 2013 I should add, have version 1.5.4 installed. Thanks.. Link to comment Share on other sites More sharing options...
NemoPS Posted June 10, 2013 Share Posted June 10, 2013 What do you have in your weight ranges? Link to comment Share on other sites More sharing options...
Midtown Posted June 10, 2013 Author Share Posted June 10, 2013 HI, from 0 to 100000 lbs. It says The max_weight field is invalid no matter what I put in there, and when trying to delete it I get the error mentioned above. Here's what the last few rows in one of the carriers look like: Maximium package height: Maximum height managed by this carrier. Set the value to "0," or leave this field blank to ignore. Maximium package width: Maximum width managed by this carrier. Set the value to "0," or leave this field blank to ignore. Maximium package depth: Maximum depth managed by this carrier. Set the value to "0," or leave this field blank to ignore. Maximium package weight: Maximum weight managed by this carrier. Set the value to "0," or leave this field blank to ignore. Thanks.. Link to comment Share on other sites More sharing options...
Midtown Posted June 10, 2013 Author Share Posted June 10, 2013 It's set to 0 for all options above. Link to comment Share on other sites More sharing options...
brightblanks Posted June 13, 2013 Share Posted June 13, 2013 Did you figure out how to fix this? I have the exact same thing happening!! Link to comment Share on other sites More sharing options...
NemoPS Posted June 14, 2013 Share Posted June 14, 2013 DId you (both) upgrade from previous versions? Anyway, I'd suggest replacing the current carrier class in classes/ with a brand new one, as invalid fields are defined there and something might have gone wrong Link to comment Share on other sites More sharing options...
jollywood112 Posted June 14, 2013 Share Posted June 14, 2013 (edited) Hi, since I do have the same problem in new 1.5.4.1 install (no upgrade) I am very interested in the solution to this. My question for the moment is : How / where do I replace the current carrier class with a brand new one mentioned as a solution by the moderator? Jollywood Edited June 14, 2013 by jollywood112 (see edit history) Link to comment Share on other sites More sharing options...
Midtown Posted June 14, 2013 Author Share Posted June 14, 2013 Hi, to brightblanks: no I did not solve this yet. I replaced the Carrier.php from a fresh file into the /classes folder but this did not help unfortunately. I too have a fresh install of 1.5.4. Very eager to get this fixed in order to go live. Anyone have any other ideas? Thanks.. Link to comment Share on other sites More sharing options...
jollywood112 Posted June 22, 2013 Share Posted June 22, 2013 (edited) I did a download of a fresh 1.5.4.1, no problem found with the carrier. So I found a file: /classes/carrier.php with a difference to the file in my live version 1.5.4.1 : I renamed my liveversion of /classes/carrier.php Uploaded the new carrier.php and for as far as I can see the problem has gone!! Jollywood P.S. Strange that it is possible to have different PHP files in the same edition (1.5.4.1) Edited June 22, 2013 by jollywood112 (see edit history) Link to comment Share on other sites More sharing options...
Naughtyham Posted June 26, 2013 Share Posted June 26, 2013 I had this problem and i found the solution for it as well. In /classes/Carrier.php line 131 I had 'max_weight' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), instead of 'max_weight' => array('type' => self::TYPE_INT, 'validate' => 'isFloat'), Change that and you're good to go 1 Link to comment Share on other sites More sharing options...
VKB Posted November 16, 2013 Share Posted November 16, 2013 I had this problem and i found the solution for it as well. In /classes/Carrier.php line 131 I had 'max_weight' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), instead of 'max_weight' => array('type' => self::TYPE_INT, 'validate' => 'isFloat'), Change that and you're good to go Very Goood!!! Link to comment Share on other sites More sharing options...
Recommended Posts