Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Location
    Austin, TX
    Posts
    24
    Plugin Contributions
    0

    Default New Additions Link Odd Behavior

    Howdy, All,

    After upgrading from 1.3.6 to 1.3.7, I noticed some strange behavior between my local development and live web versions of the store, having to do with displaying new items.

    Alas, it's possible this was going on before & I just didn't notice it...

    The store is set up not to display new items on the index page (admin/configuration/index listing = 0,0,0,0,1,2,3,4,1,2,3,4,1,2,3,4,3,3,3,1)

    However, there is a hard-coded define in /includes/languages/english/index.php:

    define('TEXT_GREETING_PERSONAL', 'Hello <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?');

    Which shows the logged-in user a link for showing new items, no matter what the index listing settings may be.

    On the live site this bombs (*REMOVED* is the hard path to the live store...)

    ##############################################################################################################
    Warning: Division by zero in *REMOVED*/includes/classes/split_page_results.php on line 76
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, 0' at line 10
    in:
    [SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status FROM zen_products p LEFT JOIN zen_manufacturers m ON (p.manufacturers_id = m.manufacturers_id), zen_products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 order by p.products_date_added DESC, pd.products_name limit -0, 0]
    ##############################################################################################################

    Am guessing that since new additions is turned off in admin, some code is supplying zero to the $number_of_rows_per_page var that's passed to the splitPageResults class, causing SQL to break when it tries to divide.

    Odd thing is I get different behavior on the local test store. There, it *does* try to display the new additions page, but the fonts are all out of whack, way too big, and under the "Sort By" dropdown, right-justified, I get a "-4 -3 -2 -1 0" (no quotes) with the zero in black & the other numbers in a different color.

    I tried changing all the index listing vars to zero (except for the 3 'columns per row' settings toward the bottom) but that had no effect on either the dev or live version.

    Code-wise, the local dev & live sites are the same, except for a couple of path definitions in configure.php.

    Versions of OS / Apache / PHP / MySQL:
    Local: CYGWIN_NT-5.1 1.5.22(0.156/4/2) / 2.2.3 / 5.2.0 / 5.0.27-community
    Live: Linux 2.6.9999 / 1.3.37 / 4.2.1 / 5.1.4

    Anyone else seeing this behavior?

    For now, the kludge, er, ah, *solution* is simply to override the new additions link in TEXT_GREETING_PERSONAL.

    Still, I'm a little curious why the same code would produce two different effects.

    Again, the code for the local & live versions is the same. Thanks to the override system, I was able to simply copy the entire new 1.3.7 fileset into the local version, upgrade the database, verify things seemed to be working OK, then repeat for the live version.

    Take care!
    --
    Carl

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: New Additions Link Odd Behavior

    Did you also replicate/copy the Database so that you are certian that all the settings contained in the DB are identical?
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v139a How to troubleshoot odd behavior
    By jgold723 in forum General Questions
    Replies: 1
    Last Post: 29 Dec 2012, 01:26 PM
  2. Simple Dropdown causing odd Breadcrumb behavior
    By Hell Guapo in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 18 Jan 2012, 10:44 AM
  3. Odd Zip Code Behavior
    By Stuff4Toys in forum General Questions
    Replies: 3
    Last Post: 21 Dec 2010, 12:35 AM
  4. Odd behavior from linkpoint module
    By darkswan in forum General Questions
    Replies: 1
    Last Post: 3 Aug 2009, 08:15 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