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

    Idea or Suggestion Category Name and Categories Description now show on backend?

    my site works well online, but when i move to localhost, the Category Name and Categories Description now show on backend,
    Click image for larger version. 

Name:	category.png 
Views:	190 
Size:	17.3 KB 
ID:	16781
    on frontend i can see Category Name and Categories Description without any problems.

    besides, for product name and description are the same situation.

    my zencart version: v1.5.1
    wampserver3.0.6_x86_apache2.4.23_mysql5.7.14_php5.6.25-7.0.10

    i checked logs error:
    [11-Nov-2016 07:46:46 UTC] PHP Warning: Invalid argument supplied for foreach() in D:\wamp\www\pinbadge\adminn\includes\ckeditor.php on line 15
    [11-Nov-2016 07:46:46 UTC] PHP Stack trace:
    [11-Nov-2016 07:46:46 UTC] PHP 1. {main}() D:\wamp\www\pinbadge\adminn\categories.php:0
    [11-Nov-2016 07:46:46 UTC] PHP 2. include() D:\wamp\www\pinbadge\adminn\categories.php:559


    how to solve my problem? thanks in advance.

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

    Default Re: Category Name and Categories Description now show on backend?

    My response relates to the PHP version/ZC version aspect that may play a factor as relates to the posted server requirements: http://www.zen-cart.com/content.php?...o-run-zen-cart

    Otherwise things such as an incomplete database transfer/restoration may be involved, method of transfer, database problems, etc.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Category Name and Categories Description now show on backend?

    just a guess; i would think your languages table has no data...

    prior to clicking on the edit category, you could also change the editor to plain text.

    good luck.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Jul 2016
    Posts
    35
    Plugin Contributions
    0

    Default Re: Category Name and Categories Description now show on backend?

    i can make sure database complete transfer. The same database i tested on live server it works well.

    So Zen Cart v1.5.1 is not compatible with PHP 5.6.25? this is the problem?

  5. #5
    Join Date
    Jul 2016
    Posts
    35
    Plugin Contributions
    0

    Default Re: Category Name and Categories Description now show on backend?

    Quote Originally Posted by carlwhat View Post
    just a guess; i would think your languages table has no data...

    prior to clicking on the edit category, you could also change the editor to plain text.

    good luck.
    Thanks. languages table has data, see below pic:
    Click image for larger version. 

