Error message when updating design settings

Hello experts

I experience a strange error message when trying to change some design settings:

Notice: Undefined index: dazzling_slide_categories in [DOCUMENT_ROOT]/wp-content/themes/dazzling/inc/admin/includes/class-options-framework-admin.php on line 274

Warning: Cannot modify header information - headers already sent by (output started at [DOCUMENT_ROOT]/wp-content/themes/dazzling/inc/admin/includes/class-options-framework-admin.php:274) in [DOCUMENT_ROOT]/wp-includes/pluggable.php on line 1196

What could be the reason?

Many thanks in advance!

Dave

Hi Dave,

I hope you are well today and thank you for your question.

I checked it on my site using latest version of Dazzling theme and also setting wp debug to true but i didn’t get any such messaged on theme settings page after changing design settings.

Could you please share the screenshot of the screen where you are getting this message?

What have you set in the theme settings for “Slider Category” option as shown in the attached screenshot?

To resolve the message could you please try editing the following Dazzling theme file on line number 272

Dazzling theme file :
wp-content/themes/dazzling/inc/admin/includes/class-options-framework-admin.php

Before Editing :


// For a value to be submitted to database it must pass through a sanitization filter
			if ( has_filter( 'of_sanitize_' . $option['type'] ) ) {
				$clean[$id] = apply_filters( 'of_sanitize_' . $option['type'], $input[$id], $option );
			}

After Editing :


// For a value to be submitted to database it must pass through a sanitization filter
			if ( has_filter( 'of_sanitize_' . $option['type'] ) ) {
				if( isset($input[$id]) ){
					$clean[$id] = apply_filters( 'of_sanitize_' . $option['type'], $input[$id], $option );
				}
			}

Kind Regards,
Movin

Hi Movin,

thank you for your detailed reply!

Could you please share the screenshot of the screen where you are getting this message?

It’s a blank screen with just the error message.

But more interesting is the following question:

What have you set in the theme settings for “Slider Category” option as shown in the attached screenshot?

The checkbox “Check if you want to enable slider” was unchecked, because I don’t need a slider. When I check it, there’s no possibility to choose a slider category (see attached screenshot).

I’m using a child theme. Could this be the reason?

Kindest regards,
Dave

Hi Dave,

The checkbox “Check if you want to enable slider” was unchecked, because I don’t need a slider. When I check it, there’s no possibility to choose a slider category (see attached screenshot).

Could you please just make sure that you have at least one post category created and it’s assigned to at least one post?

I’m using a child theme. Could this be the reason?

I have just tested it on my test site using child theme but didn’t get such messages so it doesn’t seem the child theme issue.

This is a simple PHP warning/notice and most of the time it doesn’t affect functionality of site so it is nothing to worry about!

Do you have WP_DEBUG set to true in your wp-config.php file?

If you do then please set it to false.
This will hide the warning messages and you will be able to use your site normally.

Have you tried using the custom solution that i have shared in my previous reply?

Regards,
Movin