Support

Account

Forum Replies Created

  • The error log points to an error with ‘pun_shortcode_ui’ which when I google it seems to refer to another plugin ‘PopupMaker’, maybe your issue is there?

    The solution for me, at least temporarily was to turn *off* the option to ‘Delay initializiation’ of TinyMCE, after doing this for each field things seem to work and I can live without that option.

  • Is there any way to debug these specifically? I am having a similar issue on my live site, cant reproduce it on my local site. Presumably an offending plugin should be something that uses tiny-mce i.e. has a WYSIWYG editor on the edit page?

    My error code:

    
    tinymce.min.js?ver=4607-20180123:14 Uncaught TypeError: Cannot read property 'onpageload' of undefined
        at e (tinymce.min.js?ver=4607-20180123:14)
        at k (tinymce.min.js?ver=4607-20180123:14)
        at h.l.bind (tinymce.min.js?ver=4607-20180123:1)
        at o.bind (tinymce.min.js?ver=4607-20180123:3)
        at Object.init (tinymce.min.js?ver=4607-20180123:14)
        at e (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,thickbox,jquery-ui-tabs,wp-mediaelement,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp&load[]=-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,shor&load[]=tcode,backbone,wp-util,wp-backbone,media-models,wp-plupload,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,im&load[]=gareaselect,image-edit,svg-painter,wp-auth-check,media-upload,jquery-ui-button,editor,quicktags,wplink,wp-embed&ver=4.9.4:670)
        at HTMLDocument.<anonymous> (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,thickbox,jquery-ui-tabs,wp-mediaelement,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp&load[]=-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,shor&load[]=tcode,backbone,wp-util,wp-backbone,media-models,wp-plupload,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,im&load[]=gareaselect,image-edit,svg-painter,wp-auth-check,media-upload,jquery-ui-button,editor,quicktags,wplink,wp-embed&ver=4.9.4:670)
        at a (tinymce.min.js?ver=4607-20180123:1)
        at HTMLDocument.p (tinymce.min.js?ver=4607-20180123:1)
    e @ tinymce.min.js?ver=4607-20180123:14
    k @ tinymce.min.js?ver=4607-20180123:14
    l.bind @ tinymce.min.js?ver=4607-20180123:1
    bind @ tinymce.min.js?ver=4607-20180123:3
    init @ tinymce.min.js?ver=4607-20180123:14
    e @ load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,thickbox,jquery-ui-tabs,wp-mediaelement,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp&load[]=-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,shor&load[]=tcode,backbone,wp-util,wp-backbone,media-models,wp-plupload,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,im&load[]=gareaselect,image-edit,svg-painter,wp-auth-check,media-upload,jquery-ui-button,editor,quicktags,wplink,wp-embed&ver=4.9.4:670
    (anonymous) @ load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,thickbox,jquery-ui-tabs,wp-mediaelement,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp&load[]=-lists,postbox,jquery-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,shor&load[]=tcode,backbone,wp-util,wp-backbone,media-models,wp-plupload,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,im&load[]=gareaselect,image-edit,svg-painter,wp-auth-check,media-upload,jquery-ui-button,editor,quicktags,wplink,wp-embed&ver=4.9.4:670
    a @ tinymce.min.js?ver=4607-20180123:1
    p @ tinymce.min.js?ver=4607-20180123:1
    
  • Thanks for the reply, your suggestion got me digging and found a plugin (Tickera) that was running jQuery.validate() on the ACF fields and because they have a ‘maxlength’ property that is unspecified this was being treated as a maxlength of 0, causing the error. I will talk with that developer about ignoring the ACF fields.

    Thanks for your help!

  • Bizarrely, i have figured out that if the fields are “toggled” closed the save looks like it works i.e. the page re-loads but none of the changes are actually saved. I’m wondering if this is just some kind of JS issue but not sure how to debug as no errors are thrown!

    I’ve emailed support but no word back yet…

  • Just to confirm was having the same issue, fixed by turning off W3TC Object cache but would love a more permanent solution.

    Thanks

  • This was a super helpful piece of code. I made one small addition which is to allow for an option for “No Parent” i.e. when the current custom post has no parent set. This was literally one line but I also made some tiny cleanups to the code so I’ve included it below.

    Thanks again!

    function acf_location_rules_types($choices) {
        $choices['Custom Post Types']['cpt_parent'] = 'Custom Post Type Parent';
        return $choices;
    }
    add_filter('acf/location/rule_types', 'acf_location_rules_types');
    
    function acf_location_rules_values_cpt_parent($choices) {
    	$args = array(
    		'hierarchical' => true,
    		'_builtin' => false,
    		'public' => true
    	);
    	$hierarchical_posttypes = get_post_types($args);
    	foreach($hierarchical_posttypes as $hierarchical_posttype) {
    		if ('acf' !== $hierarchical_posttype) {
    			$choices[0] = __('No Parent');
    			$args = array(
    				'post_type' => $hierarchical_posttype,
    				'posts_per_page' => -1,
    				'post_status' => 'publish'
    			);
    			$customposts = get_posts($args);
    			foreach ($customposts as $custompost) {
    				$choices[$custompost->ID] = $custompost->post_title;
    			}
    		}
    	}
    	return $choices;
    }
    add_filter('acf/location/rule_values/cpt_parent', 'acf_location_rules_values_cpt_parent');
    
    function acf_location_rules_match_cpt_parent($match, $rule, $options) {
    	global $post;
    	$selected_post = (int) $rule['value'];
    	if ($post) { // post parent
    		$post_parent = $post->post_parent;
    		if ($options['page_parent']) {
    			$post_parent = $options['page_parent'];
    		}
    		if ('==' == $rule['operator']) {
    			$match = ($post_parent == $selected_post);
    		} elseif ('!=' == $rule['operator']) {
    			$match = ($post_parent != $selected_post);
    		}
    	}
      return $match;
    }
    add_filter('acf/location/rule_match/cpt_parent', 'acf_location_rules_match_cpt_parent', 10, 3);
  • Not sure if it will fix it but I noticed that your remove_action call doesn’t specify the priority of the function. From the codex ( https://codex.wordpress.org/Function_Reference/remove_action ):
    Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.

    In other words try
    remove_action( 'acf/save_post', 'my_post_updater', 20 );

  • arathra, care to show us your code?

  • Aha! The answer lies here: http://codex.wordpress.org/Plugin_API/Action_Reference/save_post#Avoiding_infinite_loops

    Essentially I was creating an infinite loop of updating the value <–> updating the post. Not sure why this suddenly started happening (where it was working fine before), perhaps a WP or ACF change means that the update_value filter is getting triggered by wp_update_post where it wasn’t before.

    Anyway, simple solution is:

    remove_filter('acf/update_value/name=author', 'author_acf_update_value', 10);
    wp_update_post(array('ID' => $post_id,'post_author' => $value));
    add_filter('acf/update_value/name=author', 'author_acf_update_value', 10, 3);
  • To be honest, my code has changed and I’m not sure I have the motivation to go digging through my version control history to try and find the issue again.

    2.5 month turnaround time not ideal, but thanks for following up…

  • Yep, same problem here—took me a few minutes to figure out what happened. Is there a bug report for this??

Viewing 12 posts - 1 through 12 (of 12 total)