Support

Account

Home Forums Search Search Results for 'Wysiwyg'

Search Results for 'Wysiwyg'

reply

  • I looked in the source code, and there isn’t a filter based on ‘key’ or ‘fieldname’ for the acf/fields/wysiwyg/toolbars filter.

    And truthfully, I couldn’t get it to work by itself. I will dig deeper.

  • I have a similar problem. On the first save, it pushes the values down a row for text fields and textarea fields. I presume this is a similar issue if not the same issue as WYSIWYG editors are fine (and don’t have WPGlobus enabled)

    I’m running ACF Pro 5.6.2

  • Same issue here. I have multiple WYSIWYG editors on a custom post type. The first visual editor loads fine, however, the remaining editors do not load. Instead, Chrome console gives me the following error:

    Uncaught TypeError: Cannot read property 'onpageload' of undefined
        at h (tinymce.min.js?ver=4603-20170530:14)
        at m (tinymce.min.js?ver=4603-20170530:14)
        at h.l.bind (tinymce.min.js?ver=4603-20170530:2)
        at o.bind (tinymce.min.js?ver=4603-20170530:4)
        at Object.init (tinymce.min.js?ver=4603-20170530:14)
        at e (editor.min.js?ver=65c0a7335dc6663744f226e2b48b91ca:1)
        at HTMLDocument.<anonymous> (editor.min.js?ver=65c0a7335dc6663744f226e2b48b91ca:1)
        at a (tinymce.min.js?ver=4603-20170530:2)
        at HTMLDocument.p (tinymce.min.js?ver=4603-20170530:2)

    I have tried deactivating all plugins. Will try downgrading my version of ACF.

  • I was also using a variation of the plugin in order to customise style within wysiwyg but the last update broke the functionality.

    It now does not give the correct field name to the class (acf-field-name-undefined).

    Let me know if someone has a working solution.

    Thanks.

  • Sorry, my fault. The issue was in an Function I use to add CSS class on WYSIWYG iframe wrappers.

    I’ve compared the versions of acf-input.js and “mceInit.elements” was removed from the latest version of ACF PRO. That broke my code.

    I fixed it by using “mceInit.id” instead of “mceInit.elements”.

  • Same here. I have multiple WYSIWYG and the bug started after update to Version 5.6.2. It’s a JavaScript bug.

    Uncaught TypeError: Cannot read property ‘split’ of undefined
    at post.php?post=1778&action=edit&lang=pt-br:2658
    at d (acf-input.min.js:1)
    at Object.s (acf-input.min.js:1)
    at Object.apply_filters (acf-input.min.js:1)
    at Object.initialize_tinymce (acf-input.min.js:3)
    at Object.initialize (acf-input.min.js:3)
    at Object.initialize (acf-input.min.js:3)
    at acf-input.min.js:1
    at d (acf-input.min.js:1)
    at Object.i (acf-input.min.js:1)

    post.php?post=1778&action=edit&lang=pt-br:2658

    null

  • I am not seeing this issue on a test site. You could be having a problem with a chached script, try clearing our borwser cache. If not that then it’s likely a conflict with another plugin. You’ll need to deactivate other plugins to see if you can figure out where that conflict is.

    Could be related: https://support.advancedcustomfields.com/forums/topic/wysiwyg-editors-broken-with-repeater/

  • I am not seeing this issue on a test site. You could be having a problem with a chached script, try clearing our borwser cache. If not that then it’s likely a conflict with another plugin. You’ll need to deactivate other plugins to see if you can figure out where that conflict is.

    Could be related: https://support.advancedcustomfields.com/forums/topic/multiple-wysiwyg-broken-with-last-update/

  • I can now confirm this came up with latest updates. Multiple wysiwyg editors are not working…

  • I have just found a similar problem in this forum discussion.
    The solution given by James @acf-support is the same as the one given by @keithlock.
    Interestingly, re my point #5 above is silverdarling’s remark:

    Good thing is that wysiwyg.php looks like its primed to go for adding wysiwyg height via admin interface.

    This is similar to gallery_height being “primed” for setting, but again WHY is this not working?

  • sorry found the right documentation.

    This should fix my problem

    https://www.advancedcustomfields.com/resources/customize-the-wysiwyg-toolbars/

  • Thank you John.

    One thing I’ve noticed is that the following embedded php code in relationship.php doesn’t seem to execute/parse:

    $this->l10n = array(
     'max'     => __("Maximum values reached ( {max} values )",'acf'),
     'tmpl_li' => '
                   <li>
                     <a href="#" data-post_id="<%= post_id %>"><%= title %><span class="acf-button-remove"></span></a>
                   <input type="hidden" name="<%= name %>[]" value="<%= post_id %>" />
                  </li>
                 '
    );

    The result when run and viewed (via the chrome console) the result is the following, which still has the literal variables, not the values I would expect:

    	// new vars
    	acf.o = {"post_id":425,"nonce":"25e1faa643","admin_url":"http:\/\/stage.media.foodlandontario.ca\/wp-admin\/","ajaxurl":"http:\/\/stage.media.foodlandontario.ca\/wp-admin\/admin-ajax.php","wp_version":"4.8.1"};
    	acf.l10n = {"core":{"expand_details":"Expand Details","collapse_details":"Collapse Details"},"validation":{"error":"Validation Failed. One or more fields below are required."},"image":{"select":"Select Image","edit":"Edit Image","update":"Update Image","uploadedTo":"uploaded to this post"},"file":{"select":"Select File","edit":"Edit File","update":"Update File","uploadedTo":"uploaded to this post"},"relationship":{"max":"Maximum values reached ( {max} values )","tmpl_li":"\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href=\"#\" data-post_id=\"<%= post_id %>\"><%= title %><span class=\"acf-button-remove\"><\/span><\/a>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"<%= name %>[]\" value=\"<%= post_id %>\" \/>\n\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t"},"google_map":{"locating":"Locating","browser_support":"Sorry, this browser does not support geolocation"},"date_picker":{"closeText":"Done","currentText":"Today","monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"monthStatus":"Show a different month","dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"isRTL":false}};
    	acf.fields.wysiwyg.toolbars = {"full":{"theme_advanced_buttons1":"bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,fullscreen,wp_adv","theme_advanced_buttons2":"formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,code","theme_advanced_buttons3":"","theme_advanced_buttons4":""},"basic":{"theme_advanced_buttons1":"bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,link,unlink,fullscreen"}};

    Thoughts?

  • The timeouts actually have to do with the browser. >30 seconds and browsers will generally show a timeout message. This can be an issue with ACF when there are a lot of fields to be saved without adding any overhead for adding the content to post_content. This is purely a case of the number of queries involved because WP only updates one meta value at a time and each update can take 2 to 4 db queries to complete. The first time I saw this issue was on a site where each layout had up to 7 wysiwyg fields. This site would time out just saving ACF data (without the extra processing) at around 10 to 15 layouts (as many as 135 wysiwyg editors), depending on how much content was being saved.

    Just a note that the timeout in this case will not cause the data to not be saved. Since there is no communication with the browser until php completes all the saving it completes before it knows that the browser has disconnected. When this happens you simply need to go back to the admin page and reload it to see all the changes. I supposed, it really extreme cases PHP could also timeout, depending on what your max execution time is, and that could cause an issue with the data actually being saved.

  • That is pretty much the way I was doing this for sites I’ve built, but I had an issue with saving timing out when the number of layouts and wysiwyg fields grew too large on complex site that I built recently. If you’re content is limited then your solution is probably the best in most cases.

  • Hi John,
    thank you very much for the clear and huge explanation.

    At the moment the important task is to solve the question of putting the flexible content into the post_content.

    Actually I’m using the following solution that works very well for me. This solution is designed only for my pourposes but could be customized for other possible scenarios.

    function flexible_content_to_post_content( $post_id ) {
    
    	$post_type = 'books';
    
    	//Check if we are saving a books post type
    	if( get_post_type( $post_id ) != $post_type)
    		return;
    
    	//Check it's not an auto save routine
    	if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) 
    		return;
    
    	//The Post Content
    	$post_content = '';
    	
    	//Loop the flexible content rows
    	if( have_rows('flexible_content') ):
    		while ( have_rows('flexible_content') ) : the_row();
    		
    			//TEXT BLOCK
    			if( get_row_layout() == 'text_block' ):
    				
    				$post_content .= get_sub_field('wysiwyg');
    	
    			endif;
    				
    		endwhile;
    	endif;
    	
    	
        //If calling wp_update_post, unhook this function so it doesn't loop infinitely
        remove_action('save_post', 'flexible_content_to_post_content');
    
    	// call wp_update_post update, which calls save_post again. E.g:
        wp_update_post(array('ID' => $post_id, 'post_content' => $post_content));
    
        // re-hook this function
        add_action('save_post', 'flexible_content_to_post_content');
    	
    }
    add_action('save_post', 'flexible_content_to_post_content');

    Thanks for sharing your plugin. At the moment the solution I’ve reported above is enough easy to use for me. I don’t need to check for all acf fields within the post. I need only to check text fields (textinput, textarea, wysiwyg) inside the flexible content.

    Of course I need to do some testing for large flexible fields, but considering my personal context, this should not be a problem.

    Thank you very much.

  • I am having the same issue with ACF 4.4.11 and IE 11. WYSIWYG editor’s toolbar buttons are not showing. The text inside the editor field is white and therefore appears blank.
    Looks like TinyMCE jsut doesn’t load. There is no JS errors on the page. I tried everything that CrisCreixell mentioned. I have also tried to deactivate all the plugins and switch to a default theme. No luck. The problem started after updating WordPress Core from 4.7.2 to 4.8 (4.8.1 – same story). Everything works fine in Chrome

    Please advice.

    Thank you

  • Indeed it is.

    In field group editor many fields, including field name, now appear to be translatable.

    Qtranslate WYSIWYG/Image/file fields are removed from field type dropdown and don’t appear anymore on pages/posts.

  • Even if this could be done in some way so that it would work with ACF image fields, there still would not be any way to prevent images being “removed in an over-enthusiastic cleanup.” WP uses the post_parent in the _posts table to mark an image uploaded to a post. WP has no built in mechanism for uploading or adding attachments to any other type of object. This is something that’s not likely to change, I doubt that you’ll ever see a built in WYSIWYG on a term or anywhere else in WP for that matter. Also, the post_parent field requires an integer that is assumed to be another post ID, so anything created would be a work-a-round that would be outside of anything that WP would recognize.

    There is one solution that I just thought of. There is the ability for ACF to save field values of options pages as related to a “post” (see the ‘post_id’ argument https://www.advancedcustomfields.com/resources/acf_add_options_page/) and I think that this will make it work the same, I just tested this and I know it works. The thing here is that you need posts, of some type, to store the values on and this means creating some type of post type for holding the options fields. My plugin that lets you create options pages using an admin interface will also let you save fields to the post of the options page settings… https://wordpress.org/plugins/options-page-admin-for-acf/

  • No solution from me… but wanted to weigh in – and say that I also find that I need a WYSIWYG field for a sentence or two / and the size of it makes the admin seem murky.

    +1 for some ‘field grows to fill content’ option

  • The content field on the front end uses an ACF WYSIWYG field and not the standard WP field.

    You might be about to alter the default value using an acf/prepare_field function… but this is only a guess and not tested, so I don’t know all of the details. https://www.advancedcustomfields.com/resources/acf-prepare_field/

    
    add_filter('acf/prepare_field/name=_post_content', 'set_acf_form_default_content');
    
  • It looks like you may have a conflict issue. wysiwyg field delayed init does not effect the standard WP editor and setting delayed init on one fields does not effect other wysiwyg fields.

    deactivate other plugin and maybe switch themes to see if you can figure out where the conflict is.

  • Do you have a lot of WYSIWYG fields on the page? If so, enabling the Delay initialization? option for those fields may help reduce the JavaScript overhead on the page.

  • If the filter for the encoder works on the content and you are using this in a wysiwyg editor, you could also use add_filter('acf_the_content', 'eae_encode_emails');

  • 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": ""
        }
    ]
    
  • get_field('my_field', false, false)
    isn’t working for me. It isn’t outputting the weird <p> tags problem but it’s not outputting anything either. Not sure why. Oh well, I found a work around. I just wish for the future it was clearer how to wrap a WYSIWYG output with a div and class instead of getting this weird <p> tag error. This issue goes a long ways back in the forum, I can tell, but everyone just gets around it by stripping the tags using a function, but that doesn’t really address the fundamental issue as far as I can see.

Viewing 25 results - 501 through 525 (of 1,298 total)