Author Topic: CSS background image path broken on shared hosting  (Read 13701 times)

yachzo

  • Beginner
  • *
  • Posts: 16
CSS background image path broken on shared hosting
« on: February 20, 2010, 16:45:47 pm »
I have been trying out Virtuemart 1.1.4 on Joomla 1.5.11. I have an issue with background images not showing up on any Virtuemart section of my site, including the admin areas. They work properly on my localhost. I know it has to do something with the way virtuemart dynamically loads the style sheet and javascript files. Funny thing is that all of my styles work fine, its just the background images that get lost. When I use firebug, I get this path :

Code: [Select]
url(http://www.starvingeye.com/components/com_virtuemart/fetchscript.php?gzip=0&subdir[0]=/themes/default&file[0]=theme.css&subdir[1]=/themes/default&file[1]=admin.styles.css&subdir[2]=/js/admin_menu/css&file[2]=menu.css&subdir[3]=/js/extjs2/css&file[3]=ext-all.css&subdir[4]=/js/extjs2/themes/default/images/administration/menu/icon-16-import.png)
I know if I call my theme.css file from my joomla index.php page it will work fine, but I would rather find a fix to this system of loading the css from virtuemart.

I have gone over all of my settings on my configuration.php and my viruemart.cfg.php and they seem to be fine.

Since I had already toyed with SEF, gzip and caching on one site, I did a clean install on another shared hosting account (both on 1and1 shared hosting accounts) and experienced the same problems.

Is there any known issues with using virtuemart on a 1and1 shared hosting account, that I need to be aware of?

Hopefully somebody can steer me in the right direction, because this is driving me buggy.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27594
  • Always on vacation
    • Jenkin Hill Internet
Re: CSS background image path broken on shared hosting
« Reply #1 on: February 21, 2010, 00:47:26 am »
Is there any known issues with using virtuemart on a 1and1 shared hosting account, that I need to be aware of?

There are many potential issues with cheaper shared hosts that can cause problems running Joomla & Virtuemart. In this case it is most likely related to the url you are using for the bg image. I assume it is assigned in template.css, but for some hosts it also has to be declared in the VirtueMart theme.css - append the css to the end of the style sheet.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #2 on: February 21, 2010, 02:14:20 am »
This is what is calling the style sheet, in components/com_virtuemart/themes/mytheme/theme.php

Code: [Select]
if( vmIsJoomla('1.0') && mosGetParam($_REQUEST,'option') != VM_COMPONENT_NAME) {
// This can only be a call from a module or mambot
// In Joomla 1.0 it is not possible to add a JS or CSS into the HEAD from a module or content mambot,
// using addcustomheadtag, that's why we just print the tags here
echo vmCommonHTML::scriptTag(VM_THEMEURL.'theme.js');
echo vmCommonHTML::linkTag(VM_THEMEURL.'theme.css');
} else {
$vm_mainframe->addScript( VM_THEMEURL.'theme.js' );
$vm_mainframe->addStyleSheet( VM_THEMEURL.'theme.css' );
}
class vmTheme extends vmTemplate  {

function vmTheme() {
parent::vmTemplate();
vmCommonHTML::loadMooTools();
}

This is how the images are called from the theme.css:
Code: [Select]
.addtocart_button {
background: url( images/add-to-cart_blue.gif ) no-repeat  center transparent;
}

*note: i have also tried with it as:
Code: [Select]
.addtocart_button {
background: url( 'images/add-to-cart_blue.gif' ) no-repeat  center transparent;
}

theme.css is located in components/com_virtuemart/themes/mytheme/theme.css

For the administrative page the styles are coming from admin.styles.css also from the above directory.

That is the arrangement set up with the default template in virtuemart.

I thought they called the css and js files that way so you didn't have to call them for all of the non-virtuemart pages that don't need them, but anyhow I still haven't found why it's breaking.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27594
  • Always on vacation
    • Jenkin Hill Internet
Re: CSS background image path broken on shared hosting
« Reply #3 on: February 21, 2010, 12:16:59 pm »
Try using full urls for the bg images.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #4 on: February 23, 2010, 17:58:55 pm »
That doesnt work. Also that fetchscript is breaking my js files too making the add to cart button inactive. I know I could just call everything from my Joomla css file, using full urls for everything linked in, but that will make every page more bulky than needed.

I will apply that bandaid if I really have to, but I would rather fix it properly.

I would rather call everything needed by vm with vm and not have to load all that extra stuff for my regular joomla pages.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: CSS background image path broken on shared hosting
« Reply #5 on: February 23, 2010, 18:22:33 pm »
did you change the urls in your virtuemart config file?

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #6 on: February 23, 2010, 18:47:39 pm »
The urls in my vm config file is the same as the url in my joomla config file. The only difference is the / at the end.

Joomla's config file url:= http://www.caferacerypsi.com

and the virtuemart.cfg.php url= http://www.caferacerypsi.com/

I have tried both with and without the www, with same results.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: CSS background image path broken on shared hosting
« Reply #7 on: February 23, 2010, 19:13:19 pm »
give me a url to your shop part of the site, and I will check it out
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #8 on: February 23, 2010, 20:06:20 pm »
Ok well I have another site set up just for testing this out on the same host with the default joomla and vm settings, sample data and templates at: http://www.starvingeye.com/index.php?option=com_virtuemart&Itemid=53

The javascript for the add to cart seems to be working for the most part, but  the background images are still acting up.


*notice the add to cart button, and the up/down quantity arrows on the product details pages.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: CSS background image path broken on shared hosting
« Reply #9 on: February 23, 2010, 20:47:41 pm »
attached



[attachment cleanup by admin]
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #10 on: February 23, 2010, 21:02:37 pm »
*scratches head

Still not showing up for me. I'm using the latest version of Firefox. I have cleared my cache a million times and still don't see the images.

Same with IE 8.



[attachment cleanup by admin]

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: CSS background image path broken on shared hosting
« Reply #11 on: February 23, 2010, 21:48:32 pm »
i used firefox
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #12 on: February 23, 2010, 22:36:02 pm »
How about on this page?

http://www.caferacerypsi.com/Art/2010-Pinup-Calendar/flypage_tableless.tpl.html


It's got some style issues still I know, and it's a work in progress, but I got held up with this issue.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: CSS background image path broken on shared hosting
« Reply #13 on: February 24, 2010, 14:18:55 pm »
i see it,


 I just noticed you are using SEF, that might break the stylsheet
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

yachzo

  • Beginner
  • *
  • Posts: 16
Re: CSS background image path broken on shared hosting
« Reply #14 on: February 24, 2010, 17:32:02 pm »
Yeah on that last one I have SEF going on, that is why I was testing everything out on the other domain (starvingeye.com) without the SEF mods until i solved this problem.

Thanks for checking for me, but I'm still scratching my head on why I am not seeing the images. If I figure it out I will post here and mark this thread as solved.

Oh another note: I looked on firebug again and now notice that I do get '400 bad request' errors on those images if that means anything.