Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default troubleshoot help - same code on different site behaves differently

    Hi.

    Not sure where to post, in case please move.

    I have prepared a plugin to submit for the EU people needing the cookie consent (non-sense).
    It works fine on my local test, so I decided to test it on live sites before submitting it, but for some reason out of three sites it works only on one.
    Need your help to troubleshoot.
    It consists of a js snip put at the end of tpl_main_page.php, two files in jscript folder (jquery and js files), and language extra_definitions file.
    Could you please take a look, and see if you can spot why it shows correctly on editricebahai dot com and doesn't show on tesoreriabahai dot org

    Thank you

  2. #2
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: troubleshoot help - same code on different site behaves differently

    Isn't the cookie notification thing only if your company is based in Europe? doesn't matter if your company is based outside of the EU. As far as I know.

    Edit: Just noticed the site is Italian, so Ignore me!

  3. #3
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: troubleshoot help - same code on different site behaves differently

    Looks like your formatting of the JS is wrong. It's all on one line which is commented out with "//" thus ignoring all of the code.

    Broken site:

    2pr9g.png

    Working site:

    code working.png
    Last edited by joecooper; 8 Jun 2015 at 01:55 PM.

  4. #4
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: troubleshoot help - same code on different site behaves differently

    Thanks you.

    There is something happening during the upload, or on the server, as the files are the same; I need to contact the hosting.
    I'll update.

  5. #5
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: troubleshoot help - same code on different site behaves differently

    This is really strange.

    I reuploaded the file (tpl_main_page.php) on tesoreriabahai, and it now works fine.
    So I go on and try it on the third site, plus the live test of this latter (making it the fourth), on these last two the script looks to be on multiple lines, however it does not display.
    These two are cadante dot com, and afzdesign dot com/cadante_151 (this latter being the live test of the former).

    Host says might be upload issues, but I did it quite few times, and like said it seems the script is formatted as it should.

  6. #6
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: troubleshoot help - same code on different site behaves differently

    Load the site and press F12, then go to Console. There are a load of errors of missing files. Best to start with them.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: troubleshoot help - same code on different site behaves differently

    Quote Originally Posted by joecooper View Post
    Load the site and press F12, then go to Console. There are a load of errors of missing files. Best to start with them.
    Applicable to IE. Other browsers have different tools and ways to access them.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: troubleshoot help - same code on different site behaves differently

    Quote Originally Posted by mc12345678 View Post
    Applicable to IE. Other browsers have different tools and ways to access them.
    Well this method will work for at least 93.5% of people, since it works on all common browsers, I think that's a chance worth taking.

    Internet Explorer: Press F12 and go to "Console"
    Chrome: Press F12 and go to "Console"
    Firefox: Press F12 and go to "Console"
    Safari for Windows Press F12 and go to "Console"
    Safari for Mac: No idea.
    Opera: Untested but they use the Chrome Engine

    Would you like me to test with any other browsers?
    Last edited by joecooper; 9 Jun 2015 at 03:05 PM.

  9. #9
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: troubleshoot help - same code on different site behaves differently

    There are of course shortcuts to go directly to the console, but mine was more consistent across browsers:

    http://webmasters.stackexchange.com/...erent-browsers

  10. #10
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: troubleshoot help - same code on different site behaves differently

    Thank you both.

    Quote Originally Posted by mc12345678 View Post
    Applicable to IE. Other browsers have different tools and ways to access them.
    Quote Originally Posted by joecooper View Post
    Load the site and press F12, then go to Console. There are a load of errors of missing files. Best to start with them.
    Besides what joecooper pointed out, I use ff, and firebug, and also time to time chrome and its developper tool, mainly for css.
    Indeed my problem is using the other tools (console etc.) to troubleshoot these kind of issues, hence this thread.

    Nevertheless I did try debugger, and besides not understanding the output I saw only 3 errors due to facebook stuff on cadante dot com (the one most interested in), and one youtube error on the afzdesign/cadante_151 (the test not updated as the former).

    I tried also to remove the snip of the external js loading (which is only for the readme demo), not that I thought it was the cause, but only to not let anything untried.

    So if you can think of other causes I'd greatly appreciate it.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Different server respond to the same editing differently
    By scott_ease in forum General Questions
    Replies: 2
    Last Post: 5 Jan 2015, 07:06 AM
  2. v139h Same code, different results
    By traytray in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Jun 2013, 08:35 AM
  3. moving site to different URL on same server
    By JohnBoyCR in forum General Questions
    Replies: 2
    Last Post: 12 Mar 2009, 08:08 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR