I still have this problem ACF Pro 5.9.3 and WP 5.5.3.
TypeError: e.wpColorPicker is not a function. (In ‘e.wpColorPicker(a)’, ‘e.wpColorPicker’ is undefined)
The problem seems to be sill there… what can we do to hold the database clean?
Is there ready coded acf/save_post that we can use?
Our Problem is that the not deleted post-meta data can be found in sql searches…
the filename you can change in the plugin, find this line and changed _acf_cropped:
// Generate new base filename
$targetFileName = implode('.', $originalFileName) . '_' . $targetW . 'x' . $targetH . apply_filters('acf-image-crop/filename_postfix', '_acf_cropped') . '.' . $originalFileExtension;
After my long research: dont’t do it. Will use an enhanced Import in the WP Mediathek.
Sorry, no I have no idea how the $args have to be…
Yes deactivated = hidden
here is the json:
[
{
"key": "group_58fdac3805d6e",
"title": "Standard Seite",
"fields": [
{
"key": "field_58fdacd119084",
"label": "Inhalt",
"name": "",
"type": "tab",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"placement": "top",
"endpoint": 0
},
{
"key": "field_58fdad1266b76",
"label": "Überschrift",
"name": "headline",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"maxlength": "",
"rows": 2,
"new_lines": "br"
},
{
"key": "field_58fdad59a6080",
"label": "Teasertext",
"name": "teasertext",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"maxlength": 200,
"rows": 4,
"new_lines": "br"
},
{
"key": "field_58fdac6456f92",
"label": "Teaser Bild",
"name": "teaser_image",
"type": "image_crop",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"crop_type": "hard",
"target_size": "custom",
"width": 800,
"height": 566,
"preview_size": "medium",
"force_crop": "yes",
"save_in_media_library": "yes",
"save_format": "object",
"library": "all",
"retina_mode": "no"
},
{
"key": "field_5900981454641",
"label": "Text Layout",
"name": "copy_layout",
"type": "radio",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"center": "zentriert",
"left": "linksbündig"
},
"allow_null": 0,
"other_choice": 0,
"save_other_choice": 0,
"default_value": "",
"layout": "horizontal",
"return_format": "value"
},
{
"key": "field_58fdac6e56f93",
"label": "Text",
"name": "copy",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 0,
"delay": 0
},
{
"key": "field_58fdacb74ea04",
"label": "Flexible Inhalte",
"name": "flexible_content_page_clone",
"type": "clone",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"clone": [
"field_58e26f566db37"
],
"display": "seamless",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0
},
{
"key": "field_5900a215b7182",
"label": "Links & Verwandte Inhalte",
"name": "",
"type": "tab",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"placement": "top",
"endpoint": 0
},
{
"key": "field_5900a1d1cca47",
"label": "Links",
"name": "related_links_clone",
"type": "clone",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"clone": [
"group_58f9cbb37d94d"
],
"display": "seamless",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0
},
{
"key": "field_593a7f9f6a653",
"label": "",
"name": "",
"type": "message",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "100",
"class": "acf-separator",
"id": ""
},
"message": "",
"new_lines": "wpautop",
"esc_html": 0
},
{
"key": "field_5900a45388b68",
"label": "Verwandte Inhalte",
"name": "relationships_clone",
"type": "clone",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"clone": [
"group_58f9f302af202"
],
"display": "seamless",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0
},
{
"key": "field_593a7fbf586d1",
"label": "",
"name": "",
"type": "message",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "100",
"class": "acf-separator",
"id": ""
},
"message": "",
"new_lines": "wpautop",
"esc_html": 0
},
{
"key": "field_58fdacbb4ea05",
"label": "Slider",
"name": "",
"type": "tab",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"placement": "top",
"endpoint": 0
},
{
"key": "field_58fdacbd4ea06",
"label": "Slider",
"name": "slider_clone",
"type": "clone",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"clone": [
"field_58f87ffd86644",
"field_58f8825ba35f4",
"field_58f8bb5b31957",
"field_58f8bc9b31958"
],
"display": "seamless",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0
}
],
"location": [
[
{
"param": "page_template",
"operator": "==",
"value": "page.php"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": [
"excerpt",
"custom_fields",
"discussion",
"comments",
"categories",
"tags",
"send-trackbacks"
],
"active": 1,
"description": ""
}
]
The support can’t help and want’ that I ask here…
…and it is NOT SOLVED this was a wrong click, how can I remove this from the thread?
I think figured out, with a lot oft testing, where it came form.
It is defiantly ACF Pro (no other Plugin, not from the templates, wp-config, functions.php)
On the most templates the wp default content-editor is deactivated and hidden by ACF.
Page-templates has the problem with revisions without the editor. When I activate the editor and add some content the revisions work normally.
CPT post don’t have this problem…
Is the any way to fix this problem?
Perfect, thanx!
this is mit current “final” function:
// function to get the conntent of all custom fileds fron array to one string ---------------------------------------------------------------------------------------
function get_fields_content($include_fields, $fields) {
// loop the fields and add all content to one string
if( $fields ) {
foreach( $fields as $field_name => $field ):
$fieldname = $field['name']; // get the cutom field name for the filter
$fieldvalue = $field['value']; // get the content of the field
// filter by cutomfield from array and if value has content
if ((in_array($fieldname, $include_fields) && ($fieldvalue))) {
// add too $content a spache and a line break behind each field and add the html-stripped content from the next field
if ( !is_array($fieldvalue)) {
$content .= strip_tags($fieldvalue) . ' ';
} else {
// for the subfields if acf flexible content layouts ----------------------------
// https://support.advancedcustomfields.com/forums/topic/get-all-texts-form-flexible-contents-and-nested-repeater/
foreach( $fieldvalue as $row ){
foreach( $row as $k => $column){
if( $k !== 'acf_fc_layout' && !is_array($column) && !is_object($column) ){
// get the current field name
$current_field_name = str_replace($row['acf_fc_layout'].'_', '', $k);
// check if in array
if( in_array($current_field_name, $include_fields) ){
$content .= strip_tags($column) . ' ';
}
}
}
}
// end subfields ----------------------
}
}
endforeach;
}
return $content;
}
// -------------------------------------------------------------------------
and to get the fields and call the function:
$fields = get_field_objects();
$include_fields_content = array('acf_field_1' , 'acf_field_2' , 'acf_field_3);
$content = get_fields_content($include_fields_content, $fields);
Thanks!
But it is actually not perfect, because this includes all sub-content-fields content an not only from field in the include_fields array…
how can I add an
in_array($fieldname, $include_fields)
in your code?
Thanks John,
I think the pre_get_posts is the solution for me,
but I have actually not that experience in writing mm own search.php templates.
Have you or anyone else some more well explained ACF specific examples?
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.