Support » Plugin: WordPress Simple Ecommerce Shopping Cart Plugin- Sell products through Paypal » Error: deprecated constructor, static method – simple-e-commerce-shopping-cart

  • Resolved inlate

    (@inlate)


    Hi,

    after a WordPress update I receive the following errors, even though I disable all others plugins and switched to the Twenty Twelve theme.

    Thank you,
    Rickyx

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece __construct()
    . in /home/crickyx/public_html/zibaldoni/wp-includes/functions.php on line 3457
    Call Stack
    # Time Memory Function Location
    1 0.0000 237640 {main}( ) ../index.php:0
    2 0.0001 238096 require( ‘/home/crickyx/public_html/zibaldoni/wp-blog-header.php’ ) ../index.php:17
    3 0.0001 238760 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-load.php’ ) ../wp-blog-header.php:12
    4 0.0001 239416 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-config.php’ ) ../wp-load.php:37
    5 0.0001 240592 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-settings.php’ ) ../wp-config.php:104
    6 0.1077 7990536 do_action( ) ../wp-settings.php:353
    7 0.1186 8002312 call_user_func_array:{/home/crickyx/public_html/zibaldoni/wp-includes/plugin.php:503} ( ) ../plugin.php:503
    8 0.1186 8002488 wp_widgets_init( ) ../plugin.php:503
    9 0.1200 8043568 do_action( ) ../default-widgets.php:1649
    10 0.1200 8045240 call_user_func_array:{/home/crickyx/public_html/zibaldoni/wp-includes/plugin.php:503} ( ) ../plugin.php:503
    11 0.1200 8045304 SimpleEcommCart->registerCartWidget( ) ../plugin.php:503
    12 0.1200 8045400 register_widget( ) ../SimpleEcommCart.php:725
    13 0.1200 8045448 WP_Widget_Factory->register( ) ../widgets.php:720
    14 0.1200 8045656 SimpleEcommCartCartWidget->SimpleEcommCartCartWidget( ) ../widgets.php:591
    15 0.1200 8046512 WP_Widget->WP_Widget( ) ../SimpleEcommCartCartWidget.php:8
    16 0.1200 8046880 _deprecated_constructor( ) ../widgets.php:176
    17 0.1201 8047368 trigger_error ( ) ../functions.php:3457

    ( ! ) Strict standards: Non-static method SimpleEcommCartSession::_start() should not be called statically in /home/crickyx/public_html/zibaldoni/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCartSession.php on line 84
    Call Stack
    # Time Memory Function Location
    1 0.0000 237640 {main}( ) ../index.php:0
    2 0.0001 238096 require( ‘/home/crickyx/public_html/zibaldoni/wp-blog-header.php’ ) ../index.php:17
    3 0.0001 238760 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-load.php’ ) ../wp-blog-header.php:12
    4 0.0001 239416 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-config.php’ ) ../wp-load.php:37
    5 0.0001 240592 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-settings.php’ ) ../wp-config.php:104
    6 0.1077 7990536 do_action( ) ../wp-settings.php:353
    7 0.1251 8111944 call_user_func_array:{/home/crickyx/public_html/zibaldoni/wp-includes/plugin.php:503} ( ) ../plugin.php:503
    8 0.1251 8112680 SimpleEcommCart->init( ) ../plugin.php:503
    9 0.1435 10784352 SimpleEcommCart->initCart( ) ../SimpleEcommCart.php:226
    10 0.1435 10784504 SimpleEcommCartSession::get( ) ../SimpleEcommCart.php:644
    11 0.1435 10784616 SimpleEcommCartSession::_init( ) ../SimpleEcommCartSession.php:47

    ( ! ) Strict standards: Only variables should be passed by reference in /home/crickyx/public_html/zibaldoni/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCartSession.php on line 93
    Call Stack
    # Time Memory Function Location
    1 0.0000 237640 {main}( ) ../index.php:0
    2 0.0001 238096 require( ‘/home/crickyx/public_html/zibaldoni/wp-blog-header.php’ ) ../index.php:17
    3 0.0001 238760 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-load.php’ ) ../wp-blog-header.php:12
    4 0.0001 239416 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-config.php’ ) ../wp-load.php:37
    5 0.0001 240592 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-settings.php’ ) ../wp-config.php:104
    6 0.1077 7990536 do_action( ) ../wp-settings.php:353
    7 0.1251 8111944 call_user_func_array:{/home/crickyx/public_html/zibaldoni/wp-includes/plugin.php:503} ( ) ../plugin.php:503
    8 0.1251 8112680 SimpleEcommCart->init( ) ../plugin.php:503
    9 0.1435 10784352 SimpleEcommCart->initCart( ) ../SimpleEcommCart.php:226
    10 0.1435 10784504 SimpleEcommCartSession::get( ) ../SimpleEcommCart.php:644
    11 0.1435 10784616 SimpleEcommCartSession::_init( ) ../SimpleEcommCartSession.php:47
    12 0.1437 10786160 SimpleEcommCartSession::_start( ) ../SimpleEcommCartSession.php:84

    ( ! ) Notice: Trying to get property of non-object in /home/crickyx/public_html/zibaldoni/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCart.php on line 816
    Call Stack
    # Time Memory Function Location
    1 0.0000 237640 {main}( ) ../index.php:0
    2 0.0001 238096 require( ‘/home/crickyx/public_html/zibaldoni/wp-blog-header.php’ ) ../index.php:17
    3 0.1664 11468008 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-includes/template-loader.php’ ) ../wp-blog-header.php:16
    4 0.1776 11793264 include( ‘/home/crickyx/public_html/zibaldoni/wp-content/themes/twentytwelve/index.php’ ) ../template-loader.php:75
    5 0.1776 11793320 get_header( ) ../index.php:17
    6 0.1776 11793904 locate_template( ) ../general-template.php:45
    7 0.1776 11794168 load_template( ) ../template.php:514
    8 0.1777 11825224 require_once( ‘/home/crickyx/public_html/zibaldoni/wp-content/themes/twentytwelve/header.php’ ) ../template.php:555
    9 0.1906 11875776 wp_nav_menu( ) ../header.php:45
    10 0.1908 11883120 call_user_func:{/home/crickyx/public_html/zibaldoni/wp-includes/nav-menu-template.php:307} ( ) ../nav-menu-template.php:307
    11 0.1908 11883256 wp_page_menu( ) ../nav-menu-template.php:307
    12 0.1911 11889888 wp_list_pages( ) ../post-template.php:1245
    13 0.1912 11894776 apply_filters( ) ../post-template.php:1133
    14 0.1912 11896352 call_user_func_array:{/home/crickyx/public_html/zibaldoni/wp-includes/plugin.php:213} ( ) ../plugin.php:213
    15 0.1912 11896664 SimpleEcommCart->hideStorePages( ) ../plugin.php:213

    https://wordpress.org/plugins/simple-e-commerce-shopping-cart/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author n.showket

    (@nshowketgmailcom)

    Uninstal the plugin and delete files then install again from scratch

    I did it but the error persist.

    Do you have other tests to do?

    Thank you,
    Rickyx

    Plugin Author n.showket

    (@nshowketgmailcom)

    email ( n.showket@gmail.com ( me your admin details. I will sort it out for you

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @n.showket, inlate has created this thread here on the WordPress.org support forums so that you can provide support in this thread. Do you have any other troubleshooting tests to recommend?

    Plugin Author n.showket

    (@nshowketgmailcom)

    no , I dont see any issue with my plugin on the latest wordpress version.

    We changed in your plugin ( SimpleEcommCartCartWidget.php ) the lines:

    class SimpleEcommCartCartWidget extends WP_Widget {
    
      private $_items = array();
    
    	public function SimpleEcommCartCartWidget() {
        $widget_ops = array('classname' => 'SimpleEcommCartCartWidget', 'description' => 'Sidebar shopping cart for SimpleEcommCart' );
        $this->WP_Widget('SimpleEcommCartCartWidget', 'Simple eCommerce shopping cart', $widget_ops);
      }

    to:

    class SimpleEcommCartCartWidget extends WP_Widget {
    
      private $_items = array();
    
    	public function SimpleEcommCartCartWidget() {
        WP_Widget::__construct (false, 'SimpleEcommCartCartWidget', array('description'=> 'Sidebar shopping cart for SimpleEcommCart') );
      }

    As in:
    https://developer.wordpress.org/reference/classes/wp_widget/__construct/

    Do you think this change is correct?
    This should solve our first error (deprecated constructor) and should work in other installations.

    Thank you,
    Rickyx

    For the others error I updated all wordpress, theme ecc…

    All the errors mentioned are caused by strict mode: I post them again to better clarify the errors.
    You can see the errors if the website shows debug info and is not in production mode.

    Again, thank you,
    Rickyx

    Strict 	Non-static method SimpleEcommCartSession::_start() should not be called statically on line 84 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCartSession.php
    Strict 	Only variables should be passed by reference on line 93 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCartSession.php
    Strict 	Only variables should be passed by reference on line 95 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCartSession.php
    Strict 	call_user_func_array() expects parameter 1 to be a valid callback, non-static method SimpleEcommCartAdmin::reportsPage() should not be called statically on line 503 in file wp/wp-includes/plugin.php
    Strict 	Non-static method SimpleEcommCartCommon::isRegistered() should not be called statically on line 98 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/models/SimpleEcommCartCommon.php
    Warning 	imagepng(wp/wp-content/plugins/simple-e-commerce-shopping-cart/ChartFolder/monthly2015.png): failed to open stream: Permission denied on line 284 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/libchart/classes/view/plot/Plot.php
    Notice 	Undefined index: Almanacco on line 410 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/admin/reports.php
    Notice 	Undefined index: Leopardi cinese on line 410 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/admin/reports.php
    Warning 	imagepng(wp/wp-content/plugins/simple-e-commerce-shopping-cart/ChartFolder/individual11.png): failed to open stream: Permission denied on line 284 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/libchart/classes/view/plot/Plot.php
    Plugin Author n.showket

    (@nshowketgmailcom)

    Since your download of my plugin 2 months back. There are so many users downloaded and active site went live. None of them has this issue.

    I believe you have some other issue with your wordpress setup. If you email me your details, I can resolve the issue. I provide these type of support to my users.

    Thanks
    Niaz

    We removed not only the plugin but the digitalproducts folder and the database tables and now we can use the plugin.

    The simpleecommcart folder and the subfolder is created with a different owner (flcdmpe) than the standard (fle): our hosting updated the permissions correctly but changed the owner. That is the reason of the:

    Warning imagepng(wp/wp-content/plugins/simple-e-commerce-shopping-cart/ChartFolder/individual11.png):
    failed to open stream:
    Permission denied on line 284 in file wp/wp-content/plugins/simple-e-commerce-shopping-cart/libchart/classes/view/plot/Plot.php

    Now is fixed and it works!
    All the warnings because of strict mode persist but is ok.

    I think is all,
    thank you for your support offer,
    Riccardo

    Hi People, need help as well. I cannot access login loop
    After I put in wp_config define(‘WP_DEBUG’, true); i received this :

    (english) Notice: The method of construction recalled for WP_Widget is deprecated from version 4.3.0! To use instead
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /web/htdocs/www.idreamgreece.com/home/wp-includes/functions.php on line 3624
    Errore sul database di WordPress: [INSERT,UPDATE command denied to user ‘Sql843078’@’62.149.145.104’ for table ‘wp_options’]
INSERT INTO wp_options (option_name, option_value, autoload) VALUES (‘_transient_doing_cron’, ‘1460329063.3024609088897705078125’, ‘yes’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload)
    Errore sul database di WordPress: [INSERT,UPDATE command denied to user ‘Sql843078’@’62.149.145.104’ for table ‘wp_wfConfig’]
insert into wp_wfConfig (name, val) values (‘totalLoginHits’, ‘7914’) ON DUPLICATE KEY UPDATE val=’7914′

    I went in fuction.php and i found this

    line 3624
    if ( WP_DEBUG && apply_filters( ‘deprecated_constructor_trigger_error’, true ) ) {
    if ( function_exists( ‘__’ ) ) {
    trigger_error( sprintf( __( ‘The called constructor method for %1$s is deprecated since version %2$s! Use %3$s instead.’ ), $class, $version, ‘

    __construct()

    ‘ ) );
    } else {
    trigger_error( sprintf( ‘The called constructor method for %1$s is deprecated since version %2$s! Use %3$s instead.’, $class, $version, ‘

    __construct()

    ‘ ) );
    }
    Can you tell me a bit more

    Thank you

    Lorenzi

    Plugin Author n.showket

    (@nshowketgmailcom)

    Please check the inlate’s reply.
    Thanks
    Niaz

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Error: deprecated constructor, static method – simple-e-commerce-shopping-cart’ is closed to new replies.