Thread: Weirdest ever

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Weirdest ever

    Hi,
    I really think this is the weirdest problem I have ever seen
    I have set up two different sites test.acq uatua.it and acq uatua.it
    Looking at them you will notice that in the first one the logo appears while in the second it does not. The logo is a svg file.
    The two sites are created by exactly the same set of files (copy and past) adjusting only thr two configure.php.
    The only difference is te db that in the test is a old db from november 2013 while in the main domain is the live and actual db.
    In the main domain if I make the code to call a gif logo it would appear.
    I can not understand how a db can create this problem.
    Bluehost that was a decent host in the past is now saying stupid things like we can not change the secutiry settings and if you want to be able to configure the server buy a dedicated one!!
    Please help me, if test.acq uatua.it shows the logo and acq uatua.it does not given that they are on the same server and use exactly the same set of files, how can this happen?
    Thanks
    ciao form Italy
    enzo

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Weirdest ever

    Quote Originally Posted by enzo-ita View Post
    I have set up two different sites test.acq uatua.it and acq uatua.it
    Looking at them you will notice that in the first one the logo appears while in the second it does not. The logo is a svg file.
    The two sites are created by exactly the same set of files (copy and past) adjusting only thr two configure.php.
    The only difference is te db that in the test is a old db from november 2013 while in the main domain is the live and actual db.
    In the main domain if I make the code to call a gif logo it would appear.
    Just to avoid possible confusion, are you saying that it's only a problem if the logo is an .svg file ? (see my PS)

    Quote Originally Posted by enzo-ita View Post
    I can not understand how a db can create this problem.
    Neither can I, but I'm not convinced that the DB is the only difference between the two sites.

    Quote Originally Posted by enzo-ita View Post
    if test.acq uatua.it shows the logo and acq uatua.it does not given that they are on the same server and use exactly the same set of files, how can this happen?
    Simple. It can't. There MUST be some difference that you/we are not aware of.

    I've viewed the source code from both sites, and the difference between them is quite minimal, but there ARE differences, for example, the site with the problem is making a call to stats.g.doubleclick.net. THe site without the problem isn't.
    I don't think this is related in itself, but it does tell me that not all of your files are the same.

    As for your specific problem, the code differences are:

    Code:
     <div id="header-middle">
              <div id="header-middle-left"><a href="http://www.test.acquatua.it/"><img src="includes/templates/tb_sempre/images/logo_420_83_1.svg" alt="Acqua tua il sito per l'acqua da bere" title=" Acqua tua il sito per l'acqua da bere " /></a></div>
    versus

    Code:
    <div id="header-middle">
              <div id="header-middle-left"><a href="http://www.acquatua.it/"></a></div>



    I've performed a search on my own site(s) for "header-middle" hoping to identify the file that has these differences, but came up empty, which suggests that it is to be found in your template file(s).
    I suggest you use the Developers Toolkit and perform your own search to find these files (on each of the sites) so you can compare the differences.

    Cheers
    RodG

    ps. Another possibility is that .svg files are being dissallowed by a server configuration setting (even though both sites are hosted on the same server they are in fact technically speaking, different hosts.




  3. #3
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: Weirdest ever

    Quote Originally Posted by RodG View Post
    Just to avoid possible confusion, are you saying that it's only a problem if the logo is an .svg file ? (see my PS)
    yes

    Quote Originally Posted by RodG View Post
    I've viewed the source code from both sites, and the difference between them is quite minimal, but there ARE differences, for example, the site with the problem is making a call to stats.g.doubleclick.net. THe site without the problem isn't.
    I don't think this is related in itself, but it does tell me that not all of your files are the same.

    As for your specific problem, the code differences are:

    Code:
     <div id="header-middle">
              <div id="header-middle-left"><a href="http://www.test.acquatua.it/"><img src="includes/templates/tb_sempre/images/logo_420_83_1.svg" alt="Acqua tua il sito per l'acqua da bere" title=" Acqua tua il sito per l'acqua da bere " /></a></div>
    versus

    Code:
    <div id="header-middle">
              <div id="header-middle-left"><a href="http://www.acquatua.it/"></a></div>


    this is due to two simple facts, I think:
    the stats.g.doubleclick.net is loaded for the main domian only, notfor the sub.domain
    the difference you see in the code is due to the fact that if the call is made to a svg file that part of the code is ignored.
    Quote Originally Posted by RodG View Post
    Just to avoid possible confusion, are you saying that it's only a problem if the logo is an .svg file ? (see my PS)
    Quote Originally Posted by RodG View Post
    I've performed a search on my own site(s) for "header-middle" hoping to identify the file that has these differences, but came up empty, which suggests that it is to be found in your template file(s).
    I suggest you use the Developers Toolkit and perform your own search to find these files (on each of the sites) so you can compare the differences.

    Cheers
    RodG

    ps. Another possibility is that .svg files are being dissallowed by a server configuration setting (even though both sites are hosted on the same server they are in fact technically speaking, different hosts.




  4. #4
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: Weirdest ever

    I was editing the previous post but it took too much time. please see this one.
    Quote Originally Posted by RodG View Post
    Just to avoid possible confusion, are you saying that it's only a problem if the logo is an .svg file ? (see my PS)
    yes

    Quote Originally Posted by RodG View Post
    I've viewed the source code from both sites, and the difference between them is quite minimal, but there ARE differences, for example, the site with the problem is making a call to stats.g.doubleclick.net. THe site without the problem isn't.
    I don't think this is related in itself, but it does tell me that not all of your files are the same.

    As for your specific problem, the code differences are:

    Code:
     <div id="header-middle">
              <div id="header-middle-left"><a href="http://www.test.acquatua.it/"><img src="includes/templates/tb_sempre/images/logo_420_83_1.svg" alt="Acqua tua il sito per l'acqua da bere" title=" Acqua tua il sito per l'acqua da bere " /></a></div>
    versus

    Code:
    <div id="header-middle">
              <div id="header-middle-left"><a href="http://www.acquatua.it/"></a></div>


    this is due to two simple facts, I think:
    the stats.g.doubleclick.net is loaded for the main domian only, not for the sub.domain
    the difference you see in the code is due to the fact that if the call is made to a svg file that part of the code is ignored.
    Quote Originally Posted by RodG View Post
    Quote Originally Posted by RodG View Post
    I've performed a search on my own site(s) for "header-middle" hoping to identify the file that has these differences, but came up empty, which suggests that it is to be found in your template file(s).
    I suggest you use the Developers Toolkit and perform your own search to find these files (on each of the sites) so you can compare the differences.
    Yes, the template is tb_sempre and you can not find it in your site.
    Quote Originally Posted by RodG View Post

    ps. Another possibility is that .svg files are being dissallowed by a server configuration setting (even though both sites are hosted on the same server they are in fact technically speaking, different hosts.
    Yes that is what I think but bluehost is saying that they can not go back to the old configuration of the server.

    I do not understand how a sub domain can have a different server setting.
    Last but not least, in order to avoid any possible mistake I have done a copy and past fo ALL THE FILES from the main domain to the subdomian, adjusted the configure files and that it is! Subdomain no problem main domain problems

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,960
    Plugin Contributions
    96

    Default Re: Weirdest ever

    An .htaccess restriction, perhaps? If .gif works and .svg doesn't ...

  6. #6
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: Weirdest ever

    Thanks but is not.
    With absolute path the logo is shown
    Ciao from Italy
    enzo

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Weirdest ever

    Quote Originally Posted by enzo-ita View Post
    Yes, the template is tb_sempre and you can not find it in your site.
    Could you please provide a copy of the PHP code that generates this:


    <div id="header-middle"> <div id="header-middle-left"><a href="http://www.test.acquatua.it/"><img src="includes/templates/tb_sempre/images/logo_420_83_1.svg" alt="Acqua tua il sito per l'acqua da bere" title=" Acqua tua il sito per l'acqua da bere " /></a></div>

    Quote Originally Posted by enzo-ita View Post
    I do not understand how a sub domain can have a different server setting.
    That's because you (like most people) don't know the difference between a domain, a sub-domain and a host.

    For example, you are calling
    test.acquatua.it a subdomain, when in fact it is a host called 'test' in the subdomain 'acquatua' of the top level domain 'it'

    acquatua.it
    is a host called 'acquatua' in the 'it' domain

    www.acquatua.it
    it a host called 'www' in the subdomain 'acquatua' of the top level domain 'it'

    www.test.acquatua.it it a host called 'www' in the subdomain 'test' which is a subdomain of 'acquatua', which is a subdomain of the top level domain 'it'

    Each host can/will have its own server settings.

    Quote Originally Posted by enzo-ita View Post
    Last but not least, in order to avoid any possible mistake I have done a copy and past fo ALL THE FILES from the main domain to the subdomian, adjusted the configure files and that it is! Subdomain no problem main domain problems
    I'd still like to see a copy of the PHP code (from the site that doesn't work).

    I also still maintain that even though you've copied all the files, there are STILL differences in the output. For example, the code that does the doubleclick stats.

    Yes, I know you've explained why one site has this but the other doesn't, but this is still a difference between the two sites. You need to eliminate these differences before you can consider both sites as being 'identical'.

    I AM clutching at straws here, and like lat, my gut feeling is that it could be related to the .htaccess file(s), but I performed the same test that you did (loading the logo via a direct link), which does tend to negate this possibility since there were no apparent restrictions.

    What has me puzzled, is that the link isn't being inserted into the page to begin with, which also tends to negate the access restriction hypotheses (otherwise I'd expect the link to be in place, but appear as a broken or missing image, which would make a relatively easy fix). So the real mystery is what is prevent the PHP script from inserting the link to an .svg file, but ONLY an .svg file (apparently).

    Also, what happens if you simply rename your .svg file to .jpg? (don't change the format, just change the name of the file (and of cause, the code that is supposed to load the file).
    I'm not expecting this to fix the problem, but it the effect of the change may provide further clues.

    Cheers
    RodG

  8. #8
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: Weirdest ever

    Hi,
    first of all let me thank you for your commitment to my problem.
    Before answering your questions, let me tell you something new.
    I have set up on a different host a copy of my site.
    Same file set same db.
    Result: exactly the same of www.acq uatua.it i.e. the is logo not shown.
    I then changed the db uploading the db used in test.acq uatua.it
    Result: exactly the same of www.test.acq uatua.it i.e. the logo is shown!!!
    This, to me, tells that the problem is the db and that the code has nothing to do with it.
    I can bet that if I load the test db to the acq uatua site the logo will be shown but I can not do that on my live site.

    However to answer your questions:
    this is the code that calls the logo
    PHP Code:
    <div id="header-middle">
              <div id="header-middle-left"><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT) . '</a>'?></div>
    and it is absolutely the same in the test file set.

    About doubleclick, I am sorry but I can not tell you more. The file sets are exact copy. From acq uatua to test.acq uatua
    Actually that call is made from a plugin that needs to be configured in the test site. Now it is configured and the call is made from both sites, but nothing changed about the logo in the test site.

    On the logo name and extension:

    acq uatua.it changed the logo name from xxxxx.svg to xxxxxsvg.jpg no change the logo is not loaded and a broken image icon is not loaded.
    I have also changed the define file to reflect the new name obviously
    acq uatua.it changed the define file to a gif file the logo.gif is loaded
    acq uatua.it changed the define file to logo.gif and renamed logo.gif to log.gif the logo is not loaded obviuously and the zen cart logo.gif in the folder default_templates/images is loaded.
    acq uatua.it changed the define file to ogo.gif having the logo.gif file in place and the logo is not loaded obviuously and a broken image icon is not loaded.
    then
    test.acq uatua.it acq uatua.it changed the define file to a gif file the logo.gif is loaded
    test.acq uatua.it changed the define file to ogo.gif having the logo.gif file in place and the logo is not loaded obviuously and a broken image icon is loaded.
    test.acq uatua.it changed the define file to logo.gif and renamed logo.gif to log.gif the logo is not loaded obviuously and the zen cart logo.gif in the folder default_templates/images is loaded.

    You are right. There is something that prevents the code to be executed if and only if a link to a non gif or png file has to be created.
    I think that what I wrote at the beginnig of this post should address us to different routes, because I think the problem is sitting in the db laughing at us.
    Thanks again for your help.
    enzo

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Weirdest ever

    Quote Originally Posted by enzo-ita View Post
    Hi,
    first of all let me thank you for your commitment to my problem.
    As I said at the start, I like 'weird' problems. :)

    Quote Originally Posted by enzo-ita View Post
    Before answering your questions, let me tell you something new.
    I have set up on a different host a copy of my site.
    Same file set same db.
    Result: exactly the same of www.acq uatua.it i.e. the is logo not shown.
    I then changed the db uploading the db used in test.acq uatua.it
    Result: exactly the same of www.test.acq uatua.it i.e. the logo is shown!!!
    This, to me, tells that the problem is the db and that the code has nothing to do with it.
    I have to concur.

    Quote Originally Posted by enzo-ita View Post
    You are right. There is something that prevents the code to be executed if and only if a link to a non gif or png file has to be created.
    Thanks for humouring me. It *did* help. :)

    Quote Originally Posted by enzo-ita View Post
    because I think the problem is sitting in the db laughing at us.
    It is looking that way.

    So, after following the code trail, I currently have one suggestion for you to try.

    Navigate your way to configuration->images and take note of the Calculate Image Size setting. If my current punt is correct, this will be set to 'true' on the site that isn't working, and 'false' on the site where it is.

    If that isn't the difference, it is probably one of the other settings.. possibly the Use Proportional Images .

    What has led me here is that .svg files don't have a 'size' in traditional sense:
    http://stackoverflow.com/questions/6...-a-svg-picture

    And after following the code to the html_output.php file I'm seeing a call to:
    $image_size = @getimagesize($src) , which is going to fail with an .svg file (I'm surprised there's nothing in the error logs???)... anyway, it looks as though this portion of code is only called if Calculate Image Size == true so setting this to false could well be the solution/difference that we are looking for. It certainly helps explain why the filetype is making a difference.

    Cheers
    RodG

  10. #10
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: Weirdest ever

    you....you....you...I have no words!
    You got it!!!!!
    Not exactly but the street you drove me was absolutely parallel.
    The setting that did the magic was Image Required that was set to disable.
    Enabling it made the logo to show.
    Now why a svg file is seen as corrupted I do not know. Probably because it can not be resized as you said.
    THANKS THANKS THANKS
    ciao from Italy
    enzo

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Weirdest of the weirdest problems ever seen
    By enzo-ita in forum General Questions
    Replies: 4
    Last Post: 16 Mar 2015, 08:10 PM
  2. Replies: 9
    Last Post: 5 Sep 2012, 04:34 PM
  3. v138a weirdest thing, any shipping address of 'Korea' 'Russian' replaced with 'USA'?
    By mybiz9999 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 26 Jun 2012, 09:29 PM
  4. Weirdest problem on earth.... HTMLAREA
    By odayict in forum General Questions
    Replies: 9
    Last Post: 5 Feb 2009, 07:39 PM
  5. define page - weirdest thing ever!!!
    By phxalfie in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Aug 2008, 02:37 PM

Posting Permissions

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