params= new JRegistry(); $this->params->loadString($plugin->params, 'JSON'); $this->_cacheEnabled = $this->params->get('cache_enabled'); if ($this->_cacheEnabled === null) $this->_cacheEnabled == 1; $this->_autoflush = $this->params->get('autoFlush'); if ($this->_autoflush === null) $this->_autoflush = 1; $this->_autoflush3rdParty = $this->params->get('autoFlush-ThirdParty'); if ($this->_autoflush3rdParty === null) $this->_autoflush3rdParty = 1; $this->_autoflushClientSide = $this->params->get('autoFlush-ClientSide'); if ($this->_autoflushClientSide === null) $this->_autoflushClientSide = 0; } /** * Heartbeat cache checking function. Will also monitor $_GET for the jSGCache parameter * (pressing the purge cache button in admin) * * * @access public * @return null */ public function onAfterInitialise() { if (!$this->_cacheEnabled || $this->_isBlacklisted($this->_applicationPath)) { JResponse::setHeader('X-Cache-Enabled','False',true); return; } if ($this->_cacheEnabled) { JResponse::allowCache(true); JResponse::setHeader('X-Cache-Enabled','True',true); } //Init the application url $this->_applicationPath = str_replace(array('administrator/index.php','index.php'),'',str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME'])); //Check for any admin action and proceed to flushMonitor and 3rd party plugins if ( isset($_POST['task']) || isset($_GET['task']) || isset($_GET['cart_virtuemart_product_id'])) { $this->_flushMonitor(); if ($this->_autoflush3rdParty) $this->_monitorThirdPartyPlugins(); } //Check if we have a logged in user and enable cache bypass cookie 'task' => string 'user.login' $user = JFactory::getUser(); if (!$user->guest || (isset($_POST['task']) && preg_match('/login/i', $_POST['task']))) { $_POST[JSession::getFormToken()] = 1; //Force the correct token, since the login box on the page is cached with the 1st visitors' token //Enable the cache bypass for logged users by setting a cache bypass cookie setcookie('jSGCacheBypass',1,time() + 6000,'/'); } if ($user->guest || (isset($_POST['task']) && $_POST['task'] == 'user.logout')) { //Remove the bypass cookie if not a logged user if (isset($_COOKIE['jSGCacheBypass'])) setcookie('jSGCacheBypass',0, time() - 3600,'/'); } // Handle purge button press when get has jSGCache=purge, but only in admin with a logged user if(isset($_GET['jSGCache']) && $_GET['jSGCache'] == 'purge' && JFactory::getApplication()->isAdmin() && !$user->guest ) $this->_purgeCache(true); } /** * Admin panel icon display * * @access public * @param string $context * @return array */ public function onGetIcons( $context ) { return array(array( 'link'=>'?jSGCache=purge', 'image'=>'refresh', 'text'=>JText::_('Purge jSGCache'), 'id'=>'jSGCache' )); } /** * Calls the cache server to purge the cache * * @access public * @param string|bool $message Message to be displayed if purge is successful. If this param is false no output would be done * @return null */ private function _purgeCache( $message = true ) { $purgeRequest = $this->_applicationPath . '(.*)'; // Construct the PURGE request $hostname = str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ); $purge_method = "PURGE"; $cacheServerSocket = fsockopen($hostname, 80, $errno, $errstr, 2); if(!$cacheServerSocket) { JError::raise(E_ERROR,500,JText::_('Connection to cache server failed!')); JError::raise(E_ERROR,500,JText::_($errstr ($errno))); return; } $request = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: {$_SERVER['SERVER_NAME']}\r\nConnection: Close\r\n\r\n"; if (preg_match('/^www\./',$_SERVER['SERVER_NAME'])) { $domain_no_www = preg_replace('/^www\./', '', $_SERVER['SERVER_NAME']); $request2 = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: {$domain_no_www}\r\nConnection: Close\r\n\r\n"; } else $request2 = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: www.{$_SERVER['SERVER_NAME']}\r\nConnection: Close\r\n\r\n"; fwrite($cacheServerSocket, $request); $response = fgets($cacheServerSocket); fclose($cacheServerSocket); $cacheServerSocket = fsockopen($hostname, 80, $errno, $errstr, 2); fwrite($cacheServerSocket, $request2); fclose($cacheServerSocket); if($message !== false) { if(preg_match('/200/',$response)) { if ($message === true) JFactory::getApplication()->enqueueMessage(JText::_('SG Cache Successfully Purged!')); else JFactory::getApplication()->enqueueMessage(JText::_( $message )); } else { JError::raise(E_NOTICE,501, JText::_('SG Cache: Purge was not successful!')); JError::raise(E_NOTICE,501, jText::_('Error: ' . $response)); } } } /** * Check if url is in caching blacklist * * @param string $applicationPath * * @return bool */ private function _isBlacklisted($applicationPath) { $blacklistArray = explode("\n",$this->params->get('blacklist')); $blacklistRegexArray = array(); $indexIsBlacklisted = false; foreach($blacklistArray as $key=>$row) { $row = trim($row); if ($row != '/' && $quoted = preg_quote($row,'/')) $blacklistRegexArray[$key] = $quoted; if ($row == '/') $indexIsBlacklisted = true; } if ($indexIsBlacklisted && $_SERVER['REQUEST_URI'] == $applicationPath) return true; if (empty($blacklistRegexArray)) return false; $blacklistRegex = '/('.implode('|',$blacklistRegexArray) . ')/i'; return preg_match($blacklistRegex, $_SERVER['REQUEST_URI']); } /** * 3rd party plugin monitor * * @access private * @return null */ private function _monitorThirdPartyPlugins() { // Kunena & K2 if ($this->params->get('autoFlush-ThirdParty') == 1 && isset($_POST['option']) && ($_POST['option']=='com_k2' || $_POST['option' ]== 'com_kunena')) { $this->_purgeCache(false); } // VirtueMart if ( (isset($_POST['option']) && $_POST['option'] == 'com_virtuemart') || ( isset($_GET['option']) && $_GET['option'] == 'com_virtuemart' ) || isset($_GET['cart_virtuemart_product_id']) ) { if($this->params->get('autoFlush-ThirdParty') == 1) $this->_purgeCache(false); } } /** * Action monitor * * @access private * @return null */ private function _flushMonitor() { $user = JFactory::getUser(); if ((!JFactory::getApplication()->isAdmin() && !$this->_autoflushClientSide) || $user->guest) return; $autoflush = $this->params->get('autoFlush'); if ($autoflush === null) $autoflush = 1; if (isset($_POST['task']) && $_POST['task'] && !in_array($_POST['task'],self::$_ignoreTasks) && $autoflush == 1) $this->_purgeCache(false); } } Community Support Forums - Sellacious
  Saturday, 17 October 2020
  13 Replies
  2.2K Visits
  Subscribe
hi guys!
hope everything is good for all!
I have a joomla 3.9.22 installed.
My database server is Mysql 5.7, with SQlite 3.28.0
The php version 7.3
I have started the installation from SQuickv2-Quickstart_v2.0.0-beta1.zip.
Everything seems ok with Sellacious 2.0 beta 1 (aparently).
After updating to 2.0 beta 3 (as is indicated at the instructions https://www.sellacious.com/documentation-v2#/learn/installuninstall/updating-sellacious) all products dissapears and this message appears:

Warning The products cache is outdated. You need to rebuild cache once after sellacious has been updated to a new version.

After rebuilding (cache button of the panel) those TWO messages appears:


Success The cache rebuild finished.
Warning The products cache is outdated. You need to rebuild cache once after sellacious has been updated to a new version.

and... no list of products, no buttons for managing...

Any idea about it? how can I get it to work?
Thanks a lot!!
Viridic
3 years ago
·
#5195
Hi,
Please check/send for any error in the cache log, you can find it in tmp folder.

Thanks.
3 years ago
·
#5197
Hi Indresh !

please see below the log. It appears at this path: mercados/administrator/logs/errors-2020-10-17.log


#<?php die('Forbidden.'); ?>
#Date: 2020-10-17 00:58:56 UTC
#Software: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

#Fields: datetime priority clientip category message
2020-10-17T00:58:56+00:00 CRITICAL (hidden IP) error Uncaught \Throwable of type Exception thrown. Stack trace: #0 /usr/home/viridicarium/www/mercados/libraries/src/MVC/Controller/BaseController.php(621): Joomla\CMS\MVC\Controller\BaseController->getView('login', 'json', 'loginView', Array)
#1 /usr/home/viridicarium/www/mercados/sellacious/components/com_login/controller.php(42): Joomla\CMS\MVC\Controller\BaseController->display(false, NULL)
#2 /usr/home/viridicarium/www/mercados/libraries/src/MVC/Controller/BaseController.php(710): LoginController->display()
#3 /usr/home/viridicarium/www/mercados/sellacious/components/com_login/login.php(21): Joomla\CMS\MVC\Controller\BaseController->execute('')
#4 /usr/home/viridicarium/www/mercados/libraries/src/Component/ComponentHelper.php(402): require_once('/usr/home/virid...')
#5 /usr/home/viridicarium/www/mercados/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/usr/home/virid...')
#6 /usr/home/viridicarium/www/mercados/sellacious/includes/libraries/application.php(206): Joomla\CMS\Component\ComponentHelper::renderComponent('com_login')
#7 /usr/home/viridicarium/www/mercados/sellacious/includes/libraries/application.php(251): JApplicationSellacious->dispatch()
#8 /usr/home/viridicarium/www/mercados/libraries/src/Application/CMSApplication.php(196): JApplicationSellacious->doExecute()
#9 /usr/home/viridicarium/www/mercados/sellacious/index.php(43): Joomla\CMS\Application\CMSApplication->execute()
#10 {main}

Thanks a lot!

Viridic
3 years ago
·
#5200
Hi,
I need cache log which you can find in tmp folder. pls find latest file named "s-cache-202010.......log"

Thanks
3 years ago
·
#5201
Hi Indresh!
thanks for your cooperation.
I have looked for the file named as you mention, and also have asked for it to my hosting supplier/provider. He have searched by FTP, by SSH...but the file does not exist.
May it be it stored in the tmp folder from the joomla installation?
Do you think than I can re-create it if I make a new installation and upgrade it?
Is there any parameter or configuration detail to force the log file creation??
thanks again!
viridic
3 years ago
·
#5206
Hi,
If you got cache rebuilt success message so you must have that file in tmp folder. If we can access that i might tell you what is the cause of cache not being created.
You can try fresh installation. Pls make sure you fulfil these requirements https://www.sellacious.com/documentation-v2#/learn/basics/system-requirements

Thanks.
3 years ago
·
#5210
Hi,
I have made a new installation (SQuick...beta1, with joomla 3.9.16 to v2.0.0-beta3 with joomla 3.9.22)
The same problem appears: Products and inventory crashes, no data. No rebuilding cache, and no log files in tmp folder.
All parameters of hosting are Ok for the requirements.
Can you take a look?
thanks!!
3 years ago
·
#5211
Hi,
Please try with joomla version 3.9.20, our system is updated according that only. If still problem continue reach me on chat support i like to have a look if any backend configuration.

Thanks.
3 years ago
·
#5212
Hi Indresh,
I will try this option, and will keep you informed. Thanks!!
Do you know when will be sellacious fully compatible with joomla 3.9.22 and newers?
Is there a timeline for compatibilities with joomla 4?

have a nice day!
thanks,
viridic
3 years ago
·
#5215
Hi,
Our next beta release will be Joomla 3.9.22 compatible. Not sure about Joomla 4 in couple of moths, but we are working in that direction.

Thanks.
3 years ago
·
#5527
Have exactly the same problems. Am on 3.9.24... and no logs found either. Asked the provider as well.
3 years ago
·
#5530
Hi,
Can you share me this cache log file after rebuilding cache, If this file is not present there pls contact me on chat ASAP.

https://www.sellacious.com/community-support?controller=attachment&task=download&tmpl=component&id=987

Thanks
3 years ago
·
#5539
Like viridic I do not have any s-cache*file.

I tried to install more than once... you see that on the printscreen.

Regards
3 years ago
·
#5540
Hi,
Can you install a fresh quickstart somewhere and don't do anything else, just reach me on chat or give me admin/pass in private message. I will look into it.

Thanks.
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
  • +1 (408) 821-8283
  • Email hello@sellacious.com