Skip to content

main.CRITICAL: DomainException: $_FILES array is empty in /srv/public_html/vendor/magento/framework/File/Uploader.php:687

Getting this error consistently in system.log – on Magento 2.4.5-p1…

[2023-02-22T19:34:48.304327+00:00] main.CRITICAL: DomainException: $_FILES array is empty in /srv/public_html/vendor/magento/framework/File/Uploader.php:687
Stack trace:
#0 /srv/public_html/vendor/magento/framework/File/Uploader.php(230): MagentoFrameworkFileUploader->_setUploadFileId(‘product[product…’)
#1 /srv/public_html/vendor/magento/module-media-storage/Model/File/Uploader.php(67): MagentoFrameworkFileUploader->__construct(‘product[product…’)
#2 /srv/public_html/generated/code/Magento/MediaStorage/Model/File/Uploader/Interceptor.php(14): MagentoMediaStorageModelFileUploader->__construct(‘product[product…’, Object(MagentoMediaStorageHelperFileStorageDatabase), Object(MagentoMediaStorageHelperFileStorage), Object(MagentoMediaStorageModelFileValidatorNotProtectedExtension))
#3 /srv/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): MagentoMediaStorageModelFileUploaderInterceptor->__construct(‘product[product…’, Object(MagentoMediaStorageHelperFileStorageDatabase), Object(MagentoMediaStorageHelperFileStorage), Object(MagentoMediaStorageModelFileValidatorNotProtectedExtension))
#4 /srv/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): MagentoFrameworkObjectManagerFactoryAbstractFactory->createObject(‘MagentoMediaSt…’, Array)
#5 /srv/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): MagentoFrameworkObjectManagerFactoryCompiled->create(‘MagentoMediaSt…’, Array)
#6 /srv/public_html/generated/code/Magento/MediaStorage/Model/File/UploaderFactory.php(43): MagentoFrameworkObjectManagerObjectManager->create(‘MagentoMediaS…’, Array)
#7 /srv/public_html/vendor/sparsh/magento-2-product-label-extension/Model/Product/Attribute/Backend/File.php(93): MagentoMediaStorageModelFileUploaderFactory->create(Array)
#8 /srv/public_html/generated/code/Sparsh/ProductLabel/Model/Product/Attribute/Backend/File/Interceptor.php(23): SparshProductLabelModelProductAttributeBackendFile->afterSave(Object(MagentoCatalogModelProductInterceptor))
#9 [internal function]: SparshProductLabelModelProductAttributeBackendFileInterceptor->afterSave(Object(MagentoCatalogModelProductInterceptor))
#10 /srv/public_html/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(682): call_user_func_array(Array, Array)
#11 /srv/public_html/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(1848): MagentoEavModelEntityAbstractEntity->walkAttributes(‘backend/afterSa…’, Array)
#12 /srv/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product.php(327): MagentoEavModelEntityAbstractEntity->_afterSave(Object(MagentoCatalogModelProductInterceptor))
#13 /srv/public_html/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(1966): MagentoCatalogModelResourceModelProduct->_afterSave(Object(MagentoCatalogModelProductInterceptor))
#14 /srv/public_html/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(33): MagentoEavModelEntityAbstractEntity->afterSave(Object(MagentoCatalogModelProductInterceptor))
#15 /srv/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): MagentoFrameworkEntityManagerObserverAfterEntitySave->execute(Object(MagentoFrameworkEventObserver))
#16 /srv/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoFrameworkEntityManagerObserverAfterEntitySave), Object(MagentoFrameworkEventObserver))
#17 /srv/public_html/vendor/magento/framework/Event/Manager.php(65): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
#18 /srv/public_html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch(‘magento_catalog…’, Array)
#19 /srv/public_html/vendor/magento/framework/EntityManager/EventManager.php(50): MagentoFrameworkEventManagerProxy->dispatch(‘magento_catalog…’, Array)
#20 /srv/public_html/vendor/magento/framework/EntityManager/Operation/Update.php(110): MagentoFrameworkEntityManagerEventManager->dispatchEntityEvent(‘MagentoCatalog…’, ‘save_after’, Array)
#21 /srv/public_html/vendor/magento/framework/EntityManager/EntityManager.php(106): MagentoFrameworkEntityManagerOperationUpdate->execute(Object(MagentoCatalogModelProductInterceptor), Array)
#22 /srv/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product.php(777): MagentoFrameworkEntityManagerEntityManager->save(Object(MagentoCatalogModelProductInterceptor))
#23 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(58): MagentoCatalogModelResourceModelProduct->save(Object(MagentoCatalogModelProductInterceptor))
#24 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogModelResourceModelProductInterceptor->___callParent(‘save’, Array)
#25 /srv/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(58): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#26 /srv/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(28): MagentoCatalogSearchModelIndexerFulltextPluginProduct->addCommitCallback(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#27 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(135): MagentoCatalogSearchModelIndexerFulltextPluginProduct->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#28 /srv/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(58): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#29 /srv/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(28): MagentoCatalogSearchModelIndexerFulltextPluginProduct->addCommitCallback(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#30 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(135): MagentoCatalogSearchModelIndexerFulltextPluginProduct->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#31 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#32 /srv/public_html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(32): MagentoCatalogModelResourceModelProductInterceptor->___callPlugins(‘save’, Array, Array)
#33 /srv/public_html/vendor/magento/module-catalog/Model/ProductRepository.php(886): MagentoCatalogModelResourceModelProductInterceptor->save(Object(MagentoCatalogModelProductInterceptor))
#34 /srv/public_html/vendor/magento/module-catalog/Model/ProductRepository.php(634): MagentoCatalogModelProductRepository->saveProduct(Object(MagentoCatalogModelProductInterceptor))
#35 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(58): MagentoCatalogModelProductRepository->save(Object(MagentoCatalogModelProductInterceptor))
#36 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogModelProductRepositoryInterceptor->___callParent(‘save’, Array)
#37 /srv/public_html/vendor/prince/module-productattachment/Plugin/ProductAttachment.php(147): MagentoCatalogModelProductRepositoryInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#38 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(135): MageprinceProductattachPluginProductAttachment->aroundSave(Object(MagentoCatalogModelProductRepositoryInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor), false)
#39 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelProductRepositoryInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#40 /srv/public_html/generated/code/Magento/Catalog/Model/ProductRepository/Interceptor.php(32): MagentoCatalogModelProductRepositoryInterceptor->___callPlugins(‘save’, Array, Array)
#41 /srv/public_html/vendor/magento/module-catalog/Model/ProductWebsiteLinkRepository.php(40): MagentoCatalogModelProductRepositoryInterceptor->save(Object(MagentoCatalogModelProductInterceptor))
#42 [internal function]: MagentoCatalogModelProductWebsiteLinkRepository->save(Object(MagentoCatalogModelProductWebsiteLink))
#43 /srv/public_html/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#44 /srv/public_html/vendor/magento/module-webapi/Controller/Rest.php(195): MagentoWebapiControllerRestSynchronousRequestProcessor->process(Object(MagentoFrameworkWebapiRestRequestProxy))
#45 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(58): MagentoWebapiControllerRest->dispatch(Object(MagentoFrameworkAppRequestHttp))
#46 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(138): MagentoWebapiControllerRestInterceptor->___callParent(‘dispatch’, Array)
#47 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(153): MagentoWebapiControllerRestInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
#48 /srv/public_html/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): MagentoWebapiControllerRestInterceptor->___callPlugins(‘dispatch’, Array, Array)
#49 /srv/public_html/vendor/magento/framework/App/Http.php(116): MagentoWebapiControllerRestInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#50 /srv/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): MagentoFrameworkAppHttp->launch()
#51 /srv/public_html/vendor/magento/framework/App/Bootstrap.php(264): MagentoFrameworkAppHttpInterceptor->launch()
#52 /srv/public_html/pub/index.php(30): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#53 {main} [] []

Any ideas how to fix?