Mort-lemur Posted December 22, 2022 Posted December 22, 2022 Ok - so I am playing with V4 on xampp, and have discovered an issue - when I add a new category and try to assign images to that category pressing the "save" button does not actually save the images to the category - in fact it does nothing. - I have a feeling that this is something to do with me running OSC on xampp. The error shown in the log is as follows: 2022-12-22 18:49:41 [127.0.0.1][-][oa4cntjlgne9a243317l955ga3][error][yii\base\ErrorException:2] yii\base\ErrorException: mkdir(): No such file or directory in C:\xampp\htdocs\catalog\lib\backend\design\Uploads.php:35 Stack trace: #0 C:\xampp\htdocs\catalog\lib\common\classes\TlErrorHandler.php(51): yii\base\ErrorHandler->handleError(2, 'mkdir(): No suc...', 'C:\\xampp\\htdocs...', 35) #1 [internal function]: common\classes\TlErrorHandler->handleError(2, 'mkdir(): No suc...', 'C:\\xampp\\htdocs...', 35) #2 C:\xampp\htdocs\catalog\lib\backend\design\Uploads.php(35): mkdir('C:/xampp/htdocs...', 511) #3 C:\xampp\htdocs\catalog\lib\backend\controllers\CategoriesController.php(5306): backend\design\Uploads::move('PC150111.JPG', 'images/categori...', true) #4 [internal function]: backend\controllers\CategoriesController->actionCategorySubmit() #5 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array) #6 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\Controller.php(178): yii\base\InlineAction->runWithParams(Array) #7 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\Module.php(552): yii\base\Controller->runAction('category-submit', Array) #8 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('categories/cate...', Array) #9 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\Application.php(384): yii\web\Application->handleRequest(Object(yii\web\Request)) #10 C:\xampp\htdocs\catalog\lib\backend\web\index.php(29): yii\base\Application->run() #11 C:\xampp\htdocs\catalog\admin\index.php(15): require('C:\\xampp\\htdocs...') #12 {main} Any suggestions would be appreciated. Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
ArtcoInc Posted December 22, 2022 Posted December 22, 2022 (edited) @Mort-lemur 1 hour ago, Mort-lemur said: Ok - so I am playing with V4 on xampp, and have discovered an issue - when I add a new category and try to assign images to that category pressing the "save" button does not actually save the images to the category - in fact it does nothing. - I have a feeling that this is something to do with me running OSC on xampp. The error shown in the log is as follows: 2022-12-22 18:49:41 [127.0.0.1][-][oa4cntjlgne9a243317l955ga3][error][yii\base\ErrorException:2] yii\base\ErrorException: mkdir(): No such file or directory in C:\xampp\htdocs\catalog\lib\backend\design\Uploads.php:35 Stack trace: #0 C:\xampp\htdocs\catalog\lib\common\classes\TlErrorHandler.php(51): yii\base\ErrorHandler->handleError(2, 'mkdir(): No suc...', 'C:\\xampp\\htdocs...', 35) #1 [internal function]: common\classes\TlErrorHandler->handleError(2, 'mkdir(): No suc...', 'C:\\xampp\\htdocs...', 35) #2 C:\xampp\htdocs\catalog\lib\backend\design\Uploads.php(35): mkdir('C:/xampp/htdocs...', 511) #3 C:\xampp\htdocs\catalog\lib\backend\controllers\CategoriesController.php(5306): backend\design\Uploads::move('PC150111.JPG', 'images/categori...', true) #4 [internal function]: backend\controllers\CategoriesController->actionCategorySubmit() #5 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array) #6 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\Controller.php(178): yii\base\InlineAction->runWithParams(Array) #7 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\Module.php(552): yii\base\Controller->runAction('category-submit', Array) #8 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('categories/cate...', Array) #9 C:\xampp\htdocs\catalog\lib\vendor\yiisoft\yii2\base\Application.php(384): yii\web\Application->handleRequest(Object(yii\web\Request)) #10 C:\xampp\htdocs\catalog\lib\backend\web\index.php(29): yii\base\Application->run() #11 C:\xampp\htdocs\catalog\admin\index.php(15): require('C:\\xampp\\htdocs...') #12 {main} Any suggestions would be appreciated. Thanks Not that I know what I'm talking about ... <g>, but I see: C:\xampp in the first line, and in most of the other lines * but I also see * C:\\xampp in lines 0 and 11 * Oh, I also see * both C:\xampp *and* C:/xampp in line 2 maybe ? Edited December 22, 2022 by ArtcoInc Quote
osCommerce-Official Posted December 22, 2022 Posted December 22, 2022 @pandrei is it something we can help with? Quote
pandrei Posted December 22, 2022 Posted December 22, 2022 2 hours ago, Mort-lemur said: Any suggestions would be appreciated. Open /lib/backend/design/Uploads.php file and change line 35 by adding the third parameter: mkdir($path2, 0777, true); Of course, we will fix it in the next update. osCommerce-Official 1 Quote
pandrei Posted December 22, 2022 Posted December 22, 2022 It's not enough. As I said before some features may not work incorrectly under Windows. Open lib/backend/controllers/CategoriesController.php. And add new line 5307 $val = Uploads::move($categories_image_loaded, $imgPath . $imageType, true); $val = str_replace('\\', '/', $val); $val = str_replace(DIR_WS_IMAGES, '', $val); osCommerce-Official 1 Quote
Mort-lemur Posted December 24, 2022 Author Posted December 24, 2022 @pandrei Thank You. Using xampp was too slow and clunky, so now I have switched to a server running php 8. Do the above changes only apply to xampp installations, or should they be applied regardless? as I am still having problems with category images on the live server. Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
pandrei Posted December 24, 2022 Posted December 24, 2022 4 hours ago, Mort-lemur said: Using xampp was too slow and clunky, so now I have switched to a server running php 8. You are absolutely right. That's why we consider windows servers only for test purposes. 4 hours ago, Mort-lemur said: Do the above changes only apply to xampp installations, or should they be applied regardless? as I am still having problems with category images on the live server. The above changes fix category images for windows servers only. Mort-lemur 1 Quote
Mort-lemur Posted December 28, 2022 Author Posted December 28, 2022 Hi - I am now trying to work with this on an apache server running php 8 with a plesk control panel. But I am still having issues being unable to upload category images - the error log gives me the following: [error][yii\base\InvalidArgumentException] yii\base\InvalidArgumentException: common\models\CategoriesPlatformSettings has no relation named "imageMap". in /var/www/vhosts/mysite.co.uk/httpdocs/lib/vendor/yiisoft/yii2/db/BaseActiveRecord.php:1247 I have deleted OSC and reinstalled several times but still the same. Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
pandrei Posted December 29, 2022 Posted December 29, 2022 23 hours ago, Mort-lemur said: But I am still having issues being unable to upload category images - the error log gives me the following: [error][yii\base\InvalidArgumentException] yii\base\InvalidArgumentException: common\models\CategoriesPlatformSettings has no relation named "imageMap". in /var/www/vhosts/mysite.co.uk/httpdocs/lib/vendor/yiisoft/yii2/db/BaseActiveRecord.php:1247 I have deleted OSC and reinstalled several times but still the same. It's another error. Could you send me the logs? You can use Admin > Settings > Tools > Error Log Viewer > Download all logs for that. Quote
Mort-lemur Posted December 29, 2022 Author Posted December 29, 2022 @pandrei Thank you. First I am asking the hosting company if there is anything stopping any files being unpacked or run - as during the installation process on the server, the "unpacking files" page went on forever and I had to stop it (after around 3 hours) and manually unzip the files - so I have a feeling that some files may be missing. Will update when they get back to me - I have wiped the server and left it in a ready to install condition for them to look at. Many Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.