VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Themes & Layout Problems and Customization VM 1.1 => Topic started by: akerman on April 24, 2008, 15:22:07 pm

Title: SOLVED! - Theme.css not read?
Post by: akerman on April 24, 2008, 15:22:07 pm
Upgraded my VM RC3 to Stable today. Everything works as it should except one important thing:

The 'theme.css' is not read on browser load. Instead the site template is used - which is natural if there where no 'theme.css' present.

Tried w two different HW platforms and three different browsers.

Firebug clearly states that it identifies my 'template_css.css' as being in charge.

Checked all filepermissions and the backend settings. Everything is 'Writeable' and dandy.


What can have happend? Any input is welcome.


Regards
Akerman / InfoClip.se
Title: Re: Theme.css not read?
Post by: jenkinhill on April 24, 2008, 17:22:26 pm
theme.css is working OK for me. J!1.5.2 with VM1.1 final

Firebug shows theme.css to be loaded and used.
Title: Re: Theme.css not read?
Post by: akerman on April 24, 2008, 18:20:57 pm
Hi, well yes I understand that there is something I've done or changed and that it's not something wrong with the actual VM installation.

But with your experience in this field, what could cause such scenario?
i.e. what can I have introduced to create this?

(Rule out any problem in regards of Joomla version or levels, since it worked fine
w RC3 and all levels are the latest stable and proved.)


Regards
Akerman / InfoClip.se
Title: Re: Theme.css not read?
Post by: jenkinhill on April 24, 2008, 18:55:08 pm
I have no idea what could cause this. Did you also try a different Joomla template?

There may be issues with Firebug and VirtueMart. For testing I always turned it off and used Developer Tools instead.
Title: Re: Theme.css not read?
Post by: KooTjoo on April 24, 2008, 19:16:19 pm
Hi,

I have got the same problem here. theme.css is not read. At first it workes perfectly and all of a sudden it stopped working. Maybe I did it myself, but I haven't got a clue how.

Best regards,
KooTjoo
Title: Re: Theme.css not read?
Post by: unleash.it on April 25, 2008, 01:30:45 am
I'm not exactly sure if I am understanding right, but at least for me there aren't any problems. Firebug won't list themes.css but instead you'll see fetchscript.php.

The reason for this I believe is it's Virtuemart's way of getting the style sheet to dynamically link to your page so you don't have to add it to your template. Are you sure it's not being read? If you see buy it now buttons, etc. it has to be...
Title: Re: Theme.css not read?
Post by: KooTjoo on April 25, 2008, 08:08:42 am
The buy it now buttons aren't styled. They are plain submit buttons. I have solved it however by doing a fresj install and copying my own template back again.


KooTjoo
Title: Re: Theme.css not read?
Post by: akerman on April 25, 2008, 11:39:05 am
Unleash.it is right!

fetchscript.php is noted in Firebug as the last read instance off CSS code.

And yes, somehow the information is passed on from 'themes.css'
When I say not read I mean that there is no way to trace the controlling code and no indication that this script is used at all.

Since it's industry standard for the CSS to inherit features from its parent, if it doesn't posses the setting itself, I can't see why VM should differ or why Firebug doesn't manage to see the last instance of CSS?

So it can't be correct that I shouldn't see the last read CSS information

Mr. Jenkinhill what is your opinion on this?
Is it really correct only to see 'fetchscript.php' as the last read instance in the Firebug decoding? Is that behaviour related to VM or to Firebug?


Regards
Akerman / InfoClip.se
Title: Re: Theme.css not read?
Post by: laurie_lewis on April 25, 2008, 13:54:44 pm
I am looking at my product browse page using Firebug and I can also see that fetschscript.php is loading the theme.css file.  I can see the settings for .browseProductContainer (and others) clearly.  It appears to be working correctly.  You alter settings and it is updated - in that regard it is working.

What concerns me is that I am getting errors as it is not being read as the last lot of CSS.  In my case I am getting template.css being read again for one setting and overwriting theme.css.   I am using the rhuk_milyway template for my testing.  The problem area is with #whitebox div.  theme.css has text-align center while whitebox has text-align left. 

I am also using the default theme with default settings (that is using tables) but I am sure I tested it earlier with divs and found the same issue.

Very odd.
Title: Re: Theme.css not read?
Post by: laurie_lewis on April 25, 2008, 14:24:52 pm
I have found my problem to be a template issue I think.  I change to the other default template with Joomla 1.5.2 and have NO problems.  Things appear to work properly.  Might be time for a reinstall.

