• This bug started today. When I try to customize the theme, it shows only WIDGETS option, and the console says:

    “Uncaught TypeError: data.value.indexOf is not a function” error in VM1456 file, line 25: if ( -1 === data.value.indexOf( choiceID ) ) {

    When changing to any other wordpress Theme, the customizer works flawlessly, so this must be a bug related to the theme.

    I have already disabled ALL plugins and this bug is not fixed.

    Any ideas on how to fix this? I’m not a coder.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @fabvon,

    When you disable plugins and keep the theme active, the issue persists, or only when you enable any specific OceanWP plugin, and if so, which?

    Do you have any error log you can provide us so that we can have a wider notion of what might be causing the issue and have it fixed?

    Regards,

    Thread Starter fabvon

    (@fabvon)

    Hi! The problem happens only with OceanWP, I tried with other themes and even with all the plugins active, the customize.php works… but when I switch back to OceanWP, the error appears.

    I’m not a coder, can you tell me how can I show you the log error? I only saw the errors in Chrome console, here they are:

    (function anonymous(data,_
    ) {
    var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
    __p+='\n					<label class=\'oceanwp-sortable\'>\n			<span class="customize-control-title">\n				'+
    ((__t=( data.label ))==null?'':__t)+
    '\n			</span>\n			';
     if ( data.description ) { 
    __p+='\n				<span class="description customize-control-description">'+
    ((__t=( data.description ))==null?'':__t)+
    '</span>\n			';
     } 
    __p+='\n\n			<ul class="sortable">\n				';
     _.each( data.value, function( choiceID ) { 
    __p+='\n					<li '+
    ((__t=( data.inputAttrs ))==null?'':__t)+
    ' class=\'oceanwp-sortable-item\' data-value=\''+
    ((__t=( choiceID ))==null?'':_.escape(__t))+
    '\'>\n						<i class=\'dashicons dashicons-menu\'></i>\n						<i class="dashicons dashicons-visibility visibility"></i>\n						'+
    ((__t=( data.choices[ choiceID ] ))==null?'':__t)+
    '\n					</li>\n				';
     }); 
    __p+='\n				';
     _.each( data.choices, function( choiceLabel, choiceID ) { 
    __p+='\n					';
    
     if ( -1 === data.value.indexOf( choiceID ) ) {  ***THE ERROR IS IN THIS LINE AS PER CHROME CONSOLE ***
    
    __p+='\n						<li '+
    ((__t=( data.inputAttrs ))==null?'':__t)+
    ' class=\'oceanwp-sortable-item invisible\' data-value=\''+
    ((__t=( choiceID ))==null?'':_.escape(__t))+
    '\'>\n							<i class=\'dashicons dashicons-menu\'></i>\n							<i class="dashicons dashicons-visibility visibility"></i>\n							'+
    ((__t=( data.choices[ choiceID ] ))==null?'':__t)+
    '\n						</li>\n					';
     } 
    __p+='\n				';
     }); 
    __p+='\n			</ul>\n		</label>\n				';
    return __p;
    
    })
    VM817:25 Uncaught TypeError: data.value.indexOf is not a function
        at eval (eval at s.template (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:9), <anonymous>:25:25)
        at Function.s.each.s.forEach (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:9)
        at eval (eval at s.template (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:9), <anonymous>:23:4)
        at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:9)
        at load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:12
        at f.renderContent (customize-controls.min.js?ver=5.2.4:2)
        at Object.<anonymous> (customize-controls.min.js?ver=5.2.4:2)
        at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:2)
        at Object.add [as done] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,underscore,wp-sanitize,wp-a11y,wp-util,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sort&load[]=able,jquery-ui-draggable,jquery-ui-droppable,backbone,wp-backbone,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu,shortc&load[]=ode,utils,media-models,moxiejs,plupload,wp-plupload&ver=5.2.4:2)
        at Function.<anonymous> (customize-controls.min.js?ver=5.2.4:2)
    Thread Starter fabvon

    (@fabvon)

    Update:

    I discovered that if I disable BLOG PANEL under Theme Panel settings, the options in the Customizer appears again, except Blog Panel.

    So the problem must be related with a Blog section setting.

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

The topic ‘Uncaught TypeError: data.value.indexOf is not a function’ is closed to new replies.