Support » Plugin: Export Import Menus » Bug in your plugin; using URL instead of FILE

  • 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 170 you 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.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Akshay Menariya

    (@akshay-menariya)

    Thank You Mike Schinkel for letting me know the issues. I will fix that issue and launch the updated version of the plugin ASAP.

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hi Mike,

    We have fixed the issues that you pointed out and also published the updated version on the WordPress. You can now download the latest version 1.0.1 of the plugin.

    Thanks,
    Akshay Menariya

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug in your plugin; using URL instead of FILE’ is closed to new replies.