Welcome to the LimeSurvey Community Forum

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

Caching problems via FTP

  • steffih
  • steffih's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175854 by steffih
Caching problems via FTP was created by steffih
Hi there,

I've worked on a few LS 3.x template-designs via FTP in the last few months, but since a couple of weeks, I have problems with caching (I guess).

Scenario:

1) I start working on the custom.css via FTP and Sublime Texteditor
2) I make adjustments and save the file after every change
3) I switch to Chrome to see the template changes by clearing the cache and refreshing the page every time
4) After about 10-20 CSS-adjustments in custom.css, it doesn't show the changes in the template-preview anymore, no matter how many times i clear the cache in Chrome
5) When checking the custom.css in the Templateditor in Limesurvey, the CSS i have changed through FTP/Sublime is there, but I have to click the save button in the Templateeditor in order to apply the adjustments to the template
6) After saving the custom.css file via the Templateeditor, I can see the changes in the template-preview


It is a really weird issue, but I have tested this several times and it is always the same scenario.

Does anyone have encountered this issue and knows how to solve it? Fixing that issue would make my life much easier.

Thanks in advance!
The topic has been locked.
More
5 years 5 months ago #175859 by jelo
Replied by jelo on topic Caching problems via FTP
Are you aware of the theme concept changes with LS 3.0?
manual.limesurvey.org/New_Template_Syste...not_applied.3F.22.29

So, when you're editing CSS/JS of a theme you have various possibilities:

You can use the the LS Theme Editor: it deals with the asset manager and you don't have to worry about anything

You can turn debug mode on: it will turn asset manager off, so the real css/js files of your themes are called (but then, you have to refresh your browser cache at each load)

You can refresh the assets cache: from Global Settings -> General -> Clear asset cache


The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • steffih
  • steffih's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175884 by steffih
Replied by steffih on topic Caching problems via FTP
Thanks jelo, but in most cases i get lots of error messages when turning on the debug mode, so i cannot event open a survey with the theme applied when the debug mode is on. I also cleared the global cache, it didn't help. Until a few weeks ago, theme-editing via FTP worked fine! It is no option for me to develop themes via the templateeditor unfortunately. Is there anything that changed that can cause these problems?
The topic has been locked.
More
5 years 5 months ago #175888 by jelo
Replied by jelo on topic Caching problems via FTP

steffih wrote: Until a few weeks ago, theme-editing via FTP worked fine! It is no option for me to develop themes via the templateeditor unfortunately.

What exact version of LimeSurvey is used? When was the last time you did an update?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175896 by holch
Replied by holch on topic Caching problems via FTP

in most cases i get lots of error messages when turning on the debug mode


Sounds like you have more problems on your installation then.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
5 years 5 months ago #175906 by Mazi
Replied by Mazi on topic Caching problems via FTP
Hi everyone, let me jump in since I am hosting the system:

@Version: We are running the latest 3.1x version and update regularly.

@Errors: When enabling debug mode (setting it to 1), there can be PHP warnings which are often related e.g. to undefined PHP variables. So nothing related to the system but to PHP warnings caused by Limesurvey which are not shown if debug is turned off.

We are just wondering if others are facing similar issues or if you are using different approaches for creating templates. Because the caching of CSS files really makes it hard to test templates and debug CSS.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago - 5 years 5 months ago #175911 by DenisChenu
Replied by DenisChenu on topic Caching problems via FTP

Mazi wrote: We are just wondering if others are facing similar issues or if you are using different approaches for creating templates. Because the caching of CSS files really makes it hard to test templates and debug CSS.

Since user have ftp access : debug=1 is clean enough for me.

In general :
1. I make new template on another server, debug=2
2. when done : update user template
3. For quick css testing : use firebug directly
4. save any files in template editor is really quick
4b : sometimes i delete/add a file in theme via ftp : it update the asset.

asset system is really better : with it : you don't have to say to your client : «remind to clear your cache» when you update a template css …

PS : a lot of my online system are in debug mode, except 401 and 403 error : there are no issue …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 5 months ago by DenisChenu. Reason: 4b
The topic has been locked.
More
5 years 5 months ago #175912 by jelo
Replied by jelo on topic Caching problems via FTP

Mazi wrote: We are just wondering if others are facing similar issues or if you are using different approaches for creating templates. Because the caching of CSS files really makes it hard to test templates and debug CSS.

The concept of disable caching via a switch via ini-file or gui seems to be still unacceptable by the developers. I don't know why, but it was a hard-way to get the "flush assets" button.

@Mazi: Is the flush assets button working for you? Not that it is very helpful when developing themes for hours, but if there is a bug around that button, it should be reported.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175913 by DenisChenu
Replied by DenisChenu on topic Caching problems via FTP

jelo wrote:

Mazi wrote: We are just wondering if others are facing similar issues or if you are using different approaches for creating templates. Because the caching of CSS files really makes it hard to test templates and debug CSS.

The concept of disable caching via a switch via ini-file or gui seems to be still unacceptable by the developers. I don't know why, but it was a hard-way to get the "flush assets" button.

Because if you need it : you have access to FTP :).

Else : i think it's better to
1. update only needed assets (here : template)
2. Maybe have a way to reset in a GET param on public view can be interesting.

About 2 : spip (a really good cms) have buttons when you're connected in admin part

have such system can be interesting.

But this system are totally extendable bye plugin (here squelettes is an HTML producer editor (like if we have an edit twig file in public).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175925 by tpartner
Replied by tpartner on topic Caching problems via FTP
If you want to trigger reloading the assets without enabling debug or using the flush button, change the value of <last_update> in the theme manifest (config.xml) and upload it via FTP.


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 5 months ago #175933 by jelo
Replied by jelo on topic Caching problems via FTP

DenisChenu wrote: ]Because if you need it : you have access to FTP :).

What does having an FTP-Access have to do with it?
The feature request is a INI-Setting (which can be modified via FTP) OR a GUI-Setting (which can be changed without FTP-Access), which JUST prevent caching. Debug is like rebooting the PC to change the time. Even when using FTP for theme development, I would prefer a GUI setting (like every wordpress cache plugin has). We might have a developer user account setting inside LimeSurvey (which deactivates cache for admin work).

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175937 by DenisChenu
Replied by DenisChenu on topic Caching problems via FTP
Because : if you don't have FTP access : cache is resetted when needed …

It's only need if you update files via ftp (or ssh) … the TOTALLY related to FTP

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose