A glitches & fixes thread for Contango 5.0

WordPress Themes, Plugins and HTML Templates Forums Contango WordPress Theme A glitches & fixes thread for Contango 5.0

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #510
    Anonymous
    Guest

    Hi!

    Just bought the theme and found a glitch which arises while WP_DEBUG = true. When you save settings in backend, you get following php notices and warnings:

    1. Undefined index: kamn_sidebars in …contangolibadminadmin.php on line 515
      This happens if you have no sidebars set.
    2. Undefined index: kamn_reset_control in … on line 589
      The same, but this one happens every time unless you tick the “Reset Theme Options” checkbox.
    3. Warning: Cannot modify header information – headers already sent by…
      This one disappears if you fix the two above.

    I don’t think developers need the fix instructions since it is a very basic php (and they would find a more elegant solution), but I post my solution in case the theme won’t get updated, so that other people could make use of it meanwhile.

    1. Open wp-contentthemescontangolibadminadmin.php
    2. Find “/* Validation: kamn_sidebars */” string (line 514)
    3. Add following two strings below that line:
      [PHP]if ( !isset( $input ) )
      $input = ”;[/PHP]
    4. Now scroll down to “/* Validation: kamn_reset_control */” (now it’s line 590)
    5. Replace next line
      [PHP]if ( ! array_key_exists( $input, $kamn_boolean_pd ) ) {[/PHP]
      with:
      [PHP]if ( ! array_key_exists( ‘kamn_reset_control’, $input ) || ! array_key_exists( $input, $kamn_boolean_pd ) ) {[/PHP]

    Another bug I’ve encountered is the layout of “Edit” link in custom type posts meta. See screenshot:
    [ATTACH=full]43[/ATTACH]

    I didn’t look into fixing it, maybe you take care of it sooner :)

    #1319
    Anonymous
    Guest

    Another ticket: this time for style.css.

    Look at lines 572-574. There are selectors for text, password and email. It would be wise to append a “number” type in there:

    input[type=”text”],
    input[type=”number”],
    input[type=”password”],
    input[type=”email”],
    textarea,
    select {
    [/CODE]
    The same for lines 598-600.

    Otherwise it looks like this:
    [ATTACH=full]44[/ATTACH]

    By the way, do you have a ticket system?[CODE]
    input[type=”text”],
    input[type=”number”],
    input[type=”password”],
    input[type=”email”],
    textarea,
    select {
    [/CODE]
    The same for lines 598-600.

    Otherwise it looks like this:
    [ATTACH=full]44[/ATTACH]

    By the way, do you have a ticket system?

    #1320
    admin
    Participant
    bohdan, post: 782, member: 324 wrote:
    Hi!

    Just bought the theme and found a glitch which arises while WP_DEBUG = true. When you save settings in backend, you get following php notices and warnings:

    I didn’t look into fixing it, maybe you take care of it sooner :)

    Thanks for giving my attention towards PHP Notices.
    Bohdan, Will you be able to share PHP version of your server, so we will try to test our all themes very close to that version as well. Currently, our development of themes is at the following benchmark,

    PHP 5.5.10
    MySql 5.5.34

    Although we are not receiving PHP notices and warnings at this version but i have assigned this task at high priority to our developers to test the themes at the possible minimum level of PHP that might be 5.3.28 or may be 5.2.17

    Once again thanks for giving your time for such a valuable feedback.

    #1321
    admin
    Participant
    bohdan, post: 783, member: 324 wrote:
    Another ticket: this time for style.css.

    By the way, do you have a ticket system?

    Again thanks for your second feedback. Bohdan, you may post your query in the forum as we are observing our client’s feedback constantly and seriously.
    We will update our themes soon depending on your queries + several other new features.

    Once again thanks!

    #1322
    Anonymous
    Guest

    Pleasant to see such support! Thanks.

    I’m using PHP 5.5.10 in local Windows environment. SQL – MariaDB 5.5.36.

    Will report to this thread if I find more propositions.

    admin, post: 784, member: 1 wrote:
    we are not receiving PHP notices and warnings

    Maybe our error_reporting PHP parameters differ. Mine is following:

    error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
    display_errors = On
    [/CODE][CODE]
    error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
    display_errors = On
    [/CODE]

    #1323
    admin
    Participant

    Thanks for the feedback.

    I have assigned tickets to our developers to re-check our themes and fix the possible notices and warnings.
    You are always welcome to give your valuable feedback.

    Once again Thanks
    Cheers!

    #1324
    Anonymous
    Guest

    Caught another PHP Notice — when tried to simply add a post (didn’t create any posts till now, so these notices were just waiting for me from the beginning). It happens even in clean wp 3.9.1 install with Contango 5.0. I suppose this is because I’ve set all notices to be displayed, otherwise everyone would see those notices when creating or updating a post.

    So, the problem is in the end of …contangolibmodules.php:
    [PHP] /**
    * Thirdly we can save the value to the database
    * Save Data
    */

    /** Kamn Meta Boxes */
    $kamn_meta_boxes = kamn_meta_boxes();

    foreach( $kamn_meta_boxes as $meta_box ) {

    foreach ( $meta_box as $field ) {

    $old = get_post_meta( $post_id, $field, true );
    $new = $_POST[$field];

    if ( $new && $new != $old ) {
    update_post_meta( $post_id, $field, sanitize_text_field( $new ) );
    } elseif ( ” == $new && $old ) {
    delete_post_meta( $post_id, $field, sanitize_text_field ( $old ) );
    }

    }

    } // foreach( $kamn_meta_boxes as $meta_box ) [/PHP]

    When I publish/update a post, the loop checks for $_POST[$field] to define $new variable, where $field is kamn_post_media_meta_control, kamn_post_sidebar, kamn_slide_caption_control etc.

    The problem is, not all of these $field exist as index in $_POST, in my case non-existent appear to be:

    • kamn_post_sidebar
    • kamn_slide_caption_control
    • kamn_slide_link
    • kamn_slide_link_target
    • kamn_service_icon

    And I get Notices for every of those 5 twice (in two loops).

    Notice text is standard (xdebug enabled):
    [PHP]Notice: Undefined index: kamn_post_sidebar in …wp-contentthemescontangolibmodules.php on line 728[/PHP]

    My fix to this was to replace this line
    [PHP]$new = $_POST[$field];[/PHP]
    with this:
    [PHP]$new = isset( $_POST[$field] ) ? $_POST[$field] : ”;[/PHP]

    Then Notices are gone.

    What can you say about this? What am I doing wrong so only I encounter the notices? :)

    If it is a real issue (it seems to me it is), you will fix it in next release, right? I don’t have to note my findings for recurrent editing new releases?

    Thanks!

    #1325
    admin
    Participant

    [USER=324]@bohdan[/USER] – Thanks a lot for your feedback.

    DesignOrbital Update Track

    I am hopeful that update track for DesignOrbital themes will start from July with existing fixes and new features.

    One again thanks!

    #1326
    admin
    Participant

    [USER=324]@bohdan[/USER],

    Quote:
    Just bought the theme and found a glitch which arises while WP_DEBUG = true.

    We are very much thankful to you about your valuable feedbacks. I am also happy to share that PHP Notices are fixed in the latest release of Contango 5.1. You may be interested to see the Contango 5.1 update details in the following thread.

    http://designorbital.com/community/threads/wordpress-4-0-and-designorbital-themes.233/

    Thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.