litespeedtech / lscache-joomla

LSCache plugin for Joomla
30 stars 18 forks source link

call to a member function purgeprivate() on null #42

Closed uglyeoin closed 10 months ago

uglyeoin commented 3 years ago

I am using Joomla! and J2Store however I am getting this error. I can confirm this also happens on Joomla without J2store.

It locks the user out and disabled their account in Joomla.

call to a member function purgeprivate() on null

I went into cPanel and I went to Terminal and I did a search by copying and pasting this (right click to paste)

grep -Ri purgeprivate public_html

It returns

$this->plugin->lscInstance->purgePrivate("com_virtuemart.cart");

I am not using Virtumart I am using J2store.

Please could you explain what the issue is? If I disable the Litespeed Cache plugin will this solve my problem?

uglyeoin commented 3 years ago

BUMP

M-Falken commented 3 years ago

Hi I do not have this issue But just set the plugin off, just to see if the issue remain ?

I see that you've already ask for this elsewhere : https://www.joomlaworks.net/forum/k2-en/58363-call-to-a-member-function-purgeprivate-on-null#178408

But finally this issue seems not related at all with the lscache plugin https://www.joomlaworks.net/forum/k2-en/58363-call-to-a-member-function-purgeprivate-on-null?start=10#178673

The reason why this also happens without J2store is that because the purgePrivate https://github.com/litespeedtech/lscache-joomla/blob/c7e502e62ea99090034089a6da4cd4105ecd348a/lscache_plugin/components/com_virtuemart.php#L60

Is probably not the one that cause this error, but this next one could explain perhaps the "It locks the user out and disabled their account in Joomla." https://github.com/litespeedtech/lscache-joomla/blob/c7e502e62ea99090034089a6da4cd4105ecd348a/lscache_plugin/lscache.php#L549 Anyway disable the plugin, then test without it.

Regards

uglyeoin commented 3 years ago

I have set the plugin to disabled and the problem remains. When I turn error reporting on it says it's the plugin causing it.

It also disables users when they login.

M-Falken commented 3 years ago

Uninstall the plugin all to test, because if disabled it must not do anything.

uglyeoin commented 3 years ago

We renamed the folder plugins/system/lscache and that solved our problem. Perhaps the plugin was not disabled but the component was. I have reported this before.

uglyeoin commented 2 years ago

This is still an ongoing issue. It's been 6 months. Is there a solution? We can't have websites where our admins can't manage the sites.

This has happened on a lot of sites so I agree with your sentiment that it's related to the joomla.login line that you referenced.

uglyeoin commented 2 years ago

Did this problem ever get fixed?

uglyeoin commented 2 years ago

We are now over a year and a half and still no response, is this still an issue or has it been fixed? Is this plugin being developed? I'm trying to assess whether the benefit of Litespeed server is lost on Joomla!

uglyeoin commented 2 years ago

Perhaps this information helps? It's a PHP error message that is generated when this occurs.

