• Resolved BeckyTech

    (@beckytech)


    Theme is Sparkling by Colorlib: https://colorlib.com/wp/themes/sparkling/
    Site is: alamedaministorage.com

    I have been using Child Theme Configurator and updated to the latest version. I now have PHP errors in the extras.php file that resides in the inc subdirectory. That is a file that I never changed or copied over to my child theme originally. It is burping on line 304, the typography options, specifically the size and style items in this line with that Undefined index error:

    echo ‘.entry-content {font-family: ‘ . $typography_options[‘faces’][$typography[‘face’]] . ‘; font-size:’ . $typography[‘size’] . ‘; font-weight: ‘ . $typography[‘style’] . ‘; color:’.$typography[‘color’] . ‘;}’;

    I’m not sure what the problem is. I got the latest extras.php file from github, but that didn’t correct the error.

    The functions file in my child theme directory, is very abbreviated. The theme has not been updated since I started.

    I did try to disable jetpack (which I need) but that didn’t correct the error. I’m just running Contact 7 and a few plugins that I run on other sites with Child Theme Configurator which have never caused a problem. (Limit Login Attempts, Enhanced Text Widget, Post Types Order.)

    Hope you can help.

    https://www.ads-software.com/plugins/child-theme-configurator/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter BeckyTech

    (@beckytech)

    I did contact you and am back here in public to say: Thank you very much for working so quickly to help me. I must say, as a person with 25 years in the IT industry and having had contact with enough tech support people to give me gray hair, your level of service is extraordinary.

    Plugin Author lilaeamedia

    (@lilaeamedia)

    You are welcome. Let me know if you run into anything else.

    -jf

    Hi,
    I have the same error when “analyzing” the child of the sparkling theme. Is this an issue it all seems to work fine… The parent analyzed fine when I first did this.

    Thanks Quentin

    Notice: Undefined index: size in /…./clone/wp-content/themes/sparkling/inc/extras.php on line 304

    Notice: Undefined index: style in /…/clone/wp-content/themes/sparkling/inc/extras.php on line 304

    Plugin Author lilaeamedia

    (@lilaeamedia)

    The CTC analyzer runs in “debug mode” so it dislays notices and errors that might otherwise go unnoticed.

    “Undefined index” is a common coding mistake for theme and plugin developers.

    It is a minor issue and will not adversely affect the user experience, however you should notify the developer of this theme of the issue.

    Thread Starter BeckyTech

    (@beckytech)

    Things just got worse. Although you helped me with one site, I never did go back to the Sparkling developer and tell them of the problem. I need to get back on this and resolve this issue, so today I logged into one of my sites and discovered that the author had updated his theme. Great, maybe it fixed the undefined index errors.

    No such luck. This time when I ran the analyzer I was hit with several pages of the following error:
    ————
    Notice: Indirect modification of overloaded element of WP_Hook has no effect in /home/content/p3pnexwpnas04_data02/02/2906402/html/wp-content/object-cache.php on line 709
    ————–

    When I did the debug thing you told me about: turn on debug, activate the master theme and call up the home page, the home page would not load. All I got was a page full of these errors instead. I re-upload the non-debug wp-config.php and the site is back up, but I’m no closer to resolving the Child Theme Configurator problem.

    I would like an option to update my child theme configurator software without running in debug mode. My only other option is to create a new child theme (child-them.01, .02) each time you issue an update.

    The original error and this error references a directory that I cannot see in FTP:

    Undefined index: size in /home/content/p3pnexwpnas04_data02/02/2906402/html/wp-content/themes/sparkling/inc/extras.php on line 304
    PHP Notice: Undefined index: style in home/content/p3pnexwpnas04_data02/02/2906402/html/wp-content/themes/sparkling/inc/extras.php on line 304

    Judging by some other messages to the developer about this problem, they were caused by an add-on. The problem is that I have no idea what is in the content directory and what these other directories hold. I have a call in to GoDaddy to try to find out. My add-ons are very minimal and I know I shared those with you in my first message.

    I’m wondering if you could replicate this problem by loading the old version of your software on a version of the theme before this very latest update. Then updating your software starting with mid-year last year when this problem started appearing?

    I don’t want to debug the theme, I don’t know how to fix the errors, I just want to use your software and proceed, that’s why I would like the option not to run in debug mode, just use the current child theme and update your software.

    Thread Starter BeckyTech

    (@beckytech)

    Update: GoDaddy had me flush the cashe and that cleared the new error, so I’m back to the original:
    Notice: Undefined index: size in /home/content/p3pnexwpnas04_data02/02/2906402/html/wp-content/themes/sparkling/inc/extras.php on line 304

    Notice: Undefined index: style in /home/content/p3pnexwpnas04_data02/02/2906402/html/wp-content/themes/sparkling/inc/extras.php on line 304

    It turns out that the other directories are the GoDadddy hosting directories and have nothing to do with my site until we hit the “html”.

    Now I can go try to get a response from the developer, but I would still like the option to not run Child Theme in debug mode.

    Thanks
    Becky

    Plugin Author lilaeamedia

    (@lilaeamedia)

    First, let me say that the errors don’t go away just because you can’t see the debug output. Your web server will continue to log these errors until they are resolved. That said, you can run the configurator setup even when these are present and then continue using the other features of CTC.

    “Undefined index” is a symptom of sloppy code. It occurs when an array is being dereferenced with a key that does not exist, usually when the key is also a variable that may or may not have a value.

    In this case, they all stem from one line of one file in the theme: /sparkling/inc/extras.php line 304. When a new typeface is selected, e.g., “Trebuchet”, the theme is not populating all of the “typography” property values, causing some of them to be “undefined.” ( Specifically ‘size,’ ‘style,’ and ‘color.’ )

    The developer should not release a theme without thoroughly testing for these kinds of issues and should definitely take responsibility for fixing them if they make it through testing.

    ==

    The newer problem looks like it is coming from a performance cache plugin, specifically the object cache. Object caching only works when the object code is written in a way that can be cached. In your caching plugin (e.g., W3 Total Cache, WP Super Cache, etc.) turn off object caching and see if the problem goes away. (There are three types in any perfomance caching plugin: page caching, object caching and database caching and I frequently see problems when object caching is used.)

    Plugin Author lilaeamedia

    (@lilaeamedia)

    I just remembered that GoDaddy requires you to use their proprietary caching and blocks the use of any other performance caching. This means that you will continue to have this problem as long as the offending plugin or theme is being used or object caching is active.

    Thread Starter BeckyTech

    (@beckytech)

    I know the errors don’t go away, but there are situations where it looks to me like they are a show stopper and I don’t want my show stopped. ?? Let me explain why masking a problem is just fine as a temporary solution.

    It looked to me like the only way around this error was to create a new child theme, copy all the files from my old child-theme directory to my new one, etc. (Maybe that was user error, but updates to my css file didn’t seem to be working and after I did this the updates to the css worked fine). It was a hassle, it created some ripple effects in other areas and it was just kind of messy to recover from. Altogether, it took me over an hour to get my site back correctly.

    Remember that when I originally ran into this I was just innocently going along updating my plugins. Since I knew I had not made any changes to any files or code, I really didn’t want to have to stop, Google a few different ways to see if this problem had been encountered before and had an existing resolution. If not, now I have to go find the developer’s forum, register, login, and create a succinct post of the problem. We are talking a good hour and a half because as I’m Googling I’m trying to get a handle on just what the problem is.

    You responded right away, which is great. (BTW, I got sick and had to table this problem for awhile. Now I’m back at it.) But now I have to take a significant side trip along a path that I really didn’t want to have to pursue at the moment. And right now the developer’s response is it will be fixed later. I have no idea when the developer will come out with an update.

    Now the option to mask the debug output is really needed because the theme developer responded that I have to change the font in order to not get the error. So now when it’s time to do the CTC update on my sites, I have to change the font, run the CTC update, then go back and change the font.

    I hope I’ve explained this and you can see why just being able to say “skip the errors, do the CTC update” would be a helpful option.

    And let me say once again that the quality of your tech support is just stellar. Thank you!

    Plugin Author lilaeamedia

    (@lilaeamedia)

    You can use the Plugin Editor to go into the ChildThemeConfiguratorPreview class (includes/classes/Preview.php) and comment out the debug lines 5 & 6:

    \\ error_reporting( E_ALL );
    \\ ini_set( 'display_errors', 1 );
    
    Thread Starter BeckyTech

    (@beckytech)

    Fabulous, thank you!

    Thread Starter BeckyTech

    (@beckytech)

    For those who follow, the Sparkling theme developer said they would fix their error. Did not indicate when. In the meantime, revert to default font settings:
    https://colorlib.com/wp/forums/topic/undefined-index-errors-extras-php/

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Undefined index: size (typography) and Undefined index: style’ is closed to new replies.