I created a customized import module from two customized fashions and tables. The imports works tremendous, and with none error or downside now. However I seen that subsequent to Entity Kind dropdown, seems a “Dowload Pattern File”.
And, once I click on in that (when is chosen my customized entity kind), the web page present me a “There is no such thing as a pattern file for this entity.” error.
So, after examine the file vendor/magento/module-import-export/Controller/Adminhtml/Import/Obtain.php it is seem like Magento is looking the pattern file within the listing:
So, the “fast” approach of correcting this downside, I suppose, is so as to add the information of my modules in that listing. Nevertheless, my query is: is that this “proper”? My logic tells me that it is not good to the touch ANYTHING that is within the vendor folder. However then, what’s the different various that would apply?, since plainly with these strains:
fileName = $this->getRequest()->getParam('filename') . '.csv'; $moduleDir = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, self::SAMPLE_FILES_MODULE); $fileAbsolutePath = $moduleDir . '/Information/Pattern/' . $fileName; $directoryRead = $this->readFactory->create($moduleDir); $filePath = $directoryRead->getRelativePath($fileAbsolutePath);
Power to look immediately in that listing.