Home Forums ACF PRO File upload button js error when using ACF fields in widget


File upload button js error when using ACF fields in widget

  • Hi all , apologies if this issue has been reported before but was unable to find similar in support forum so far

    Am using latest version of ACF PRO plugin 5.5.3 on wordpress 4.7.1 with a bespoke theme.

    Issue is with image upload button, on an acf field applied to a widget, generating a js error.

    The error is ‘Uncaught TypeError: Cannot read property ‘align’ of undefined’ on media-views.js

    The error was occurring in previous versions (-1) of wordpress and acf pro , was hoping updating would help but no joy.

    This is the code from media-views.js –

    resetDisplays: function() {
    var defaultProps =;
    this._displays = [];
    this._defaultDisplaySettings = {
    align: getUserSetting( ‘align’, defaultProps.align ) || ‘none’,
    size: getUserSetting( ‘imgsize’, defaultProps.size ) || ‘medium’,
    link: getUserSetting( ‘urlbutton’, ) || ‘none’

    The issue is that code is in wordpress core library file so would rather not tinker with it as updates will remove any amends.

    Have tried image field ( singular and within repeater) and gallery and both not working.

    Any suggestions/help appreciated

  • Is this an image field?

    I tried adding an image field to a widget and I’m not getting any errors when I click the add image button.

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

You must be logged in to reply to this topic.