Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-07-30 23:25:57

devman
Member
Registered: 2014-09-20
Posts: 76

Compiledtemplates cache

I've been trying to debug another issue (base value being set in co-browsing) and wanted to turn off the templatecache, but not matter what I do the cache/compiltedtemplates folder is repopulated every time I reopen a page.

I have set the following:

      'templatecache' => false,
      'templatecompile' => false,
      'modulecompile' => false,

I have cleaned the cache from the System tab.
I have deleted the files in the compiledtemplates folder (many times).
I went in to /lib/core/lhtpl/tpl.php and set the following values in the erLhcoreClassTemplate class to false thinking maybe the default value was the issue:

    private $cacheEnabled = false;
    private $templatecompile = false;

I also tried commenting out parts of the erLhcoreClassTemplate that I thought was recreating the compiled files and still could not get it to stop recompiling the templates.

Automated hosting is configured and this happens in both the manager and client installations of LHC.  It is version 2.34.

1. Are the templates stored in memory too?  Do I have to reboot the server to clear them out?
2. What do I have to do so the browser serves the uncompiled js files so I can debug them?

Last edited by devman (2015-07-30 23:26:55)

Offline

#2 2015-07-31 04:57:06

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Compiledtemplates cache

1. JS and CSS files are always compied into one. It just merges them into single file. It does not compress them by itself.

2. You will have to find where compressed version of JS file is included and temporary switch to uncompressed file.
https://github.com/LiveHelperChat/liveh … wse.php#L6 in this case just remove min.js and replace with uncompressed file version.

3. Have you tried to embed demo.livehelperchat.com widget code to see does it works, or just order temporary instance on https://livehelperchat.com/order/now and embed it's code to see does it works

If what you can skype me, perhaps i could help somehow.

Offline

#3 2015-07-31 05:20:43

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Compiledtemplates cache

Where can I get cobrowse.operator.js?  I only see cobrowse.operator.min.js on github.

This may help debug the other issue, but it does not solve the issue of why the templates are always compiled even then disabled.

Offline

#4 2015-07-31 05:22:23

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Compiledtemplates cache

https://github.com/LiveHelperChat/liveh … ile.js#L10 this tasks makes it from four scripts so just instead of min add four of them in the same order you see gulp task.

Offline

#5 2015-07-31 05:27:54

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Compiledtemplates cache

OK.  Thanks! I will work on the base not being populated in the instance issue separately.

Any idea why the template cache always repopulates even when disabled?

Offline

#6 2015-07-31 05:29:09

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Compiledtemplates cache

It should repopulate only JS and CSS files but not templates themself. It does not repopulate templates here - once it's disabled in settings file.

Offline

#7 2015-07-31 05:47:24

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Compiledtemplates cache

Hmmm...  after I delete the files in the template cache and refresh the manager page there are 3 js, 2 php, and 1 css file recreated.

I have overwritten the both manager and client install with 2.34 right from master.



The php files are nodehelperjs and one that starts with

<?php if ($currentUser->hasAccessTo('lhinstance','billing')) : ?>

Does having nodejshelper and node co-browse servers running affect the cache?

Offline

#8 2015-07-31 05:52:37

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Compiledtemplates cache

Do not think so.

Offline

#9 2015-07-31 06:27:06

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Compiledtemplates cache

I went to look for gulpfile.js in my site and it was not there.  I realized I have been performing upgrades on LHC using the instructions for only 'Overwrite doc,ezcomponents,lib,modules,pos,translations,design' folders.  In order to get gulpfile.js and any other changes outside those folder, I copied over the entire livehelperchat-master to both the manager and client installations.  The manager is still working, but the I can not open the instances either in manager or their own console.  Just get a blank screen and an error in the nginx log

 Class 'erLhcoreClassInstance' not found in /var/www/chatserver/lhc_customer/extension/nodejshelper/design/nodejshelpertheme/tpl/pagelayouts/parts/nodejshelper_config.tpl.php on line 16"

   

I guess I'll get back to you when I have that sorted out.  sad

Offline

#10 2015-07-31 06:28:50

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Compiledtemplates cache

I ques you have overwrite https://github.com/LiveHelperChat/liveh … toload.php this file... It's different for manager and instances

Offline

#11 2015-07-31 06:45:54

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Compiledtemplates cache

Stupidly overwrote the var/autoloads/lhextension_autoload.php in both the manager and client installations. Restored from backup. Now back to the other issues.....

Oh.  Just saw your reply.  Would have saved time if I had seen it sooner......

Last edited by devman (2015-07-31 06:48:44)

Offline

Board footer