App: Magento 2.3.7-p2
When executing MagentoCmsControllerAdminhtmlWysiwygImagesUpload::execute
$this->getStorage()->getSession()->getCurrentPath()= ''
although in the previous call
MagentoCmsControllerAdminhtmlWysiwygImagesContents::execute
the current Path was successfully saved via $this->_initAction()->_saveSessionCurrentPath()
.
I do not understand why $this->getStorage()->getSession()->getCurrentPath() = ''
.
3
Answers
For security purposes, Magento provides Media Gallery access to contents in specific folders. The configuration path system/media_storage_configuration/media_storage/allowed_resource/media_gallery_image_folders in config.xml is used to define “Media Gallery Allowed” folders
By default, Magento allows Media Gallery access to the following two directories under /pub/media:
catalog/category
wysiwyg
app/code/VendoreName/ModuleName/etc
config.xml
I Hope This Helps You.
Try your luck after increasing the maximum session size limit for admin. Store configuration is at path
I debugged the same problem and ended up finding out that there are some important values to get in to admin session, which unfortunately isn’t happening due to this size limit.
For temporary fix you can just return true, it will solve all your issues.