Home Forums Bug Reports Undefined Variable 'value' in api.php Reply To: Undefined Variable 'value' in api.php

  • Hi Elliot

    Here’s the process I went through:

    1. Added a new field with a select drop down (with 1,2,3 as the options). Stuck “1” in the default field, saved and then added a field of this type to the homepage. At this point I saw the error (debug mode true) for the first time. Images were still there. I commented out my code pulling in the new field and the error (as outlined by the original poster) disappeared. Figured there was an issue with using “1” as the default number. Deleted the select drop down sub field and created a radio one instead, with no default declared. Refreshed the post editor, chose the radio button options that were needed and saved. Error was there again on front end.

    2. Googled the error, found this thread. Downloaded the latest version of ACF and uploaded through the plugins uploader in WP admin. Error on upload as plugin already exists. Go to FTP, rename old ACF folder and upload unzipped new files. Go to homepage, errors gone, all images gone. Rename new ACF folder, go to plugins, Add new, find ACF, install… No change.

    3. Go to page editor, half the fields are missing from the list, no fields with image field available from flexible field add panel. Go to ACF editor and my flexible field, all fields with image includes gone. Do not, at any point press save/submit, so am sure the data is still there – especially as the homepage is still showing the empty space where the fields were before this happened. Go back to this thread, find original code (that the update fixed) edit api.php file to display old code, refresh homepage, errors back, images still broken. Undo api.php change.

    To answer your questions:

    If I go to create a new flexible field it will not let me create ANY sub fields. If I go to edit my existing flexible content field I cannot add any new fields. The duplicate, etc. links on the left are gone too. In the post editor, all flexible content fields that have an image field are gone.

    I can’t check the db right now as need to get access, but the fact the boxes still appear in the page (and the text data shows for those entries, just not the images) would suggest to me that the data is still in the db.

    I hope that helps. It’s 1am so I’m. Going to sleep, back online in 7/8 hours. You’re welcome to login to my site if you want. Just send me an email.