If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
  • #14945


    I’m not sure that you can help me just yet, as we haven’t uploaded wordpress to our internet server, I’ve only loaded it onto my computer.

    I’ve included a couple of links so you can see the error I’m receiving.

    The warning I’m getting is:

    Warning: Creating default object from empty value in C:xampphtdocsmysitewp-contentthemescoherencefunctions-coherence.php on line 56

    This is what my page looks like on the portfolio page as well as the homepage:


    Using the forward and back arrows won’t cycle through the folio posts.

    Here is the code for the page:


    Let me know if there is any more information I can provide.

    I have reset wordpress, re-uploaded the theme and nothing has changed.

    Even if I include dummy content from the wordpress theme option, it still won’t work.

    Please help!




    Hi Marty,

    I’m not sure why that error appears, but can you post the code of your functions-coherence.php from line 50-60?




    Hi Ismael,

    Here is the code, 32-76

    //check if the portfolio item was requested by an ajax call and returns that


    add_action(‘wp_ajax_avia_check_portfolio’, ‘avia_check_ajax_request’);

    add_action(‘wp_ajax_nopriv_avia_check_portfolio’, ‘avia_check_ajax_request’);

    function avia_check_ajax_request()


    if(!isset($_POST)) return false;

    global $avia_config, $more;

    $avia_config = false;

    $id = $_POST;

    global $post;

    $post = get_post( $id );


    $more = 0;

    $slider = new avia_slideshow($id);

    $slider -> setImageSize(‘fullsize’);

    $data->slider = $slider->display();

    echo “<div class=’ajax_slide ajax_slide_”.$id.”‘ data-slide-id='”.$id.”‘ >”;

    echo “<div class=’inner_slide’>”;

    echo “<div class=’flex_column two_third first’>”;

    echo $data->slider;

    echo “</div>”;

    echo “<div class=’portfolio-entry one_third’>”;

    echo avia_title($id, false, “”);

    echo “<div class=’entry-content’>”;

    $meta = avia_portfolio_meta($id);



    echo $meta;

    echo avia_advanced_hr(false, ‘hr_small’);




    Checking my function-coherence.php, I noticed that we have different line of codes. Did you add something on the file prior to this error?




    Hi Ismael,

    I haven’t changed the file or touched it.

    Perhaps I should re-download the theme?




    Hi Ismael,

    I’ve just re-downloaded the theme and checked the file, seems to be the same.

    What needs to be done to fix it?




    Hi Marty,

    As of now, I’m not sure how we can fix it, but rest assured that we will try to help you fix this. Just to confirm, in the code you have given above, is this the code in line 56?

    echo "<div class='entry-content'>"




    Hi Ismael,

    I’m viewing the code in Dreamweaver, so not sure if that makes the lines of code different.

    What I see on line 56 is:

    $data->slider = $slider->display();

    echo “<div class=’entry-content’>” occurs on line 69




    Hey Marty,

    If you are using php version 5.4, try switching your local setup to use 5.3.




    Hi Devin,

    I am seeing a similar problem with the Choices theme when click on portfolio image to get ajax effect.

    Warning: Creating default object from empty value in C:Program Files (x86)Apache Software FoundationApache2.2htdocswordpress2wp-contentthemeschoicesfunctions-choices.php on line 59

    I have tried a fresh wordpress install without any other plugins a got the same result. The theme was downloaded last weekend.

    Using Apache 2.2.22 (win32) / php 5.4.0.

    Any help would be appreciated.




    Hi Greg,

    I’m tagging this for the rest of the support team to see they can provide some assistance to you as well.




    Hi Greg,

    If you aren’t able to set the php version to a 5.3, I did notice an odd space right around there in the file. Open up functions-choices and go to line 58. Look for:

    $slider -> setImageSize('fullsize');

    and replace it with:


    I’ll check into it a bit further but give that a quick try.




    Hi Devin,

    Thanks for the reply, I can confirm a few things.

    1. Changing the above line of code made no difference.

    2. I have turned on the php debug for further information below which may assist you.

    Call Stack

    # Time Memory Fuction Location

    1 0.0016 148528 {main}( ) ..admin-ajax.php:0

    2 0.6890 14168488 do_action( ) ..admin-ajax.php:66

    3 0.6890 14169400 call_user_func_array ( ) ..plugin.php:403

    4 0.6891 14169416 avia_check_ajax_request( ) ..plugin.php:403

    3. I have tried installing Choices theme on a computer with php v5.3 and it works fine.

    Do you intend to fix this for php v5.4?




    Hey Greg,

    I’ve asked Kriesi the same question since I’m not able to give a firm yes or no. I know most servers are still running a version of 5.3 so I’m not sure if he will be or not but I imagine at some point in the future he would need to I think it is just a matter of when.





    I will test the theme localy on a 5.4 server and include an update that should fix any issues

    Best regards,



    Hi all,

    just wanted to give you a progress report. As per Devin’s suggestion, I installed php 5.3, which mostly fixed the issue of the warning.

    However, the home page is not functioning correctly. The forward, back and close buttons appear above the image frame, when it should be next to it.

    Here’s what it looks like without adding a horizontal ruler to the front page template:


    Here’s what it looks like with a horizontal ruler (this is the only way I can make this look ok)


    I’ll live with it for now, but hopefully this issue will be addressed before the site goes live.




    Hey! Actually I have problems reproducing your issue.

    I am running Mamp on php 5.4.4 and it runs without any errors :/

    But guessing from the error message mentioned above:

    change $data->slider = $slider->display();


    $sliderHTML = $slider->display();

    and a few lines bellow

    echo $data->slider;


    echo $sliderHTML;

Viewing 17 posts - 1 through 17 (of 17 total)

The topic ‘Coherence Portfolio not functioning properly’ is closed to new replies.