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 ?
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
go to about line 95 and find the function submit. Add to the first line of this function (before the first if statement.
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.
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.
You must be logged in to reply to this topic.
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.