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
  Thursday, 30 July 2020
  12 Replies
  4.3K Visits
  Subscribe
Hi,

After Beta 3 installation,

In Sellacious backend: Go to User Profile / select no matter user (Sellers, All, Clients, ...) / and edit this user profile and you will get this warning message with nothing else: Warning #__sellacious_seller_timings' doesn't exist.

Could you reproduce it? Do you have something to fix it?
3 years ago
·
#4910
Accepted Answer
Hi, we are fixing this issue in next update, for now create these two tables manually.

CREATE TABLE IF NOT EXISTS `#__sellacious_seller_timings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_uid` int(11) NOT NULL,
`type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`week_day` int(11) NOT NULL,
`from_time` time NOT NULL DEFAULT '00:00:00',
`to_time` time NOT NULL DEFAULT '00:00:00',
`full_day` tinyint(1) DEFAULT NULL,
`slot_window` int(11) NOT NULL,
`slot_window_unit` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`today_availability` time NOT NULL DEFAULT '00:00:00',
`state` tinyint(1) NOT NULL DEFAULT 1,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(11) NOT NULL,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_by` int(11) NOT NULL,
`params` text COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__sellacious_product_seller_slot_limits` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_uid` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`slot_from_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`slot_to_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`full_day` tinyint(1) NOT NULL,
`slot_limit` int(11) NOT NULL,
`slot_count` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



Hope this helps.
Thanks.
3 years ago
·
#4910
Accepted Answer
Hi, we are fixing this issue in next update, for now create these two tables manually.

CREATE TABLE IF NOT EXISTS `#__sellacious_seller_timings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_uid` int(11) NOT NULL,
`type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`week_day` int(11) NOT NULL,
`from_time` time NOT NULL DEFAULT '00:00:00',
`to_time` time NOT NULL DEFAULT '00:00:00',
`full_day` tinyint(1) DEFAULT NULL,
`slot_window` int(11) NOT NULL,
`slot_window_unit` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`today_availability` time NOT NULL DEFAULT '00:00:00',
`state` tinyint(1) NOT NULL DEFAULT 1,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(11) NOT NULL,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_by` int(11) NOT NULL,
`params` text COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__sellacious_product_seller_slot_limits` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_uid` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`slot_from_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`slot_to_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`full_day` tinyint(1) NOT NULL,
`slot_limit` int(11) NOT NULL,
`slot_count` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



Hope this helps.
Thanks.
3 years ago
·
#4916
Hi Indresh,

Thank you so much, it works.
3 years ago
·
#5483
Hi, we are fixing this issue in next update, for now create these two tables manually.

CREATE TABLE IF NOT EXISTS `#__sellacious_seller_timings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_uid` int(11) NOT NULL,
`type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`week_day` int(11) NOT NULL,
`from_time` time NOT NULL DEFAULT '00:00:00',
`to_time` time NOT NULL DEFAULT '00:00:00',
`full_day` tinyint(1) DEFAULT NULL,
`slot_window` int(11) NOT NULL,
`slot_window_unit` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`today_availability` time NOT NULL DEFAULT '00:00:00',
`state` tinyint(1) NOT NULL DEFAULT 1,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(11) NOT NULL,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_by` int(11) NOT NULL,
`params` text COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__sellacious_product_seller_slot_limits` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seller_uid` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`slot_from_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`slot_to_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`full_day` tinyint(1) NOT NULL,
`slot_limit` int(11) NOT NULL,
`slot_count` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



Hope this helps.
Thanks.

I'm having the same error... how do we "Create the table?"
3 years ago
·
#5486
Hi,

Copy this sql in your phpmyadmin, change prefixes and run.

https://www.siteground.com/tutorials/phpmyadmin/query/

Hope this helps
Thanks.
3 years ago
·
#5497
Hi,

Copy this sql in your phpmyadmin, change prefixes and run.

https://www.siteground.com/tutorials/phpmyadmin/query/

Hope this helps
Thanks.


Did that and received this error:

ERROR 1067 (42000): Invalid default value for 'created'
MySQL version: 8.0.22
3 years ago
·
#5498
Hi,

What version of sellacious you are having in shop now ?
this query works with beta3 version only
if not pls upgrade to beta3 version.

thanks.
3 years ago
·
#5505
Hi,

What version of sellacious you are having in shop now ?
this query works with beta3 version only
if not pls upgrade to beta3 version.

thanks.


I'm using v2.0.0-beta3

PHP Built On Linux joomla 5.4.0-1034-gcp #37-Ubuntu SMP Wed Jan 6 19:44:41 UTC 2021 x86_64
Database Type mysql
Database Version 8.0.22-0ubuntu0.20.04.3
Database Collation utf8mb4_0900_ai_ci
Database Connection Collation utf8mb4_0900_ai_ci
PHP Version 7.4.3
Web Server nginx/1.18.0
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 3.9.24 Stable [ Amani ] 12-January-2021 15:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
3 years ago
·
#5507
Hi,
Kindly check your mysql version. Recommenced version is MySQL v5.5.3+ or MariaDB 10.1.22+ (with InnoDB suppert enabled).
Also joomla version 3.9.16 is officially supported with beta3 version.
Check with these two and let me know if still not working.

Thanks.
3 years ago
·
#5509
Hi,
Kindly check your mysql version. Recommenced version is MySQL v5.5.3+ or MariaDB 10.1.22+ (with InnoDB suppert enabled).
Also joomla version 3.9.16 is officially supported with beta3 version.
Check with these two and let me know if still not working.

Thanks.

MySQL version as noted in my previous response is 8.0.22 and I can confirm InnoDB support is enabled.

So the latest version of Joomla (3.9.24) is NOT supported and it won't work?
3 years ago
·
#5515
Hi,

Can you check with Mysql version 5.x, seems like it is because of your mysql version.
About your joomla 3.9.24 question- When beta3 version was launched it was was tested with latest joomla at that time which was v3.9.16 but that doesn't mean it will not work with v3.9.24 but it is recommended to have joomla 3.9.16


thanks.
3 years ago
·
#5560
Hmm will Sellacious have plan for update for new great Joomla 4 and support for php 8 too?

Thats in my plan..
3 years ago
·
#5562
Hi
Our next update will be compatible with joomla 3 9 24 and php7.4, we will think of joomla4 and php8 in later updates.

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