With the latest versions of ACF Pro, import jSON file is broken.
Each time we try to import the JSON file just exported, we receive the error message “No File to import”.
It was working 1 month ago.
How to fix this ?
thanks
It’s working fine for me. Something seems to be preventing you from uploading the file. Is it too big?
To do some debugging and see if your file is getting there, open the file
…/plugins/advanced-custom-fields-pro/includes/admin/class-acf-admin-tool/import.php
go to about line 95 and find the function submit. Add to the first line of this function (before the first if statement.
var_dump($_FILES); die;
try uploading the file and see what happens.
Bug happens when decoding json => returns null.
Please test my file
OK : the file exported by acf pro is in UTF-8 with BOM
encoding it manually in UTF-8 (without BOM) and it’s ok.
please solve it
did you make any changes to this file between the export and the import?
What version of PHP is running on each of the servers?
Nope, i did not make any change for the file between export and export.
But when i made the change to debug it with encoding UTF-8 without BOM, it’s OK.
So please take care when importing that’s the file is not UTF-8 with BOM.
PHP version is 7.1 or 7.2 for export, and import in the same version. Tested also for import with pHP version 5.6
Well, there isn’t really anything I can do, I’m not the developer.
Please submit a new support ticket here to get this to the developers https://support.advancedcustomfields.com/new-ticket/
Not really sure if they can do anything since ACF uses PHP’s json_enocode() an json_decode(). The reason that I asked what version of php you’re using is that I’ve seen other related problems because there are some incompatibilities with encoding and decoding in different php versions.
https://support.advancedcustomfields.com/new-ticket/
sorry, i was thinking you were an ACF developer.
Why submitting another ticket like this one ?
Thanks for giving me the elements to debug it, found a reason and a solution.
I’ve submitted a support ticket to fix this in next releases;
thanks a lot
it’s not another ticket like this one. This is a user support forum. Other users helping users. The link I gave you is to open a support ticket.
The topic ‘Import is KO : "no file to import"’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.