• Hi

    I was going through my plugins and wanted to improve the code. So I turned on the DEBUG in wp-config.php. Upon turning on debug I get these error messages with the Atahualpa themes:

    Notice: Undefined index: ata_images_dir in /home/www/bachutha.com/wp-content/themes/atahualpa/functions/bfa_rotating_header_images.php on line 6

    Notice: Undefined index: images_root in /home/www/bachutha.com/wp-content/themes/atahualpa/functions/bfa_rotating_header_images.php on line 12

    Notice: Undefined index: widget_center_top in /home/www/bachutha.com/wp-content/themes/atahualpa/index.php on line 11

    Notice: Undefined index: widget_center_bottom in /home/www/bachutha.com/wp-content/themes/atahualpa/index.php on line 51

    So far from my debugging I noticed that the error messages could be issued if

    1. if a variable is not checked if it is set – isset()
    2. and there are no single quotes like $_POST[myfield] is used in coding instead of $_POST[‘myfield’]

    I do not know what other causes they can be.

    I did try `
    if( isset( $bfa_ata[‘images_root’] ) ) { <———— here isset check
    if($bfa_ata[‘images_root’] != “wp-content”) {
    $imgpath = get_template_directory() . ‘/images/header/’;
    $imgdir = get_template_directory_uri() . ‘/images/header/’;
    } else {
    $imgpath = ABSPATH . ‘wp-content/’ . $img_folder . ‘/header/’;
    $imgdir = content_url() . ‘/’ . $img_folder . ‘/header/’;
    }
    `
    And it got rid of error on line 12 but I got another error and that was

    /home/www/bachutha.com/wp-content/ata-images/header/ –

    as the variable $img_folder is set with ‘/ata-images/’ sub-directory. This directory does not exists.

    actually the directory that I can observe is
    /home/www/bachutha.com/wp-content/atahualpa/images/header/ –

    I have had this error before ie different image sub-directory /ata-images/ instead of /images/

    I could not find where $img_folder was defined so that I could not attempts a fix to check if there are less error in debug mode as the Atahualpa errors were blocking my errors, making it more difficult to fix my code.

    Can these errors be fixed quickly?

    Thanks & Best regards,
    Peter

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter peter achutha

    (@peter-achutha)

    Hi,

    I have installed Atahualpa 3.7.23 and when I enabled debug – set to TRUE, I kept getting the following error messages:

    Notice: Undefined index: ata_images_dir in /home/www/bachutha.com/wp-content/themes/atahualpa/functions/bfa_rotating_header_images.php on line 6

    Notice: Undefined index: images_root in /home/www/bachutha.com/wp-content/themes/atahualpa/functions/bfa_rotating_header_images.php on line 12

    Notice: Undefined index: widget_center_top in /home/www/bachutha.com/wp-content/themes/atahualpa/index.php on line 11

    Notice: Undefined index: widget_center_bottom in /home/www/bachutha.com/wp-content/themes/atahualpa/index.php on line 51

    Can they be fixed?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Could you post on your theme’s support section here: https://www.ads-software.com/support/theme/atahualpa#postform

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Atahualph Theme: Notice: Undefined index:’ is closed to new replies.