Need to test it with a few more templates, though. 
Title: Re: Theme.css not read?
Post by: akerman on April 25, 2008, 14:36:07 pm
Yes it is really odd. For me all worked fine until I installed/uppgraded to 'Stable'.

What I would like to see is a 1,2,3 step schematic view of the files that are read.
This in order to better understand what is supposed to be happening.

My guess is the following order:

1. index.php - in site root is read
2. template_css.css - site template is called upon.
3. virtuemart.php
      virtuemart_parser.php
           virtuemart.cfg.php
              global.php
                theme.css

Still investigating if this is the right or even correct order...

Regards
Akerman / InfoClip.se

Title: Re: Theme.css not read?
Post by: akerman on April 25, 2008, 14:49:35 pm
I've tested w 'rhuk_milkyway' as well with 13 other templates from 10 different manufactures.

For me those template tests didn't show any change in regards of what Firebug reports.
Each templates CSS was however correctly read, upon each template change.

Just to emphasize; ALL other extensions I have (Mosets Tree, DocMan, Fireboard and others...)
all behave and shows the correct CSS.


Regards
Akerman / InfoClip
Title: Re: Theme.css not read?
Post by: akerman on April 25, 2008, 19:12:12 pm
SOLVED!

Some of the files under /components/com_virtuemart/.. had faulty permissions.

Setting all files to 644 (rw-r-r) solved the problem.


And as 'unleash.it' pointed out earlier in this thread:

"Firebug won't list themes.css but instead you'll see fetchscript.php.
The reason for this I believe is it's Virtuemart's way of getting the style sheet to dynamically link..."

Thanx for the assistance all!

Regards
Akerman.css  ;) / Infoclip.se
Title: Re: SOLVED! - Theme.css not read?
Post by: jenkinhill on April 26, 2008, 00:42:24 am
If you use Firefox's web developer tools it does show the themes.css styles.
Title: Re: SOLVED! - Theme.css not read?
Post by: tadekchavez on July 03, 2008, 02:26:10 am
Hi akerman, I hope you can help me out with this, I've seen this post and "Chown or chmod problem?" (yours), and I'm guessing I have the same problem.

I have Joomla 1.0.15 and VM 1.1 and works just fine in my localhost server but when I uploaded it to a demo server I can't get theme.css and mooPrompt.css to work. I've already changed permissions to ../com_virtuemart and set it to 777 (just for testing purposes), I also verified that fetchscript.php has all permissions and still not working.

I saw in your other post that changing "Site URL" from the VM configuration to the actual URL can get the job done but in the VM version for Joomla 1.0.x that option doesn't exist.

I you have a clue of what's going on with this, I'll really appreciate your help.
Thanks in advance.
Title: Re: SOLVED! - Theme.css not read?
Post by: akerman on July 04, 2008, 22:32:30 pm
Hi, sorry to hear that you have problems.

I'm not so familiar with Joomla 1.0 since I've only used it for a short period, before upgrading... anyhow:

When you say your theme.css does not work, in what particular sense?
Does the site come up, behaves oddly or is other css take presidency over the appearance?

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

'The Site URL' that you reefer to, that I reefer to, for reference (that was funny)  ;)
is actually in VM config and not in Joomla...

Look in VM 1.1 under Admin/Configuration/Security/Security Settings


Hope it helps


Regards
Akerman   
Title: Re: SOLVED! - Theme.css not read?
Post by: bigbunnyboy on July 13, 2008, 14:31:10 pm
Hi,
I have installed VirtueMart 1.1.0 on a Joomla install, version 1.0.15.  However, I am experiencing the same issue regarding the theme not being read.  I have modified the permissions of the files and directories, to no avail.
Has anyone else experienced issues surrounding this, that have not been solved with the alteration of file permissions?
Any help would be appreciated as I this is driving me more bonkers than I care to admit!!
Thank you,
b3
Title: Re: SOLVED! - Theme.css not read?
Post by: akerman on July 13, 2008, 15:41:02 pm
Hi there,

well, in VM 1.1.0 for J 1.0 the only thing I know of, that directly correlates with the "Site URL" setting in VM 1.1.X for J1.5; is the configuration file 'virtuemart.cfg.php'


When installing the J1.0 version for the first time that install file looks like this:
 
Code: [Select]
// these path and url definitions here are based on the mambo configuration
define( 'URL', $mosConfig_live_site.$app );
define( 'SECUREURL', $mosConfig_live_site.$app);


In J1.5 it looks like this when I'm running on my LAN:

Code: [Select]
// these path and url definitions here are based on the Joomla! Configuration
define( 'URL', 'http://192.168.1.101/' );
define( 'SECUREURL', 'http://192.168.1.101/' );


And in J1.5 it looks like this when I'm running in production:
Code: [Select]
// these path and url definitions here are based on the Joomla! Configuration
define( 'URL', 'http://www.infoclip.se/' );
define( 'SECUREURL', 'http://www.infoclip.se/' );


To edit/hardcode the configuration file to the correct 'www address' is maybe a solution?


The important thing to remember here, is that when setting these URL to 'localhost', '127.0.0.1', when performing LAN tests with other workstations, is that on the server itself everything looks nice, whilst on the other workstations pictures can be missing and other paths can become wrong, not showing what is intended.

The preferred way in the LAN (local environment), is to set this to the actual LAN address of the server. Then everything should work out nicely.


Hope it became less fuzzy?   :)


Regards
Akerman


Title: Re: SOLVED! - Theme.css not read?
Post by: bigbunnyboy on July 13, 2008, 16:58:01 pm
Thank you for your time and information Akerman, I changed the URL from $mosConfig_live_site.$app and hardcoded it to the site URL.  This is still not working for the CSS.  It is strange that you mention the images being identified as it seems that the thumbnails for the products do not appear, while the Category images do.  I wonder if this is related??  Hmmmm......?
I do get the link in the header:
 
Code: [Select]
<script src="http://<website domain>/components/com_virtuemart/fetchscript.php?gzip=0&amp;subdir[0]=/themes/default&amp;file[0]=theme.js&amp;subdir[1]=/js&amp;file[1]=sleight.js&amp;subdir[2]=/js/mootools&amp;file[2]=mootools-release-1.11.js&amp;subdir[3]=/js/mootools&amp;file[3]=mooPrompt.js" type="text/javascript"></script>
as this install is on a non-local server.

Things become less fuzzy with your explanation, but unfortunately I seem to still get nowhere with this!  I wonder if a fresh install of the shopping cart will make a difference! :(

Thank you very much for your time, it is very appreciated a great deal.
Title: Re: SOLVED! - Theme.css not read?
Post by: bengrice on August 12, 2008, 13:34:11 pm
i had this problem and it took me ages to find out, so hope this helps someone else.

the fetchscript.php loads the theme.css js mootools.css etc into the header and after runing this script directly it returned bad permission error

now i know this has been noted above but simply changing the permissions of the fetchscript file does not solve the problem plus you have to get the right permission

to test i always change to 777 full read write execute, but this was infact the problem. you have to change to 755 (full read and execute but only owner write) and the key is this must be the permission on the fetchscript.php file itself and also its container folders, components/ and components/com_virtuemart/. change the permissions to 755 and so far all css and js files seem to load fine.

i dont think this can be classed as a bug and i dont know what changes to make this happen becasue the site was loading fine for a few weeks and then suddenly this load problem occured. so some general use of the admin of virtumart must at some point modify the permissions and throw up this problem.

hope this helps like i say

ow ps to the developers if you read this, may be it would help for the fetchscript to somehow throw an error instead of it silently returning bad permissions which cannot be seem unless you copy from the view source and run in url.

cheers

ben
Title: Re: SOLVED! - Theme.css not read?
Post by: secounds on October 14, 2008, 00:27:06 am
hello. I had the same problem as you akerman. And Nothing seems to change when i change perms to 644 so i tried 777. Nothing seem to work? can you take a screenshot of your settings or something? :)
Title: Re: SOLVED! - Theme.css not read?
Post by: akerman on October 14, 2008, 22:48:33 pm
Hi,

well, did you see in the thread that setting to 777 also caused problems?

Try set your permissions (if you are on Unix/Linux) as 'bengrice' did. (The post just above yours.)

If you still run into problem, check the ownership of the files. Are you on a 'localhost' or are you running a hosting installation?

Regards
akerman
Title: Re: SOLVED! - Theme.css not read?
Post by: codinedawn on October 27, 2008, 23:13:03 pm
Running locally, after following all these instructions theme.css still bugs out continually.

Eventually I emptied all the theme.css into a new css file in my main Joomla template directory. This makes local testing much easier because you can edit the sheet staight from dreamweaver. But, but you have to change various image paths along the way.