Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: CSS Images not showing

  1. #1
    indexuniverse is offline Member
    Join Date
    Apr 2010
    Posts
    6

    Default CSS Images not showing

    Hi Guys,

    I'm having a problem with SugarCRM 5.5, for some reason the css images don't show at all, a quick firebug search gives me that the image (i.e: url("../../../../index.php?entryPoint=getImage&themeName=Sugar&imag eName=currentTab.gif") ) don't exist or in this case is not calling it the right way.

    I'v checked permissions and owners:group in all the instance of this file but still no good.

    When I active the display errors I get more lost than before bc I get tons of warnings (i.e:Warning: unlink(cache/smarty/templates_c/%%46^466^4668558E%%header.tpl.inc) [function.unlink]: No such file or directory occured in /var/www/crm_local/include/Smarty/Smarty.class.php on line 1774 [2010-04-27 13:26:31] display_stack_trace caller, file: /var/www/crm_local/include/utils.php line#: 3121)

    Any help will be more than appreciated.

    Thanks!

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: CSS Images not showing

    Just as a test just set all the permissions to 777 like this

    chmod -Rfv 777 sugarcrm/

    then test. This kind of thing is almost always permission based. Maybe there is a system setting that is making your owners:groups not as right as you think they are.

    We can always tighten up the permissions later.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    indexuniverse is offline Member
    Join Date
    Apr 2010
    Posts
    6

    Default Re: CSS Images not showing

    Hi kbrill!,

    Thanks for the response. I try what you told me and then I flush the cache but no luck, I then re-do the chmod and also a chown just be sure that permissions or user:group is the problem, however no luck at all.

    I thought it might be a server issue but since today I got the same problem in my local machine, the thing is that I didn't made any change or anything to the local.site. My next guess is that we are using 5.5, don't know if upgrading will fix this issue.

    I hope you get more ideas bc I'm running out of them, maybe there is something in the code that need fixing so I will look out for that.

    Thanks!

  4. #4
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: CSS Images not showing

    I kinda doubt its something in the code, I have done at least 100 upgrades and new installs in the last 45 days and so far I only hit this issue 3 times and all three times it was a permission/user issue.

    Its not impossible that something about the environment is causing something in SugarCRM to malfunction but so far I havent seen it.

    You might also check your site_url and hostname in your config.php and make sure they are right but I doubt that would have anything to do with this.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  5. #5
    indexuniverse is offline Member
    Join Date
    Apr 2010
    Posts
    6

    Default Re: CSS Images not showing

    Hi kbrill,
    site_url and hostname are like they should, I even change it to see if something happens but still no luck, I am still trying to find out what is going on.
    Is like for some reason the url("../../../../index.php?entryPoint=getImage&themeName=Sugar&imag eName=currentTab.gif"); in the css attribute isn't read well or pointing to the right direction.
    If I copy/paste the code in the url I get a "The image “http://localhost/crm_local/index.php...urrentTab.gif” cannot be displayed, because it contains errors." mesage only.
    I just don't get this, all permissions are checked, owners and groups.

    What I did 'till the solution comes is:
    In the file include/SugarTheme/SugarTheme.php, the function getCSSURL I changed the
    $cssFileContents = str_ireplace("entryPoint=getImage&",
    "entryPoint=getImage&themeName={$this->dirName}&",
    $cssFileContents);
    for this:
    $cssFileContents = str_ireplace("index.php?entryPoint=getImage&imageN ame=",
    "themes/default/images/",
    $cssFileContents);

    Now I really don't want to use this for production but If I can't fix it I will. There is a point in using the entryPoints, themeName and imageName.

    Thanks very much for the help!, If you think of anything please post it!

  6. #6
    jayrb is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    57

    Default Re: CSS Images not showing

    Thank you for the fix indexuniverse! I don't like using core edits at all, but sometimes there is no other option. For example, changing the fields in popup forms... but I digress.

    We're working on an implementation and have been doing the dev on linux then uploading to a Windows WAMP environment. Updated recently from 5.5.1 -> 5.5.2 (to fix issue relating imported contacts to accounts) and no problems with linux. On Windows, we had scraps disappearing from the default Sugar theme such as the tab background images.

    I hear what you're saying kbrill, perms are generally the issue. However, there is clearly a problem here.

    EDIT: As I continue to explore this, I find the linux hosted version does not have the problem - only the WAMP install. It appears with IE8 (8.0.7600.16385). As well, you have to enable IE's Compatibility mode else things look odd, but it does not fix the main issue with the Windows-hosted version.

    Now why on earth does M$ have to revive the browser wars again?

    Thx again index!
    Jay
    Last edited by jayrb; 2010-06-08 at 05:53 PM. Reason: update details

  7. #7
    indexuniverse is offline Member
    Join Date
    Apr 2010
    Posts
    6

    Default Re: CSS Images not showing

    Hey jayrb!,

    Well I'm glad I could help, like kbrill say maybe is user:group or permissions, why don't you re-check this, I did it a loooooot to just be 100% sure that that wasn't the problem. What we found out is that the user and group were replace by the apache:apache, maybe this is your problem (ours not), if that is the case you should, either, give permissions to the user:group you want, or change all to be apache:apache.

    If you have any luck in this will be much better than "hacking" sugar, but you'll know by now that sugar is a bit stubborn.

    Hope that helps too.

    Regards!

  8. #8
    jayrb is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    57

    Default Re: CSS Images not showing

    Sorry I didn't respond sooner, things are rather chaotic right now ;-)

    We've really focused on perms as it has all the signs of that being the issue. Also found we can't import which is a crippling blow. We've got Apache running under an admin user and all the files are owned by that user. We had to go in dir by dir, file by file and update ownership & permissions. Yay Windows.

    We've found the implementation of getImage.php doesn't appear to be Windows-friendly. As well, there are PHP errors with a file_copy function which would tie back to our import problem. However, this obviously is not a widespread issue.

    In the course of preparing to submit a case, I did a fresh install of 5.5.2 - no problems. While we have done a lot of custom work, we've certainly not touched anything.

    WHEN I discover the root of the issue, I will certainly post here.

    Cheers,
    Jay

  9. #9
    indexuniverse is offline Member
    Join Date
    Apr 2010
    Posts
    6

    Default Re: CSS Images not showing

    Hey Jayrb,

    Well that's a pain, we have our Sugar running on Linux, the issue about perms and groups is easy to see and easy to fix, don't know how to do it on Windows.

    Your user and group is apache:apache? if that is the case then is a issue far worst than ours, we solved the problem with my hack and since we had another issue (non related to the images) we switch to apache:apache and that pretty much solved a lot of things.

    If I came up with some idea I'll post it right away.

    Cheers!

  10. #10
    jayrb is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    57

    Default Re: CSS Images not showing

    Thx :-) Have an executive demo in 2 hours. Oh what fun.

    Fixing ownership/perms by hand in the cache has addressed the missing theme bits. Problem remains with images retrieved via getImage.php for dynamically generated things like reports. I understand why it's done this way, the pages are being built on the fly and a smarty template would not cut it.

    Here's a related permissions thing that I'm at a loss to understand. I set up a wamp stack, etc. and edited httpd.conf several times. Yesterday, I went to do so again to set up an additional dev virtual server and Windows wouldn't let me save the file! So I saved it elsewhere, then copied it over and replaced the file, no problem. After this, I could open it and edit it again.

    I swear (and how!) the Windows guys are smoking crack when they design their permissions. It is so logical on linux, but so irrational in Windows.

    BTW, my comment about doing custom work, but not touching anything is just silly. What I meant is that we've not touched the core.

    Cheers,
    Jay

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Images aren't displayed
    By romashka in forum Installation and Upgrade Help
    Replies: 9
    Last Post: 2010-01-21, 06:52 AM
  2. Images Not Showing Up
    By ayushs in forum Help
    Replies: 5
    Last Post: 2009-01-30, 06:06 PM
  3. Images in Modules
    By designinside in forum Developer Help
    Replies: 2
    Last Post: 2008-12-10, 12:54 PM
  4. Upload images.....
    By lildude in forum Developer Help
    Replies: 6
    Last Post: 2008-05-15, 09:35 AM
  5. 4.2 Fresh Install - No images showing
    By dschwa in forum Help
    Replies: 1
    Last Post: 2006-04-06, 12:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •