Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

no style on vanilla 2.1

Hi.
I downloaded the latest vanilla from github. install in on a localhost. did some themeing on it. then i uploaded it to my "live server" for just show a person the new theme I was working on. but when i install the vanilla on the live server it has theme or style at all. and non of the links are working either. i have the latest php installed on the server. and i'm using an apache server.

Comments

  • I have looked into this one a little more, And I have discover that on my localhost create a css file in my cache folder. But on my "live server" it does not create one. I have set the file permission to 777 in my cache folder so that should not be the problem.

  • Can it be disable that it create a new css file in cashe folder?because i think that is the problem for me that it should create a new css file but it does not. so can I disable this thing somehow? so that i use the old way like vanilla 2.0 does.

  • Did you move the site in its entirety from localhost to the server? I found the same problem, but on localhost.

    Try unzipping the 2.1 install onto your server, import database, add themes/plugins as needed instead, it generally gets around any issues like this. I find it the quickest way - use a fresh 2.1 install on server instead of transferring that one.

  • peregrineperegrine MVP
    edited November 2012

    you might as well upgrade to 2.1a33

    do you have a link to your live site.

    whatever number you see.

    FYI ---
    also if you open up the file in your web development tool e.g. style-f90f5456.css

    e.g.
    http://yourforum.com/vanilla/utility/css/style/style-f90f5456.css

    you can look at the top of the file and it shows what css files were read to create the combo file. I think the cache automatically clears in this version of 2.1 that is why you might not see files in cache.

    
    /* CSS generated for etag: f90f5426.    
     *
     * /applications/dashboard/design/style.css   
     * /plugins/Emotify/design/emotify.css   
     * /themes/mine/design/custom.css   
     */
    

    have you double checked the cache permissions

    you might also run yours-forum.com/utility/update after you upgrade to 2.1.a33, just for fun. I think its probably a good idea when updating new versions just to be sure database is all hunky-dory.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @OnlyAnExcuse I did a fresh install on the server, the only thing I moved from my localhost was the theme.

    @peregrine the problem is that when I look at my source code on the "live serve it style-numbers.css file is the stylesheet in the theme, but when I are gonna look at that stylesheet it says page not found. And I just check the permisson on cache and it is 777.

    Here is a link so you can see for you self

  • I see your problem the file style-a3150c8a.css is empty and there are no rules.

    there seems to be some problem with the routine that combines all your css files and puts them in one global file style-nnnnnnn.css

    I am not sure what is causing that.

    I know you said cache is writeable

    but is

    is cache/Smarty/cache writeable

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine, well I checked them again. And cache/smarty/cache has 777 to it. So I can't figure it out.

  • peregrineperegrine MVP
    edited November 2012

    @zar3x

    try this - create and give it 777

    cache/css

    then run vanilla

    and see if a file gets put in there.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine allready try that. I but does not create it. And I thought that maybe it is something with my host. so I contacted them. And they took a quick look at it. and they cant't understand either why it is not create that css file. so as I asked before is there any chance to disable this thing so it just call the css style from the theme custom css and the main css file

  • Okey I have looked in a little more in to this. And this is what I have figure out. The file "class.assetmodel.php" Write the style-somenumber.css And in the file "class.controller.php" on line 1590 it request this file. So I just tested to commebt out this is "class.controller.php"

    $ETag = AssetModel::ETag(); $DebugAssets = C('DebugAssets');

    And then I looked at the source code for my forum in the browser. And now it says that my stylesheet is "style-.css" So now I need to find what class that handle what styles should be loaded.

    (This is only for testing and not gonna run on a real live forum)

  • peregrineperegrine MVP
    edited November 2012

    @zar3x said:
    Okey I have looked in a little more in to this. And this is what I have figure out. The file "class.assetmodel.php" Write the style-somenumber.css And in the file "class.controller.php" on line 1590 it request this file. So I just tested to commebt out this is "class.controller.php"

    $ETag = AssetModel::ETag(); $DebugAssets = C('DebugAssets');

    And then I looked at the source code for my forum in the browser. And now it says that my stylesheet is "style-.css" So now I need to find what class that handle what styles should be loaded.

    (This is only for testing and not gonna run on a real live forum)

    if you want to try a test - a bit of a kluge. try these steps exactly.

    1) undo the changes you made

    2) cut and paste the contents of the two files

    /applications/dashboard/design/style.css

    /themes/bittersweet/design/custom.css

    and combine them both into one file called cache/css/style-a3150c8a.css on your live server

    (this will tell us if it can read your cache).

    3) if you want further help

    temporarily add this line to your .htaccess files. It will allow my to look at your directories, without getting forbidden.

    Options +Indexes

    and let me know when you have done so.

    since its not live Options +Indexes should not be a problem. you can remove it later, after I have a look.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • zar3xzar3x
    edited November 2012

    Well I have tried that before and it did't work, And I did try it again.
    About the other with the .htaccess I will sent you a message when I have done it.

    And thanks allot @peregrine that you help me out with this :) If I had a gold medal I will give it to you ;)

  • Okey I have fix this now after awhile :P It was in the .htaccess the problem was. Because I have my install in a subfolder I miss to add Rewritebase in my .htaccess.

    SO If anyone have the same problem this is what you need to do:

    • Open up your .htaccess file
    • Look at this line of code `#RewriteBase/`
    • change it so it look like this `Rewritebase/your sub folder`

    So as I say before, thanks allot for all the help @peregrine :)

  • peregrineperegrine MVP
    edited November 2012

    I posted the answer for you @zar :). Just applied it to the wrong discussion and the wrong person.

    http://vanillaforums.org/discussion/comment/170465/#Comment_170465

    glad you solved it. At least I know how to get rid of styling now. :)

    by the way - it is "whole new theme" not "hole new theme" on your site and pretty much everywhere.

    also be sure to check this out for incorrect use of "hole". see fourth trouble ticket down

    http://www.chroniclesofgeorge.com/tickets3.htm

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited November 2012

    You can also edit one line in library/core/class.controller.php: if ($DebugAssets) to: if (!$DebugAssets)

    Add Pages to Vanilla with the Basic Pages app

  • @Shadowdare

    thx for pointing that out.

    which would lead to an even easier change in config.php

    $Configuration['DebugAssets'] = TRUE;

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I was scratching my head for hours trying to figure this out or, at least, disable styles caching.

    Thanks to @Shadowdare and @peregrine for pointing that out.

    My configuration is not the most common but it's also nothing too complicated.

    I use Vanilla inside a sub-directory ('/vanilla'), mainly for provide WordPress comments.

    The webserver used is Nginx, configured as:

    site.com:

    server {
    listen 80;
    server_name site.com;
    return 301 http://www.site.com$request_uri;
    }

    server {
    listen 80;

    root /var/www/site.com/public_html;
    index index.php index.html index.htm;

    server_name www.site.com;

    include /etc/nginx/global/global.conf;
    include /etc/nginx/global/vanilla.conf;
    include /etc/nginx/global/wordpress.conf;
    include /etc/nginx/global/wordpress-supercache.conf;
    }

    global.conf:

    autoindex off;

    location / {
    try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    error_page 404 /404.html;

    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /usr/share/nginx/www;
    }

    location ~ .php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }

    location ~ /. {
    deny all;
    }

    location ~* .(css|js|xml)$ {
    expires 30d;
    add_header Pragma public;
    add_header Cache-Control "public";
    }

    location ~* ^.+.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
    expires max;
    add_header Pragma public;
    add_header Cache-Control "public";
    }

    vanilla.conf:

    location /vanilla {
    try_files $uri $uri/ @forum;
    }

    >

    location @forum {
    rewrite ^/vanilla(.+)$ /vanilla/index.php?p=$1 last;
    }

    Vanilla version is the current 'master' from GitHub.

    Garden/Vanilla is generating '.ini' and 'empty' files inside 'cache' directory, but no signs of any '.css'.

    URL rewriting seems to be ok for most purposes.

Sign In or Register to comment.