A PHP Exception occurred on your site. Here you can find the stack trace:
Exception Type: Error
File: /home/*****/public_html/plugins/system/lscache/lscache.php
Line: 468
Message: Call to a member function purgePrivate() on null 
#0 /home//*****/public_html/libraries/joomla/event/event.php(70): plgSystemLSCache->onUserLoginFailure(Array)
#1 /home//*****/public_html/libraries/joomla/event/dispatcher.php(160): JEvent->update(Array)
#2 /home//*****/public_html/libraries/src/Application/BaseApplication.php(108): JEventDispatcher->trigger('onuserloginfail...', Array)
#3 /home//*****/public_html/libraries/src/Application/CMSApplication.php(932): Joomla\CMS\Application\BaseApplication->triggerEvent('onUserLoginFail...', Array)
#4 /home//*****/public_html/libraries/src/Application/AdministratorApplication.php(331): Joomla\CMS\Application\CMSApplication->login(Array, Array)
#5 /home//*****/public_html/administrator/components/com_login/controller.php(64): Joomla\CMS\Application\AdministratorApplication->login(Array, Array)
#6 /home//*****/public_html/libraries/src/MVC/Controller/BaseController.php(702): LoginController->login()
#7 /home//*****/public_html/administrator/components/com_login/login.php(22): Joomla\CMS\MVC\Controller\BaseController->execute('login')
#8 /home//*****/public_html/libraries/src/Component/ComponentHelper.php(402): require_once('/home/allezandy...')
#9 /home//*****/public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/home/allezandy...')
#10 /home//*****/public_html/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent('com_login')
#11 /home//*****/public_html/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#12 /home//*****/public_html/libraries/src/Application/CMSApplication.php(225): Joomla\CMS\Application\AdministratorApplication->doExecute()
#13 /home//*****/public_html/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#14 {main}
Request information
GET variables
Array
(
)
POST variables
Array
(
    [username] => joomla_backup
    [passwd] => UTrUOerQ7Pyu
    [secretkey] => 1
    [option] => com_login
    [task] => login
    [return] => aW5kZXgucGhw
    [4aa367d5d542664c38d879b6ee11a54b] => 1
)
COOKIE variables
Array
(
    [e92d727da1f6ca12b36b9e40b2f22b6b] => 1772218ef2870a8083fcff42c6ee88f5
)
REQUEST variables
Array
(
    [username] => joomla_backup
    [passwd] => UTrUOerQ7Pyu
    [secretkey] => 1
    [option] => com_login
    [task] => login
    [return] => aW5kZXgucGhw
    [4aa367d5d542664c38d879b6ee11a54b] => 1
    [e92d727da1f6ca12b36b9e40b2f22b6b] => 1772218ef2870a8083fcff42c6ee88f5
)
SERVER variables
Array
(
    [PATH] => /usr/local/bin:/bin:/usr/bin
    [HTTP_ACCEPT] => */*
    [HTTP_ACCEPT_CHARSET] => *
    [HTTP_ACCEPT_LANGUAGE] => *
    [CONTENT_TYPE] => application/x-www-form-urlencoded
    [CONTENT_LENGTH] => 137
    [HTTP_COOKIE] => e92d727da1f6ca12b36b9e40b2f22b6b=1772218ef2870a8083fcff42c6ee88f5
    [HTTP_HOST] => [www./*****.co.uk](http://www./*****.co.uk/)
    [HTTP_REFERER] => https://www./*****.co.uk/
    [HTTP_USER_AGENT] => Opera/9.80 (Windows NT 5.1; MRA 5.7 (build 03773)) Presto/2.12.388 Version/12.14
    [HTTP_CACHE_CONTROL] => no-cache
    [DOCUMENT_ROOT] => /home//*****/public_html
    [REMOTE_ADDR] => 193.176.31.8
    [REMOTE_PORT] => 25520
    [SERVER_ADDR] => 5.134.13.32
    [SERVER_NAME] => [www./*****.co.uk](http://www./*****.co.uk/)
    [SERVER_ADMIN] => [webmaster@/*****.co.uk](mailto:webmaster@/*****.co.uk)
    [SERVER_PORT] => 443
    [REQUEST_SCHEME] => https
    [REQUEST_URI] => /administrator/index.php
    [HTTPS] => on
    [SSL_PROTOCOL] => TLSv1.2
    [SSL_CIPHER] => ECDHE-RSA-AES256-GCM-SHA384
    [SSL_CIPHER_USEKEYSIZE] => 256
    [SSL_CIPHER_ALGKEYSIZE] => 256
    [SCRIPT_FILENAME] => /home//*****/public_html/administrator/index.php
    [QUERY_STRING] => 
    [SCRIPT_URI] => https://www./*****.co.uk/administrator/index.php
    [SCRIPT_URL] => /administrator/index.php
    [SCRIPT_NAME] => /administrator/index.php
    [SERVER_PROTOCOL] => HTTP/1.1
    [SERVER_SOFTWARE] => LiteSpeed
    [REQUEST_METHOD] => POST
    [X-LSCACHE] => on,crawler
    [PHP_SELF] => /administrator/index.php
    [REQUEST_TIME_FLOAT] => 1663237852.2869
    [REQUEST_TIME] => 1663237852
)
WuhuaChen commented 10 months ago

it has been fixed in latest release