Home » Topics » General Support » Widget Says "You have not added any fields to this widget yet. "

Widget Says "You have not added any fields to this widget yet. "

ACF Widgets Support General Support Widget Says "You have not added any fields to this widget yet. "

This topic contains 5 replies, has 3 voices, and was last updated by  Daron Spence 3 days, 22 hours ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #105373

    Alex Vasquez
    Participant

    My widget says I haven’t added any fields, but I have (screenshot). Also, the location is properly assigned. Using 1.11.

    #105374

    Daron Spence
    Keymaster

    Hi Alex,

    Thanks for supporting the plugin.

    Can you tell me if this behavior is present on the “old” widget select screen, not in the customizer?

    Cheers

    #105377

    Alex Vasquez
    Participant

    Happy to support! This happens in the “old” widget management way: Appearance > Widgets (Screenshot). The theme currently doesn’t have any active widget areas so I can’t test in the customizer anyways.

    #105378

    Daron Spence
    Keymaster

    Hmmm that is strange. Usually other users are pretty good about reporting something like this. I didn’t see any updates with ACF that should cause this to happen but I’ll take a look at the code tonight.

    Functionally, is everything working as expected (except this issue)?

    #105404

    Thomas Meyer
    Participant

    Same for me…

    This happens since ACF Version 5.6.6 because ACF changed the DOM and the <p class="acfw-no-acf"> is no longer a sibling of the "div[id*='_acf_widget_'] .acf-field" as it would be searched in the acf-widgets.js

    If you change the acf-widgets.js to this, it works on ACF 5.6.6 and newer as well:

    function acfw(){
      var el = jQuery("div[id*='_acf_widget_'] .acf-field");
      var num = 0;
      num = el.length;
      if ( num > 0 ){
        var remove = el.closest('.widget-content').children('.acfw-no-acf');
        remove.attr('data-display', 'none');
      }
    }
    function acfw_remove_fields(){ 
      jQuery('.widget .acf-field').remove(); 
    }
    jQuery(document).ready( acfw );
    #105405

    Daron Spence
    Keymaster

    Thomas thanks for the lead here. I’ve been busy with some other things. I’ll try to get a push for this as soon as I get some free time.

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

You must be logged in to reply to this topic.