Support » Plugin: Export Import Menus » Error: Uploaded file is either Empty or not a valid JSON file.

  • Like some others I’m getting the error “Uploaded file is either Empty or not a valid JSON file.” when I try to import a file I’ve created on another site. Here are the contents of my json file:

    • This topic was modified 2 years, 5 months ago by Andrew Nevins. Reason: Removed large code snippet
Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter MeTP

    (@metp)

    WordPress Version: 5.1.1
    PHP Version: 7.3.4
    PHP Memory Limit: 256M
    MySQL Version: 5.6.36-82.1-log

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hi @metp ,

    Thanks for sharing an issue. I will look into it and get back to you. As far as i see your JSON code, there is only single difference of apostrophe i.e. (”) & (“).

    Thanks,
    Akshay Menariya

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hi @metp ,

    Can you please replace existing JSON file code with the below code, then import the file and let me know will you able to upload the Menus or not. I replace three double quotes (“, ”, ″) with this quote(“) in your given JSON code and it uploaded successfully for me. It would be great if you can let me know how you export the menus because when i am exporting the menus file it doesn’t including the above three special apostrophes (“, ”, ″) in my generated file but it’s including in your file.

    • This reply was modified 2 years, 5 months ago by Andrew Nevins. Reason: Removed large code snippet
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You guys need to use a code sharing service instead of posting large snippets directly on the forums. Use PasteBin for example.

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hello @anevins ,

    Sure, i will use same in future.

    Thanks,
    Akshay

    gerrysilva

    (@gerrysilva)

    Hi Akshay,
    First of all thank you for providing us this plug-in.
    I myself am experiencing an error after updating the plugin to v1.4.0.

    Menus are successfully exported but cannot be imported.
    Error Message “Uploaded file is either Empty or not a valid JSON file”.

    Copy of the file is in pastebin https://pastebin.com/BRCCxGsz

    Thanks again,
    Gerry

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hi @gerrysilva ,

    Thanks for your support. could you please check the extension of file is .json. As I have converted your given file into the JSON file and then imported into my local WP system and it has imported successfully. It created total 9 Menu items out of which 8 are pages and 1 is custom link (Change password). Please check with the screenshot – https://prnt.sc/oz10gg (FYI..In the screenshot your page Id’s are replaced with my local Page Id’s that’s why they are showing different page title).

    Screenshot URL – https://prnt.sc/oz10gg

    Do let us know if still you’re facing any issue.

    Thanks,
    Akshay Menariya

    Aggelos

    (@frederickcavender)

    Hello Akshay,
    Thank you for this plugin, it may help me a lot.
    I have the same problem, I can export but can’t import menus, here you can find the copy of the file: https://pastebin.com/GAvgrWqq
    Thanks.

    I also get the same “Uploaded file is either Empty or not a valid JSON file.” when trying to import. I’ve run the content on the JSON file through different JSON validators and they say the JSON is correct and valid. When I try to import, I can see for split second a green text that appears to indicate success, and then it changes to the red error text. Help is appreciated.

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hi @peteringersoll,

    Thanks for reporting an issue, Could you please provide me an exported JSON file that you’re trying to import, so that i can reproduce this issue. Also, please share other details that you wish to share that might be helpful to reproduce this issue like anything unique in your WP setup or any other info.

    Thanks,
    Akshay Menariya

    Plugin Author Akshay Menariya

    (@akshay-menariya)

    Hi @peteringersoll , @gerrysilva , @frederickcavender , @anevins

    Guys i tried to reproduce this issue but it couldn’t. Can you please update the plugin to the latest version and let me know if you’re still facing same issue, please share the more details like system config, OS, WP verison, other active plugins etc with me so that i can reproduce the issue.

    Thanks,
    Akshay Menariya

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Error: Uploaded file is either Empty or not a valid JSON file.’ is closed to new replies.