TOPIC: J! 3.7.1 JotCache 6.0.1 no cached pages!

J! 3.7.1 JotCache 6.0.1 no cached pages! 17 May 2017 17:00 #1927

Hi I just upgraded my site to J3.7.1 and JotCache 6.0.1. After update, no cached pages appear in the component.

For instance, if I access www.mgscreativa.com/en/services/professional-web-development I don't see Professional Web Development in the jotcache list...

Is that normal with this new version? Please advise!

Details:
No changes in JotCache config nor plugin or even plugin positions compared with version before upgrade
J! 3.7.1
JocCache 6.0.1
PHP 5.6.28
The administrator has disabled public write access.

J! 3.7.1 JotCache 6.0.1 no cached pages! 17 May 2017 17:09 #1928

Go to JotCache plugin settings on "Cache Operation Modes" tab and select "verbose" for Cache Debug Log parameter. Then all page requests are logged in /logs/plg_jotcache.debug.log.php. Based on log you can evaluate what's internally happens.
The administrator has disabled public write access.

J! 3.7.1 JotCache 6.0.1 no cached pages! 17 May 2017 17:36 #1930

Hi! tested again after complete cache erase and disabled excluded URLs and Locations, reloaded this URL www.mgscreativa.com/en/services/professional-web-development with following results:
The administrator has disabled public write access.

J! 3.7.1 JotCache 6.0.1 no cached pages! 17 May 2017 17:38 #1931

See logs here pastebin.com/Kxtd09uS
The administrator has disabled public write access.

J! 3.7.1 JotCache 6.0.1 no cached pages! 17 May 2017 19:00 #1932

Your log shows:
.......
2017-05-17 15:22:01 current browser in common group [Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0]
2017-05-17 15:22:01 READ CACHE start [www.mgscreativa.com/en/services/professional-web-development]
2017-05-17 15:22:01 READ CACHE after exclude check
2017-05-17 15:22:01 READ CACHE no data
2017-05-17 15:22:06 immediate exit on [XMLHttpRequest www.mgscreativa.com /index.php?tmpl=json&lang=en&_=1495034531316]

Explanation:
1. READ CACHE lines only present that no data for given page is stored in page cache - IT IS OK.
2. last line says that displayed content is retrieved from server by means of AJAX call. AJAX calls and their content are not cached by JotCache - this is standard behavior.
The administrator has disabled public write access.

J! 3.7.1 JotCache 6.0.1 no cached pages! 18 May 2017 18:31 #1935

Hi! Found the bug. It seems that my template tried to save a compressed css file on the fly and that generated a PHP open basedir violation, solved by indicating the full path to file creation in the template function.

Anyways, jotcache logs didn't show any issues on that, it just returned in this block
if ((count($app->getMessageQueue()) > 0)) {
return;
}

At this point, the Joomla message queue got the Open Basedir error messaje and this prevented further jotcache processing.

I see lots of sentences that just return without this->cache->debug output. Maybe it will be nice to have something like this in sentences that return just as is:
if ((count($app->getMessageQueue()) > 0)) {
$this->cache->debug(JText::_('JOTCACHE_DEBUG_WRITE_UNKNOWN_ERROR'), $app->getMessageQueue()[0]['message'])
return;
}
The administrator has disabled public write access.

J! 3.7.1 JotCache 6.0.1 no cached pages! 18 May 2017 19:31 #1936

Maybe the correct block should be as follows
if ( ( count( $app->getMessageQueue() ) > 0 ) ) {
			$message= '';

			foreach($app->getMessageQueue() as $key => $message) {
				$message .= '[' . $key . '] Message: ' . $message['message'] . ' Type: ' . $message['type'] . '\r\n';
			}

			$this->cache->debug( 'WRITE CACHE Unknown Error', $message );
			return;
		}
The administrator has disabled public write access.
Time to create page: 0.334 seconds
We have 44 guests and no members online
Copyright © 2015 JotComponents
We have 44 guests and no members online
Copyright © 2017 JotComponents