Your plugin appears to have a bug in it for many web hosts, which I tracked down and fixed.
Line 151 of DspExportImportModel.php has this line of code that uses the URL instead of the local filepath:
$uploadedfile = ! empty( $movefile['url'] ) ? $movefile['url'] : $requested_vars["fileurl"];
Later on at
line 170you attempt to open that URL with
file_get_contents(), which may have worked on the system where you wrote it [but will not work in a lot of hosted environments.](https://www.google.com/search?q=php+file_get_contents+not+working). It does not work at WPEngine nor does it work in our local WPLib Box local development solution.
By changing your code to use the local filepath I was able to get your plugin to import menus:
$uploadedfile = ! empty( $movefile['file'] ) ? $movefile['file'] : $requested_vars[ 'fileurl' ];
Any chance you could update your plugin to use this fix so I could use your official plugin and not have to use a forked version?
Thanks in advance.
- This topic was modified 4 years ago by . Reason: Fixed code formatting
- This topic was modified 4 years ago by . Reason: Removed <pre> tag from code
- This topic was modified 4 years ago by . Reason: Fixed the fix code
The page I need help with: [log in to see the link]
- The topic ‘Bug in your plugin; using URL instead of FILE’ is closed to new replies.