• Resolved jwonlineuk

    (@jwonlineuk)


    Hi there,

    I’m coming up with the following error:

    Warning: Creating default object from empty value in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\events-manager\classes\em-category-taxonomy.php on line 22

    on all single category and tag pages. This occurs in all themes, with only EM enabled. I notice this problem has been mentioned a few times but I can’t seem to find any solution. Does anyone have any ideas?

    Cheers,
    James

    https://www.ads-software.com/plugins/events-manager/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    quick fix is to disable php display_error and since everything is working fine except for this warning?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    can you provide us with a screenshot of your settings for Events > Settings > Pages > Event Categories

    have you tried this with other plugins deactivated to see if it helps?

    Thread Starter jwonlineuk

    (@jwonlineuk)

    Thanks for the quick replies. See below for the screenshot. This occurs with only Events Manager activated. Today’s update unfortunately hasn’t made a difference.

    Screenshot

    Cheers,
    James

    Do you have a page assigned for tags?

    Thread Starter jwonlineuk

    (@jwonlineuk)

    Yes, I do.

    Tags Screenshot

    Thanks for your time looking into this.

    Cheers,
    James

    Plugin Support angelo_nwl

    (@angelo_nwl)

    can’t seems to replicate this issue; can you give us some steps on how to replicate this?

    thanks

    Thread Starter jwonlineuk

    (@jwonlineuk)

    It occurs on any single category or tag I select from the Categories or Tags page. Unfortunately, I’m not sure how much more helpful information I can give. This occurs both with and without my own template overrides included. Do say if there is anything else that would be useful to know.

    Thanks,
    James

    Hiya James,

    Could you tell me if tags and categories are enabled in Events > Settings > General > General Options please?

    Also, can you confirm if you’re on the latest versions of both WP and EM?

    Thanks,
    Phil

    //sorry fo my bad english
    this works for me:
    replace this on line 22:

    $wp_query->post->post_title = $wp_query->posts[0]->post_title = $wp_query->queried_object->post_title = $EM_Category->output(get_option('dbem_category_page_title_format'));

    For this:

    $wp_query->post->post_title = $wp_query->posts[0]->post_title = $EM_Category->output(get_option('dbem_category_page_title_format'));

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    //i hope that this will be a good solution

    Thread Starter jwonlineuk

    (@jwonlineuk)

    Thanks for the replies. I can confirm that tags and categories are both enabled, I’m using WP 3.6, and EM 5.5.1.

    Algomx, your fix stopped the error on line 22, but there is now another identical error on line 24.

    Thanks,
    James

    jwonlineuk //i use wordpress seo this make that function don’t show errors to me but this can help

    change line 24 this:
    $wp_query->post->post_parent = $wp_query->posts[0]->post_parent = $wp_query->queried_object->post_parent = $EM_Category->output(get_option(‘dbem_categories_page’));

    for:
    $wp_query->post->post_parent = $wp_query->posts[0]->post_parent = $EM_Category->output(get_option(‘dbem_categories_page’));

    regards

    Thread Starter jwonlineuk

    (@jwonlineuk)

    Thanks very much. Could you explain what, if any, functionality I’ll be losing by making these changes?

    Cheers,
    James

    It’s just a different way of getting the data, you won’t lose or change anything visible. That said, it’s always a good idea to keep a backup of files you change.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Warning: Creating default object from empty value…’ is closed to new replies.