X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Errors with custom skin (https://forum.x-cart.com/showthread.php?t=72546)

Phil Richman 08-06-2015 04:52 PM

Huge xlite log 3 common warnings
 
My xlite log is growing into a huge file. In one day this log file grew to almost 1million lines. It seems to be the same 3 warnings repeated. They are the following:

Aug 06 21:41:56 XLite [warning] Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'XLite\Module\Pmall\PmallSkin\Main' does not have a method 'getLayoutTypes' in /home/plumbing/public_html/var/run/classes/XLite/Model/ModuleAbstract.php on line 410
Runtime id: c6f1c9905bf908d413a1481b1274611c;
Server API: cgi-fcgi; IP: 72.46.130.42;
Request method: GET;
URI: /;

Aug 06 21:41:56 XLite [warning] Warning: array_intersect(): Argument #1 is not an array in /home/plumbing/public_html/var/run/classes/XLite/Core/LayoutAbstract.php on line 539
Runtime id: c6f1c9905bf908d413a1481b1274611c;
Server API: cgi-fcgi; IP: 72.46.130.42;
Request method: GET;
URI: /;

Aug 06 21:41:56 XLite [warning] Warning: in_array() expects parameter 2 to be array, null given in /home/plumbing/public_html/var/run/classes/XLite/Core/LayoutAbstract.php on line 552
Runtime id: c6f1c9905bf908d413a1481b1274611c;
Server API: cgi-fcgi; IP: 72.46.130.42;
Request method: GET;
URI: /;


Any ideas of how to fix these?

Phil Richman 08-06-2015 04:53 PM

Errors with custom skin
 
My xlite log is growing into a huge file. In one day this log file grew to almost 1million lines. It seems to be the same 3 warnings repeated. They are the following:

Aug 06 21:41:56 XLite [warning] Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'XLite\Module\Pmall\PmallSkin\Main' does not have a method 'getLayoutTypes' in /home/plumbing/public_html/var/run/classes/XLite/Model/ModuleAbstract.php on line 410
Runtime id: c6f1c9905bf908d413a1481b1274611c;
Server API: cgi-fcgi; IP: 72.46.130.42;
Request method: GET;
URI: /;

Aug 06 21:41:56 XLite [warning] Warning: array_intersect(): Argument #1 is not an array in /home/plumbing/public_html/var/run/classes/XLite/Core/LayoutAbstract.php on line 539
Runtime id: c6f1c9905bf908d413a1481b1274611c;
Server API: cgi-fcgi; IP: 72.46.130.42;
Request method: GET;
URI: /;

Aug 06 21:41:56 XLite [warning] Warning: in_array() expects parameter 2 to be array, null given in /home/plumbing/public_html/var/run/classes/XLite/Core/LayoutAbstract.php on line 552
Runtime id: c6f1c9905bf908d413a1481b1274611c;
Server API: cgi-fcgi; IP: 72.46.130.42;
Request method: GET;
URI: /;


Any ideas of how to fix these?

seyfin 08-06-2015 10:17 PM

Re: Errors with custom skin
 
I guess the issue is related to a third-party skin "Pmall skin", and your X-Cart store has been upgraded from 5.1.11 to 5.2.6. recently?

seyfin 08-06-2015 11:14 PM

Re: Errors with custom skin
 
Check etc/config.php file in your X-Cart installation, [log_details] section.

For default X-Cart installation, the settings look like below:

[log_details]
type = file
name = "var/log/xlite.log.php"
level = LOG_WARNING
ident = "XLite"
suppress_errors = On
suppress_log_errors = Off

Please let me know what you see in [log_details] section in your etc/config.php file.

Phil Richman 08-07-2015 02:08 AM

Re: Errors with custom skin
 
[log_details]
type = file
name = "var/log/xlite.log.php"
level = PEAR_LOG_WARNING
ident = "XLite"
suppress_errors = On
suppress_log_errors = Off

Phil Richman 08-07-2015 02:09 AM

Re: Errors with custom skin
 
I did just recently upgrade from 5.1.11 to 5.2.6. Just out of curiosity what indicated that to you?

seyfin 08-07-2015 02:40 AM

Re: Errors with custom skin
 
I believe the issue is related to your custom skin that is not compatible with the new X-Cart version 5.2.6. Try to disable the skin module in your X-Cart admin back-end to verify my guess.

If that is the case, you will need your custom skin adopted to be compatible with the new X-Cart version 5.2.6. Specifically, for your customer skin, you will need to develop getLayoutTypes() method for class 'XLite\Module\Pmall\PmallSkin\Main', in order to fix the errors, for example:

Code:

    public static function getLayoutTypes()
    {
        return \XLite\Core\Layout::getInstance()->getLayoutTypes();
    }


See also:
* X-Cart 5 Developer docs

Phil Richman 08-07-2015 03:51 AM

Re: Errors with custom skin
 
That seems to have worked for that error. I'm also getting:

Aug 07 08:34:40 XLite [warning] Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'XLite\Module\Pmall\PmallSkin\Main' does not have a method 'getLayoutColors' in /home/plumbing/public_html/var/run/classes/XLite/Model/ModuleAbstract.php on line 410
Runtime id: 601345cea7052c3abc2d7dbde246d0f1;
Server API: cgi-fcgi; IP: 66.249.65.233;
Request method: GET;
URI: /?target=product&url=liberty-ascent-ii-upflush-toilet-package&last=&rest=&ext=;

Would this be a similar fix?

seyfin 08-08-2015 09:51 PM

Re: Errors with custom skin
 
Try to implement the following code for class 'XLite\Module\Pmall\PmallSkin\Main':

Code:

    const COLOR_SCHEME_STANDARD = 'Standard';
    public static function getLayoutColors()
    {
        return array(
            static::COLOR_SCHEME_STANDARD => \XLite\Core\Translation::lbl('Pmall'),
        );
    }



All times are GMT -8. The time now is 09:54 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.