Re: The CSS-files are lost
TYPOLight overwrite the css file in the daily cron job
If you manage the CSS-files manually, you must import the file in TYPOlight
Re: The CSS-files are lost
Really? I thought that only the CSS-files, that are being managed through the in-built CSS-editor, are being automatically updated on the daily cron job. And that way it's not a good idea to edit those files manually through FTP, since they are gonna be overwritten by the data stored in the database.
But here in my case, I have manually created the CSS-files, uploaded them by FTP to the Typolight root, and edited the fe_page template to include them. The in-built CSS-editor is not used at all. I thought it was safe to do this way.
So you mean that all *.css files in the root is removed during the daily cron job? Even files uploaded manually? Thats strange, because I have had no problem with removed CSS-files during the last two weeks.
Re: The CSS-files are lost
Quote:
Originally Posted by Ola
So you mean that all *.css files in the root is removed during the daily cron job?
Yes, all CSS is overwritten
You must upload the css file on the file folder and import the file
Re: The CSS-files are lost
Quote:
Originally Posted by PaoloB
You must upload the css file on the file folder and import the file
But if I import the file in the CSS-editor, then I can't manually edit the file through FTP since it will get overwritten. Maybe you mean that if I put the CSS-filed in the tl_files folder they should be safe? Maybe it's just the root folder that gets wiped once and a while.
If this is true, it's a weird behavior. Why erase all css-files in the root? I understand that css-files edited through the editor gets automatically updated. But files uploaded manually should stay in place.
And this "daily" cron job waited two weeks before my css-files was erased... Also weird...
Re: The CSS-files are lost
my English is not good, sorry
The css file are located on the tl root
If you want to use CSS with TL you must import the css on TL
When you change the css file, you import the new file.
If you do not want to use CSS in TL, put the css file on the other folder, eg. tl_files and add the css file on the template manually
Re: The CSS-files are lost
You can add this to localconfig.php
Code:
$GLOBALS['TL_CONFIG']['rootFiles'][] = 'filename.css';
I normally keep all of my CSS, JS, etc, in a subdirectory within /templates to avoid this problem.
Re: The CSS-files are lost
I finally got my files back now. My hosting provider makes daily backups, so I never really had any panic. But I was lucky that the site didn't were released yet. That would not have been good.
But to clarify things (according to my understanding):
Files that exists in the root directory and do not belong to TYPOlight will be erased once and a while.
This could be clarified a little bit more during installation, as it makes no sense why TYPOlight would erase files without no reason.
Re: The CSS-files are lost
Is this behavior not documented? It seems highly undesirable that unrelated files get erased. If Ola's assessment is correct for css files then it looks most like a bug! TL can not delete files that it does not know, that is unacceptable... (especially IF undocumented :cry: )
Never lost a file in this way though, pfew...
Ola, I know for sure that typolight doesn't delete any foreign file as I have many other files in the root. But I never keep css files there. (I keep css files close to the images so the relative paths are shorter and better readable)
Re: The CSS-files are lost
Quote:
Originally Posted by Vera
Ola, I know for sure that typolight doesn't delete any foreign file as I have many other files in the root. But I never keep css files there.
Yes it seems that it is only css-files that gets deleted. On my other TYPOlight installs I have other type of files that are unaffected. I think, according to my logs, that it is the weekly cron jobs that removes the files.
Re: The CSS-files are lost
Hi Ola,
may be an additional hint:
I often use this http://www.typolight.org/extension-l...050009.en.html module to be able to writing my css settings and changes in firebug and after fixing the settings you can copy-paste from firebug into css file using the CssEditor. Copy-paste works also from your manual settings and also be editable with the build in css editor - may be give it a try.
Re: The CSS-files are lost
Quote:
Originally Posted by Vera
Ola, I know for sure that typolight doesn't delete any foreign file as I have many other files in the root. But I never keep css files there. (I keep css files close to the images so the relative paths are shorter and better readable)
TL was deleting a file of mine (images.xml) until I added the code I mentioned to localconfig. Someone pointed it out on the forum; don't remember who it was.
I believe the justification for deleting additional files in root is to prevent a malicious script from installing anything there. Of course I may be mistaken.