Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How do I clear tmp folders?

  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 7 months ago #157553 by MadhuraBL
How do I clear tmp folders? was created by MadhuraBL
How do I change the LimeSurvey logo? (not just for surveys, want to change the main LimeSurvey logo?)

Replaced logo.png file under limesurvey/styles/Sea_Green/images/ but does not change. The old logo is loaded from tmp/assets/
How do I clear tmp folder?

Thanks
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157554 by Joffm
Replied by Joffm on topic How do I clear tmp folders?
I use Filezilla or FireFTP (Firefox) or other ftp clients.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 7 months ago #157556 by MadhuraBL
Replied by MadhuraBL on topic How do I clear tmp folders?
Hi Joffm, thanks for the quick response.
I meant, how do I clear the tmp files, do I just delete all the folders and files under /var/www/html/limesurvey/tmp folder?
Or keep the folder and delete only the files under those folder?
Example:
delete files under limesurvey/tmp/assets/ (keeping assets folder)
delete files under limesurvey/tmp/upload/cache (keeping cache folder)??

Thanks in advance
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157574 by Joffm
Replied by Joffm on topic How do I clear tmp folders?
Hi,
keep the folders.

Some time ago there was reported a bug in a new version which did not install the asse -folder and gave - of course - an error message.

Probably you did not read this.
www.limesurvey.org/de/foren/installation...ssets-does-not-exist

So, asset folder has to exist.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157586 by tpartner
Replied by tpartner on topic How do I clear tmp folders?
Also, ensure that you keep index.html in the assets folder.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 7 months ago #157600 by MadhuraBL
Replied by MadhuraBL on topic How do I clear tmp folders?
Hi Joffm and tpartner, thanks for the answers.

However, the logo does not appear in few pages, and in someother pages, still the old logo shows up.

- renamed logo.png to logo.png_orig under limesurvey/styles/Sea_Green/images/
- copied new logo.png under limesurvey/styles/Sea_Green/images/
- Cleared all files under assets folder (keeping index.html)
- Refreshed admin page => no logo shown (right click and view image gives => Not Found
The requested URL /tmp/assets/6ec3b3d3/logo.png was not found on this server.)

- Refreshed 'Following survey available' page => Old logo shown

How do I fix this??

Thanks in advance
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago #157605 by LouisGac
Replied by LouisGac on topic How do I clear tmp folders?
just increase the asset number version here:
github.com/LimeSurvey/LimeSurvey/blob/ma...nfig/version.php#L19

this will force the asset manager to republish everything.

Tip: any different number will work (inferior or superior), so try not to use the {current value +1}, else assets will not be updated with next comfortUpdate (that always increase it by 1)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157611 by tpartner
Replied by tpartner on topic How do I clear tmp folders?
Hmm...maybe a link/button in the admin configuration screen to clear them would be worthwhile.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 7 months ago - 6 years 7 months ago #157673 by MadhuraBL
Replied by MadhuraBL on topic How do I clear tmp folders?
Hi LouisGac, tried this too. No Luck!
changed the version number to '4321', cleared tmp (tmp/assets, tmp/cache) files (keeping index.html)

And when I go to the front page, iits still the old logo.
I am now wondering, is it the right place I am changing the logo?

Please refer screenshot of the page where I want to change the logo.

Thanks very much for the help.

PS: The logo is changed in the Admin page, but I want to change in the page that is in the screenshot
Last edit: 6 years 7 months ago by MadhuraBL.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago - 6 years 7 months ago #157684 by LouisGac
Replied by LouisGac on topic How do I clear tmp folders?

tpartner wrote: Hmm...maybe a link/button in the admin configuration screen to clear them would be worthwhile.


Yes, I understand that point view that can appear logical: such a button is very easy to do. Here why I refuse to do it:

I think it would make an extra level of complexity and stress. People don't understand how asset manager works, so it would very quickly become a magic button: each time they'd face a problem they would try to go clean the assets as a superstition, and it would just be useless and stressful. The goal of an asset manager is that user completely forgets about it, and ignores its existence. If instead of the magical operation of "first clean the browser cache" when facing a bug, they must use a new superstition which is "clean the assets" when facing a bug: it's useless. No, you don't have to clean the assets:
www.yiiframework.com/wiki/148/understanding-assets/#hh4

Many newcomers ask: "What do we do with the assets folder?", and the answer is "Mostly nothing".



In limeSurvey specific case:

When using the template editor, assets are refreshed when the page is saved.
When using comfortUpdate, assets are refreshed.

So for normal users, assets are refreshed when they need it and they never have to worry about cleaning the assets cache, and they don't need to have a magical button to press as a superstition when they face a problem.

Advanced users editing a template via FTP should use debug mode, then the asset manager is not used. When they upload their working template to the live server: new fresh assets are created. If they go in the quick and dirty way by directly editing a template on a live server via FTP: then they need to know the trick of the asset number. But only those users in this very specific case need it.

So, we avoid that situation where each bug report or complaint in the forum receive a systematic first answer: "please press the magical button that we don't really understand but that maybe will magically solve your problem".
Last edit: 6 years 7 months ago by LouisGac.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago #157685 by LouisGac
Replied by LouisGac on topic How do I clear tmp folders?
So, the problem of MadhuraBL is a perfect example of that: his problem is absolutely not related to the asset manager and starting by thinking about the asset manager just make the problem harder to solve. Forget about the asset manager.

MadhuraBL: to change the logo of your template, go to template editor, delete the file logo.png, then upload a new file called logo.png, and it would work like a charm.

PS: thanks to the asset manager, all your users will see the new logo, you don't have to ask them to clean their browser cache (same if you use CDN cache). But you don't need to know that information ;-)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157696 by tpartner
Replied by tpartner on topic How do I clear tmp folders?

LouisGac wrote: Here why I refuse to do it...

@LouisGac, thanks for giving your strong opinion but I'm afraid I have to disagree with it.

I think you would find that most advanced LS admins never use the template editor - they develop on their local machines and upload directly via FTP or SSH. I do not see this as "quick and dirty", I see it as efficient. So, for those folks (myself included), I see the "Clear Assets" button as useful, instead of having to monkey with the version.php file.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: holch
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose