Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2019
    Location
    Toulouse France
    Posts
    13
    Plugin Contributions
    0

    application error When no side columns defined in Layout Setting, PHP Warning: Illegal offset type in

    Hello to every one, and i hope everyone is safe.
    Maybe someone has got the answer.
    I am working with Version v1.5.6a) and until i have at least one column everything works just fine
    This morning the customer asked for a wider central column , so I defined into the Layour Setting Left and right column as global 0.
    Nevertheless the left column continue to be shown.
    So i went to the Side Box Setting and put all boxes to off.
    Now, no products are shown and the error logo gives the following message:
    --> PHP Warning: Illegal offset type in D:\New Webs\DorcasFashion2\includes\modules\responsive_classic\product_listing.php on line 87.
    and repeat ti for all 13 products that should be shown in the page.

    I went to the php listing but before twitching things I would like to have a second guess on how to sort it out.

    Any idea?

    Here you can see the working version chez-francesco.fr

    Thank you in advance

    Claudio

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: When no side columns defined in Layout Setting, PHP Warning: Illegal offset type

    Not sure if it's the whole problem but, you have many HTML errors and a strange setting in one of your stylesheets.

    https://validator.w3.org/nu/?doc=htt...5e29e8ba26e1f8 Is the HTML test.

    Stylesheet problems are that stylesheet_cu.css reads
    Code:
    #logo {
    float: none;text-align: center;}  #pinfo-right-cu{float:left;width:60%;/**
    
     * Main CSS Stylesheet * Claudio modifications * @package templateSystem * @copyright Copyright 2003-2016 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: picaflor-azul Thu Mar 17 12:13:18 2016 -0500 New in v1.5.5 $ */#logo {float: none;text-align: center;}  #pinfo-right-cu{float:left;width:60%;padding:0px 0 0 0;
    and should be
    Code:
    #logo {
    float: none;text-align: center;}  #pinfo-right-cu{float:left;width:60%;padding:0;}
    In css, the following are incorrect. 0px, 0em, 0%, etc. Any time a zero is used, it should not have a clarifier. Zero is Zero.

    So, your padding would become
    Code:
    padding:0 0 0 0;
    but that is an error as well. If top-, right-, bottom-, and left-settings are all the same number, there should only be one setting. Therefore, it should be
    Code:
    padding:0;
    Note the red } in the corrected code. A css line must end in }.

  3. #3
    Join Date
    Mar 2019
    Location
    Toulouse France
    Posts
    13
    Plugin Contributions
    0

    Default Re: When no side columns defined in Layout Setting, PHP Warning: Illegal offset type

    Quote Originally Posted by dbltoe View Post
    Not sure if it's the whole problem but, you have many HTML errors and a strange setting in one of your stylesheets.

    https://validator.w3.org/nu/?doc=htt...5e29e8ba26e1f8 Is the HTML test.

    Stylesheet problems are that stylesheet_cu.css reads
    Code:
    #logo {
    float: none;text-align: center;}  #pinfo-right-cu{float:left;width:60%;/**
    
     * Main CSS Stylesheet * Claudio modifications * @package templateSystem * @copyright Copyright 2003-2016 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: picaflor-azul Thu Mar 17 12:13:18 2016 -0500 New in v1.5.5 $ */#logo {float: none;text-align: center;}  #pinfo-right-cu{float:left;width:60%;padding:0px 0 0 0;
    and should be
    Code:
    #logo {
    float: none;text-align: center;}  #pinfo-right-cu{float:left;width:60%;padding:0;}
    In css, the following are incorrect. 0px, 0em, 0%, etc. Any time a zero is used, it should not have a clarifier. Zero is Zero.

    So, your padding would become
    Code:
    padding:0 0 0 0;
    but that is an error as well. If top-, right-, bottom-, and left-settings are all the same number, there should only be one setting. Therefore, it should be
    Code:
    padding:0;
    Note the red } in the corrected code. A css line must end in }.
    Thank you very much for your quick answer.
    I am going through your comments and let you know.
    Have a nice
    Claudio

  4. #4
    Join Date
    Mar 2019
    Location
    Toulouse France
    Posts
    13
    Plugin Contributions
    0

    Default Re: When no side columns defined in Layout Setting, PHP Warning: Illegal offset type

    Hi dbltoe, thank you for you clues, i checked and corrected the different mistakes.
    By the way there is a warning :
    Warning: The type attribute is unnecessary for JavaScript resources.
    From line 25, column 1; to line 25, column 31
    .css" />↩↩<script type="text/javascript">window
    The statement is already in the original code. What do you suggest leave it as it is or correct? In the latter case how ?
    As <script></script> ?

    Back to the main problem, the error remain, i am going to split the statement in parts to see where the propblem is.

    PHP Code:
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' ' ' 'style="width:' $col_width '%;"',
              
    'text' => (($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' 
                  
    '<div><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' 
                  
    $productsInCategory[$listing->fields['products_id']] . '&products_id=' $listing->fields['products_id']) . '">' 
                  
    zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTHIMAGE_PRODUCT_NEW_HEIGHT) . '</a></div>') .
                  
    '<div class="descr"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' 
                  
    $productsInCategory[$listing->fields['products_id']] . '&products_id=' $listing->fields['products_id']) . '">' 
              
    substr($listing->fields['products_name'],0,PRODUCT_LIST_DESCRIPTION) . '</a></div><div class="price">' $products_price '</div>'); 
    Thank you again for any suggestion.
    Claudio

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: When no side columns defined in Layout Setting, PHP Warning: Illegal offset type

    Quote Originally Posted by Claudio_tls View Post
    By the way there is a warning :
    Warning: The type attribute is unnecessary for JavaScript resources.
    From line 25, column 1; to line 25, column 31
    .css" />↩↩<script type="text/javascript">window
    The statement is already in the original code. What do you suggest leave it as it is or correct? In the latter case how ?
    As <script></script> ?
    First of all, this is a warning and warnings do not effect the operation of a site.

    If a site is fully setup in HTML 5, the type attribute is not needed for the script tag. I imagine all those will be going away in 1.5.8. Meanwhile, it's nothing to worry about.

    As to the other warning, It might be that one of your mods has overwritten the proper code for includes\modules\responsive_classic\product_listing.php

    You didn't answer that part of the posting tips so, I can only suggest that you compare your current file with one from the original ZC download for your CURRENT version.

  6. #6
    Join Date
    Mar 2019
    Location
    Toulouse France
    Posts
    13
    Plugin Contributions
    0

    Default Re: When no side columns defined in Layout Setting, PHP Warning: Illegal offset type

    Quote Originally Posted by dbltoe View Post
    First of all, this is a warning and warnings do not effect the operation of a site.

    If a site is fully setup in HTML 5, the type attribute is not needed for the script tag. I imagine all those will be going away in 1.5.8. Meanwhile, it's nothing to worry about.

    As to the other warning, It might be that one of your mods has overwritten the proper code for includes\modules\responsive_classic\product_listing.php

    You didn't answer that part of the posting tips so, I can only suggest that you compare your current file with one from the original ZC download for your CURRENT version.
    Good morning,
    Found the bug !!!

    PHP Code:
    $list_box_contents[$row][$col
    wrong !!
    PHP Code:
    $list_box_contents[$rows][$col
    correct

    Thank again in any case for the site checking tool, very useful.

    Claudio

 

 

Similar Threads

  1. v154 [Not a bug] PHP Warning: Illegal string offset on PHP 7.2
    By muskiemetal in forum Bug Reports
    Replies: 3
    Last Post: 9 Sep 2019, 09:11 PM
  2. v155 PHP Warning: Illegal string offset 'id' in
    By diptimoy in forum General Questions
    Replies: 1
    Last Post: 9 Feb 2019, 12:47 PM
  3. v155 PHP Warning: Illegal string offset 'versionMajor'
    By gwynwyffar in forum General Questions
    Replies: 8
    Last Post: 10 May 2018, 06:09 PM
  4. v154 PHP Warning: Illegal offset type
    By soxophoneplayer in forum General Questions
    Replies: 3
    Last Post: 22 Aug 2015, 03:24 AM
  5. v151 PHP Warning: Illegal string offset 'id'
    By Nettric in forum Bug Reports
    Replies: 3
    Last Post: 30 May 2014, 06:53 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