Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2011
    Posts
    29
    Plugin Contributions
    0

    Default My shop went all black after editing a file

    Hello!
    I urgently need your help!
    My shop is here: http://www.carlmanevent.se/shop/index.php
    and is currently all black

    I know that Zen Cart is complex and I really try to edit as much as I can in the Admin panel, but before my shop went black, I tried to edit the tpl_main_page.php which is in the "common" folder.

    The reason for editing this file, was that after inactivating my banners in the admin apnel, I still got that big area on the top of the page that was white. I read in the code that text about #pane5 was causing this and I went into tpl_main_page-php to put "<--" and "-->" areounf that text. It did not work though and when I edited back so that the file looked as it did before my changes, I got this black page!
    I can honestly say that I changed back everything, so I don't know why i can't even see the shop now...

    Any ideas?

    Here's the area that I first tried to edit, but now is back in its original text:


    <div class="scroll">
    <div class="extra">
    <div class="main-width">
    <div class="holder">
    <div class="scroll-pane" id="pane5">
    <!-- BOF- BANNER #1 display -->
    <?php
    if (SHOW_BANNERS_GROUP_SET1
    != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
    if ($banner-
    >RecordCount() > 0) {
    ?>
    <ul class="blocks">
    <?php
    $new_banner_search =
    zen_build_banners_group(SHOW_BANNERS_GROUP_SET1);

    // secure pages
    switch
    ($request_type) {
    case ('SSL'):

    $my_banner_filter=" and banners_on_ssl= " . "1";
    break;
    case
    ('NONSSL'):

    $my_banner_filter='';
    break;
    }

    $sql = "select
    banners_id from " . TABLE_BANNERS . " where status = 1 " . $new_banner_search .
    $my_banner_filter . " order by banners_sort_order";
    $banners_all = $db-
    >Execute($sql);

    // if no active
    banner in the specified banner group then the box will not show
    $banner_cnt = 0;
    while
    (!$banners_all->EOF) {

    $banner_cnt++;
    $banner =
    zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1);
    echo '<li
    class="scroll-interval">'.zen_display_banner('static', $banners_all-
    >fields['banners_id']).'</li>';
    // add spacing
    between banners
    if
    ($banner_cnt < $banners_all->RecordCount()) {

    }
    $banners_all-
    >MoveNext();
    }
    ?>
    </ul>
    <?php
    }
    }
    ?>
    <!-- EOF- BANNER #1 display -->
    </div>
    </div>
    </div>
    </div>
    </div>



    I know now that I probably should do my editing in the Stylesheet_tm.css file to remove that banner background area,
    but I strongly feel that step number 1 is to get the shop back on track and not looking black!

    Thanks for all your help and input!

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: My shop went all black after editing a file

    Check your logs folder for mydebug files. Post content do not include admin folder name if included.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: My shop went all black after editing a file

    As there previously nothing between these curly brackets?
    Code:
    if 
    ($banner_cnt < $banners_all->RecordCount()) {
    
    }
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: My shop went all black after editing a file

    Quote Originally Posted by carlman View Post
    I tried to edit the tpl_main_page.php which is in the "common" folder.
    Just so that we all start on the same page, there is probably more than one 'common' folder.
    The default one at /includes/templates/template_default/common/ and one for each of the templates/themes that you have installed. eg: /includes/templates/YOUR_TEMPLATES/common/

    If you've edited the tpl_main_page.php in the template_default/common folder you should just replace it with a zencart original.

    If you've edited the tpl_main_page.php in the YOUR_TEMPLATE/common folder I suggest you make a backup copy of it, then replace the edited copy with a zencart original (copy the one from the /template_default/common/ folder.

    This *should* get the site functional again, and from there you start to investigate what went wrong with your original edits.

    Quote Originally Posted by carlman View Post
    Here's the area that I first tried to edit, but now is back in its original text:
    The code you supplied is/was next to useless for diagnostic purposes. As well as the item pointed out by mc1->8, the code as presented has several line breaks where there shouldn't be any. I/we don't know if those breaks were introduced with your original edit, whether it was the result of the way you 'captured' the code, the way the code was pasted into your posting, or simply a result of line wrapping by the forum software because you failed to enclose the code in the CODE tags
    Code:
    code goes here
    The fact that these wraps could have been introduced with your original edit means that it is somewhat pointless looking into other possible causes of your problem until this has been eliminated as the cause.

    Cheers
    RodG

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

    Default Re: My shop went all black after editing a file

    Quote Originally Posted by mc12345678 View Post
    As there previously nothing between these curly brackets?
    Code:
    if 
    ($banner_cnt < $banners_all->RecordCount()) {
    
    }
    Note to OP:
    I'm pretty sure this was meant to be "WAS there previously nothing between these curly brackets?"

    Cheers
    RodG

  6. #6
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: My shop went all black after editing a file

    Quote Originally Posted by RodG View Post
    Note to OP:
    I'm pretty sure this was meant to be "WAS there previously nothing between these curly brackets?"

    Cheers
    RodG
    For confirmation, the teacher has properly identified the expectation. :)

    Blazing heat, outdoors, typing faster than poor little cellphone browser would work, not going back to fix what I remember originally said Was, but also trying to scan for unbalanced closures, etc...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Oct 2011
    Posts
    29
    Plugin Contributions
    0

    Default Re: My shop went all black after editing a file

    Hello guys!
    Thanks for all your time and energy trying to help me!
    After calming down a bit, I also realized that the best way would just to upload the original file again.
    So I did that and everything is back to normal now.
    I also managed to find the .scroll area in the .css file so that white area problem also was resolved.

    So thanks again for helping me and being my support!
    It's good to know that you're around :)

 

 

Similar Threads

  1. Styles gone after editing config file
    By aself in forum Basic Configuration
    Replies: 27
    Last Post: 6 Jun 2011, 06:08 AM
  2. Site Misbehaving After Editing A File
    By need_help in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Jul 2009, 11:08 PM
  3. parse error on index page after editing language file
    By tomintulsa in forum General Questions
    Replies: 5
    Last Post: 9 Jun 2009, 07:21 PM
  4. All my fonts are enlarged after editing Title/Tagline
    By Resqjock in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 13 Nov 2008, 10:00 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