Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cannot read property ‘selector’ of undefined

Viewing 11 replies - 1 through 11 (of 11 total)

  • sushant88
    Participant

    @sushant88

    Buddy press is not letting WordPress’ customize function play well. following error is thrown when we try to customize WordPress page

    customizer.min.js:1 Uncaught TypeError: Cannot read property 'selector' of undefined
        at HTMLDocument.<anonymous> (customizer.min.js:1)
        at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2)
        at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2)
        at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2)
        at HTMLDocument.K (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2)
    (anonymous) @ customizer.min.js:1
    i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2
    fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2
    ready @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2
    K @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-&load[]=ui-draggable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-resizable&ver=4.9.7:2

    View post on imgur.com

    Disabling the plugin allows us to customize the front page. We were able to reproduce the error with different wordpress setup on both linux and windows.

    1. Which version of WordPress are you running? 4.9.7
    2. Did you install WordPress as a directory or subdomain install? Directory
    3. If a directory install, is it in root or in a subdirectory? subdirectory
    4. Did you upgrade from a previous version of WordPress? If so, from which version? no
    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. yes
    6. Which version of BP are you running? 3.1.0
    7. Did you upgraded from a previous version of BP? If so, from which version? no
    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones? advanced-custom-fields-pro
    9. Are you using the standard WordPress theme or customized theme? twenty fifteen, sixteen, seventeen,
    10. Which theme do you use ? twenty fifteen
    11. Have you modified the core files in any way? no
    12. Do you have any custom functions in bp-custom.php? no
    13. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? 2.5.14
    14. Please provide a list of any errors in your server’s log files. there were no error
    15. Which company provides your hosting? cloudways
    16. Is your server running Windows, or if Linux; Apache, nginx or something else? Linux, Apache
    Basic Trouble Shooting:
    > changed theme , issue persisted
    > disabled all plugins except BuddyPress,
    > reinstalled buddy press and removed caching entirely
    >
    issue persisted


    Tushar
    Participant

    @tushar4monto

    Hello

    I get the same error. with default WordPress theme.
    Uncaught TypeError: Cannot read property ‘selector’ of undefined
    Please check the link. some settings options not working with this error. if I uninstall this plugin then all options are working.

    http://prntscr.com/k8v054
    http://nimb.ws/eJOBzP


    r-a-y
    Keymaster

    @r-a-y

    @sushant88 @tushar4monto Does this occur with all themes or a specific one?

    If it is a specific theme, is the theme freely available on the wordpress.org theme repository? If so, which one?


    sushant88
    Participant

    @sushant88

    No it is not theme specific,
    As I posted in my query, in basic troubleshooting I changed the theme, and issue remained.
    It was persisting with default theme and our custom themes as well. The issue also persisted when we installed the demo wordpress website from the scratch.


    r-a-y
    Keymaster

    @r-a-y

    Sorry, I cannot duplicate this on a fresh install of WordPress 4.9.7 and BuddyPress 3.1.0, using Twenty Seventeen and launching the Customizer.

    Any steps to duplicate from a fresh install? What page are you attempting to launch the customizer from?

    If you want to help debug the uncompressed javascript, add the following to wp-config.php:

    define( 'SCRIPT_DEBUG', true );

    And note down the JS console message.


    Tushar
    Participant

    @tushar4monto

    Hello @r-a-y

    This error is occurring with all themes, either it’s on wordpress.org theme repository or any other source. Here I am attaching screenshots of WordPress’ default themes, from Twenty Ten to Twenty Seventeen.

    1. Twenty Ten: https://i.imgur.com/kZUxTUD.png
    2. Twenty Eleven: https://i.imgur.com/wMYZtfv.png
    3. Twenty Twelve: https://i.imgur.com/rEng3N8.png
    4. Twenty Thirteen: https://i.imgur.com/8tHqZ1D.png
    5. Twenty Fourteen: https://i.imgur.com/rY2nZwM.png
    6. Twenty Fifteen: https://i.imgur.com/3wrlQ0s.png
    7. Twenty Sixteen: https://i.imgur.com/1PZB9Ka.png
    8. Twenty Seventeen: https://i.imgur.com/suQPI1E.png

    This error is occurring due to buddypress/bp-templates/bp-nouveau/js/customizer.min.js.

    Hello @r-a-y
    I am also using fresh WordPress setup, but still facing the issue. Here are the setup environment details:
    WordPress: 4.9.7
    BuddyPress: 3.1.0
    Twenty Seventeen: 1.6

    I enabled script debugging by adding following code to wp-config.php:
    define( 'SCRIPT_DEBUG', true );

    View post on imgur.com

    The issue is arriving when I am opening customizer from any page, either I am in Appearance section or Pages.

    I tried one setting in BuddyPress and issue gone. I changed Template Pack from BuddyPress Nouveau to BuddyPress Legacy in Admin Panel > Settings > BuddyPress > Options tab > Main Settings > Template Pack.

    When changed “Template Pack” to “BuddyPress Legacy” it’s not loading any js containing wp.customize.control, so it’s not generating any error.

    @sushant88

    Can you please confirm that same thing, issue is gone when changing Template Pack to Legacy, is happening on your side too.


    r-a-y
    Keymaster

    @r-a-y

    I’ve created a ticket here – https://buddypress.trac.wordpress.org/ticket/7934

    Hopefully, some other contributors can duplicate the problem.

    I applied the patch and tested with all default themes (twenty-*) and two custom themes and it works fine.


    sushant88
    Participant

    @sushant88

    yes as I have said earlier, switching to legacy does not resolves the issue.
    I haven’t tried the patch yet,

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar