Comments (9)
Same here. The only field imported appears as #2 in the sort order, and any new field you create takes the #1, since the javascript in the browser didn't get any field #1.
Trying it on newer versions of ACF don't even import a thing.
What version of ACF was this created for?
from acf-php-recovery.
This was created for ACF 3. I haven't tested with ACF 4 yet, I'll try to figure it out next week.
from acf-php-recovery.
This little patch fixes fields import for ACF 4. It still doesn't properly import locations or options, but it's a start.
diff --git wp-content/plugins/ACF-PHP-Recovery-master/acf-php-recovery.php wp-content/plugins/ACF-PHP-Recovery-master/acf-php-recovery.php
index 6a594157d7a761bf9ee2e853050be82411efc6e9..3e80032431e96aed9130798b9c9793e5ac312f97 100644
--- wp-content/plugins/ACF-PHP-Recovery-master/acf-php-recovery.php
+++ wp-content/plugins/ACF-PHP-Recovery-master/acf-php-recovery.php
@@ -43,7 +43,13 @@ function acf_php_recovery_page() {
}
// Fields
+ $order_no = 0;
foreach($fieldset['fields'] as $field) {
+ if(isset($field['order_no'])) :
+ $order_no = max($order_no,$field['order_no']);
+ else:
+ $field['order_no'] = $order_no++;
+ endif;
add_post_meta( $post_id, $field['key'], $field, true);
}
from acf-php-recovery.
@dmh-kevin, just FYI, I'm not getting any change of behavior with the patch.
from acf-php-recovery.
Before the patch, I was getting the same issue you described. My php field definitions were old, so perhaps an old ACF export didn't provide all of the fields that newer exports have. I'll test more. I only tested against the content on a project where I really did loose the xml dump and database definitions and was able to retrieve all of my fields.
from acf-php-recovery.
Please update to work with version 4
from acf-php-recovery.
@alekstrust for ACF4 you could use my little script: https://github.com/iamntz/acf-recovery
Although it doesn't have any option as ACF Recovery does, it will restore all of your fileds ;)
Enjoy!
from acf-php-recovery.
Thanks to iamntz and dmh-kevin. It is now updated. There is an issue when attempting to edit a recovered fieldset while the PHP defined version is still active.
from acf-php-recovery.
You guys rock.
from acf-php-recovery.
Related Issues (13)
- Cannot save data using recovered fields HOT 5
- Bug dans la requête SQL HOT 2
- Include the PHP for the ACF fieldsets generated from the PHP export. HOT 5
- Fields disappear from front-end after "recovering" HOT 1
- Not working with ACF 5.7.12 onwards – "acf_local" function removed HOT 6
- Location HOT 1
- Location rules aren't imported HOT 2
- Conditional logic HOT 8
- Insufficient permissions error HOT 1
- File location HOT 1
- Thanks! How can I donate? HOT 3
- Unable to find options page HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-php-recovery.