Page 1 of 1

cms_stylesheet Smarty Compile process failed

Posted: Sun Apr 21, 2013 12:35 am
by luya
I just hit an issue with cms_stylesheet on verion 1.11.5. Here is what Admin log reported:

Code: Select all

Plugin: cms_stylesheet 	Smarty Compile process failed, unable to write cache file
Upgrading to 1.11.6 did not resolve the problem. Any solution is welcome.

Re: cms_stylesheet Smarty Compile process failed

Posted: Sun Apr 21, 2013 6:59 am
by Rolf
Check write permissions temp folders

Rolf

Re: cms_stylesheet Smarty Compile process failed

Posted: Sun Apr 21, 2013 5:34 pm
by luya
tmp folder and its children have permission set to 755. I found combined_stylesheet from cache folder has permission set to 644. What will be the safest case?

Edit:
Setting tmp and cache folder to 777, combined_stylesheet refused to generate and admin log report the same message: "Plugin: cms_stylesheet Smarty Compile process failed, unable to write cache file".

Edit:
Added attachment

Re: cms_stylesheet Smarty Compile process failed

Posted: Wed Apr 24, 2013 4:53 am
by luya
Here is the full details of CMS Made Simple on the server


----------------------------------------------

Cms Version: 1.11.6

Installed Modules:

CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
Showtime: 3.3
CGExtensions: 1.32.6
MleCMS: 1.11.4
JQueryTools: 1.2.5
CGContentUtils: 1.3.4
CGSmartImage: 1.10.8
youtubeplayer: 1.3.1


Config Information:

php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 32000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.21
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 64M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 33M
upload_max_filesize: 32M
session_save_path: /var/chroot/home/content/31/9985931/tmp (0705)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.0.96
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages


----------------------------------------------

Re: cms_stylesheet Smarty Compile process failed

Posted: Thu Apr 25, 2013 6:46 pm
by luya
Here is a path for tmp folder

Code: Select all

tmp 	/home/content/31/9985931/html/stg/tmp (0777)
templates_c  /home/content/31/9985931/html/stg/tmp/templates_c (0777)
modules 	/home/content/31/9985931/html/stg/modules (0755)
File Creation Mask (umask) /home/content/31/9985931/html/stg/tmp/cache (0777) 
Clearing the cache returned this error

Code: Select all

Smarty Compile process failed, unable to write cache file
As return, the css file is blank.

Re: cms_stylesheet Smarty Compile process failed

Posted: Fri Apr 26, 2013 8:23 pm
by Dr.CSS
How did you install it, did you unpack the tar.gz in server file manager or FTP folders/files to site, might be an 'owner' problem, is this a windows server..?

Re: cms_stylesheet Smarty Compile process failed

Posted: Sat Apr 27, 2013 8:39 am
by luya
I locally unpacked the tar.gz before uploading the folders through Filezilla. The server is based on CentOS 6 hosted by GoDaddy.
Edit:
After several reinstalls and disassociated the css, it turned out the bug is related to smartys themselves I used inside the stylesheet hence above error message.

Re: cms_stylesheet Smarty Compile process failed

Posted: Mon Apr 29, 2013 1:26 am
by luya
After further investigation and testing, the culprit was [[root_url]] inside

Code: Select all

      background: url([[root_url]]/uploads/images/background.png) repeat-y;
.
Reading the documentation about stylesheet, I used this code

Code: Select all

    [[* +++++ SETTINGS +++++ *]]
    [[capture assign='path']][[root_url]]/uploads/template[[/capture]] 
   background: #fff url([[$path]]/bg_body.jpg) repeat-x; 
which fixed the stylesheet error. Can anyone reproduce the problem related to the use of root_url inside background tag? If that happened, I guess I found a bug.