Comments (11)
Hi @rafegoldberg
I think it's the same issue that #8 which I can't resolve for now.
from mc-acf-flexible-template.
Hi @julesrenaud, do you think you can make a pull request for this fix ?
from mc-acf-flexible-template.
@MarieComet certainly, will do. Would you mind if I were to also do a second one which makes it optional to register the acf_template_tax
taxonomy? It can be confusing for the user to see "Uncategorized" in the UI.
from mc-acf-flexible-template.
@PseudoPsychosis I believe so. I think the solution I'm working on will fix both issues. I will post a PR soon.
from mc-acf-flexible-template.
I gotchya. In any case, let me say again that this is an awesome plugin! It addresses a sorely missed functionality in ACF's core. Very cool.
from mc-acf-flexible-template.
Adding the following code block after line 351 in mc-acf-flexible-template.php
fixes the issue for flexible fields that are inside a clone field. It doesn't fix #8, but it could also be fixed easily in similar fashion.
if ( ! $fields && ! empty( $_POST['acf'] ) && is_array( $_POST['acf'] ) ) {
foreach ( $_POST['acf'] as $field ) {
if ( ! is_array( $field ) )
continue;
foreach ( $field as $key => $value ) {
$length = strlen( $parent_key );
if ( substr( $key, -$length ) === $parent_key ) {
$fields = $value;
}
}
}
}
from mc-acf-flexible-template.
Adding the following code block after line 351 in
mc-acf-flexible-template.php
fixes the issue for flexible fields that are inside a clone field. It doesn't fix #8, but it could also be fixed easily in similar fashion.if ( ! $fields && ! empty( $_POST['acf'] ) && is_array( $_POST['acf'] ) ) { foreach ( $_POST['acf'] as $field ) { if ( ! is_array( $field ) ) continue; foreach ( $field as $key => $value ) { $length = strlen( $parent_key ); if ( substr( $key, -$length ) === $parent_key ) { $fields = $value; } } } }
You mention possibly being able to use this as a fix for #8, which has been something that I have been struggling with for some time. Can you create a PR to fix #8 too?
Thanks @julesrenaud!
from mc-acf-flexible-template.
@PseudoPsychosis I believe so. I think the solution I'm working on will fix both issues. I will post a PR soon.
You rock. Thank you!
from mc-acf-flexible-template.
Any update on a fix? desperately want to be able to use this plugin
from mc-acf-flexible-template.
It's been a few years but it seems that there was a PR for this that was never merged here #14
from mc-acf-flexible-template.
@CalebBarnes PR #14 is not related to this issue ("Make acf template tax optional") : 1d09c88
from mc-acf-flexible-template.
Related Issues (15)
- Awesome plugin !
- [Feature Request] Replace existing content HOT 5
- Plugin Breaks When Updating ACF To Version 5.7.11 HOT 10
- Is this plugin is dead? HOT 3
- inter-site import/export a.k.a. site-independant serialization HOT 2
- Incorrect use of acf.do_action( 'validation_begin' ) HOT 1
- Import/Display Template via PHP HOT 1
- Fails with ACF 5.10 HOT 2
- Respect WordPress coding standards HOT 3
- Template Names HOT 2
- Some kind of problem with option page dedicated to archive CPT page HOT 1
- Your Plugin has a lot of potential, great work!!! HOT 6
- Flexible Content within Flexible Content HOT 9
- Upgrading to ACF Pro 5.7.0 Creates Javascript Error In Admin HOT 3
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 mc-acf-flexible-template.