Name:	languages.png 
Views:	159 
Size:	32.0 KB 
ID:	16785

    I also tested plain text editor before clicking on the edit category, still the same

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Category Name and Categories Description now show on backend?

    #1 - i don't think this is a compatibility issue.
    #2 - have you posted the complete debug log? i don't think the script should stop on a warning. please post the complete contents of the debug log.
    #3 - post the contents on the ckeditor.php file.

  7. #7
    Join Date
    Jul 2016
    Posts
    35
    Plugin Contributions
    0

    Default Re: Category Name and Categories Description now show on backend?

    Quote Originally Posted by carlwhat View Post
    #1 - i don't think this is a compatibility issue.
    #2 - have you posted the complete debug log? i don't think the script should stop on a warning. please post the complete contents of the debug log.
    #3 - post the contents on the ckeditor.php file.
    #2, yes, i have posted the completed debug log, i checked again. by the way, when i select plain text, there's no error log, once i selected CKEditor, the error caused.
    #3
    PHP Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2010 Kuroi Web Design
     * @copyright Portions Copyright 2009 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ckeditor.php 277 2010-05-22 14:09:32Z kuroi $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }

    $var zen_get_languages();
    $jsLanguageLookupArray "var lang = new Array;\n";
    foreach (
    $var as $key)
    {
      
    $jsLanguageLookupArray .= "  lang[" $key['id'] . "] = '" $key['code'] . "';\n";
    }
    ?>
    <script type="text/javascript" src="<?php echo (strstr(HTTP_SERVER'ttps:') ? 'https' 'http'); ?>://www.google.com/jsapi"></script>
    <script type="text/javascript">if (typeof jQuery == 'undefined') google.load("jquery", "1");</script>
    <script type="text/javascript" src="../<?php echo DIR_WS_EDITORS ?>ckeditor/ckeditor.js"></script>
    <script type="text/javascript"><!--
    $(document).ready(function() {
      <?php echo $jsLanguageLookupArray ?>
      $('textarea').each(function()    {
        if ($(this).attr('name') != 'message' && $(this).attr('class') != 'noEditor')
        {
          index = $(this).attr('name').match(/\d+/);
          if (index == null) index = <?php echo $_SESSION['languages_id'?>;
          CKEDITOR.replace($(this).attr('name'),
            {
              coreStyles_underline : { element : 'u' },
              width : 760,
              language: lang[index]
            });
        }
      });
    });
    //--></script>

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Category Name and Categories Description now show on backend?

    the error message is complaining about line 15:

    foreach ($var as $key)

    in general, this problem is because $var is not an array.

    $var gets established 2 lines above, in zen_get_languages. which is why i would think there is nothing in the languages table.

    we can add the following line just above the foreach line to see what is in $var and post the results:

    print_r($var);

  9. #9
    Join Date
    Jul 2016
    Posts
    35
    Plugin Contributions
    0

    Default Re: Category Name and Categories Description now show on backend?

    Quote Originally Posted by carlwhat View Post
    the error message is complaining about line 15:

    foreach ($var as $key)

    in general, this problem is because $var is not an array.

    $var gets established 2 lines above, in zen_get_languages. which is why i would think there is nothing in the languages table.

    we can add the following line just above the foreach line to see what is in $var and post the results:

    print_r($var);
    >> I have added this line above the foreach line, but error logs are the same as before, no other errors.
    PHP Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2010 Kuroi Web Design
     * @copyright Portions Copyright 2009 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ckeditor.php 277 2010-05-22 14:09:32Z kuroi $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }

    $var zen_get_languages();
    $jsLanguageLookupArray "var lang = new Array;\n";
    print_r($var);
    foreach (
    $var as $key)
    {
      
    $jsLanguageLookupArray .= "  lang[" $key['id'] . "] = '" $key['code'] . "';\n";
    }
    ?>
    <script type="text/javascript" src="<?php echo (strstr(HTTP_SERVER'ttps:') ? 'https' 'http'); ?>://www.google.com/jsapi"></script>
    <script type="text/javascript">if (typeof jQuery == 'undefined') google.load("jquery", "1");</script>
    <script type="text/javascript" src="../<?php echo DIR_WS_EDITORS ?>ckeditor/ckeditor.js"></script>
    <script type="text/javascript"><!--
    $(document).ready(function() {
      <?php echo $jsLanguageLookupArray ?>
      $('textarea').each(function()    {
        if ($(this).attr('name') != 'message' && $(this).attr('class') != 'noEditor')
        {
          index = $(this).attr('name').match(/\d+/);
          if (index == null) index = <?php echo $_SESSION['languages_id'?>;
          CKEDITOR.replace($(this).attr('name'),
            {
              coreStyles_underline : { element : 'u' },
              width : 760,
              language: lang[index]
            });
        }
      });
    });
    //--></script>
    can can i do now?

  10. #10
    Join Date
    Jul 2016
    Posts
    35
    Plugin Contributions
    0

    Default Re: Category Name and Categories Description now show on backend?

    Quote Originally Posted by carlwhat View Post
    the error message is complaining about line 15:
    foreach ($var as $key)
    in general, this problem is because $var is not an array.
    $var gets established 2 lines above, in zen_get_languages. which is why i would think there is nothing in the languages table.
    we can add the following line just above the foreach line to see what is in $var and post the results:
    print_r($var);
    -------------------------------------------------------------------
    >> Thanks, I have added this line above the foreach line, but error logs are the same as before, no other errors.
    PHP Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2010 Kuroi Web Design
     * @copyright Portions Copyright 2009 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ckeditor.php 277 2010-05-22 14:09:32Z kuroi $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }

    $var zen_get_languages();
    $jsLanguageLookupArray "var lang = new Array;\n";
    print_r($var);
    foreach (
    $var as $key)
    {
      
    $jsLanguageLookupArray .= "  lang[" $key['id'] . "] = '" $key['code'] . "';\n";
    }
    ?>
    <script type="text/javascript" src="<?php echo (strstr(HTTP_SERVER'ttps:') ? 'https' 'http'); ?>://www.google.com/jsapi"></script>
    <script type="text/javascript">if (typeof jQuery == 'undefined') google.load("jquery", "1");</script>
    <script type="text/javascript" src="../<?php echo DIR_WS_EDITORS ?>ckeditor/ckeditor.js"></script>
    <script type="text/javascript"><!--
    $(document).ready(function() {
      <?php echo $jsLanguageLookupArray ?>
      $('textarea').each(function()    {
        if ($(this).attr('name') != 'message' && $(this).attr('class') != 'noEditor')
        {
          index = $(this).attr('name').match(/\d+/);
          if (index == null) index = <?php echo $_SESSION['languages_id'?>;
          CKEDITOR.replace($(this).attr('name'),
            {
              coreStyles_underline : { element : 'u' },
              width : 760,
              language: lang[index]
            });
        }
      });
    });
    //--></script>
    Can you please tell me what can i do now?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Product name and description does not show at all
    By tsehov in forum General Questions
    Replies: 14
    Last Post: 25 Apr 2014, 09:47 PM
  2. v151 query from a category its products name, price, image, description and attributes
    By cmsdeployed in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Jul 2013, 07:21 PM
  3. Replies: 3
    Last Post: 14 Dec 2008, 07:38 AM
  4. Spacing between Category Name & Category Description
    By raunharman in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Dec 2007, 11:31 PM
  5. how to show Category and Sub-Categories always?
    By security in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 29 Nov 2007, 04:23 AM

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