I actually managed to do it for both different post types and different page templates. You can see my solution, if you’re interested: https://github.com/devgeniem/acf-codifier/blob/master/src/Field/FlexibleContent.php#L286.
Thank you for the help!
WPML’s filters for posts_where mess up the acf_get_field_id’s get_posts query somehow so that it can’t get the ID of some fields and then their values won’t save from the front-end form. When I alter the args on the query (change acf_field_key -> name and suppress_filters -> true) it works fine.
My fork of the aforementioned plugin is in: https://github.com/devgeniem/acf-reusable-field-group/
It features the fixes mentioned before but also makes the included field groups to obey their location rules and also adds a new location rule: “show only if this group is included to another”.
Hi,
it’s happening on a local development environment, so it’s not possible to give credentials. If it matters, there are WooCommerce and WPML installed too. The error has happened on two developers’ machines (though pretty much identical Vagrant environments with one another).
If you can come up with any more information about the settings or so, just ask and I’ll provide them.