Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    70
    Plugin Contributions
    0

    Default [Fixed v1.5.1] PHP Error when no Record Company ID with Typefilter

    1.5.0 (upgraded, not new install)
    Add ons: Various order-total modules from swguy and some custom edits (mostly cosmetic)
    SFTP, Official upgrade procedure.

    Only posting as a bug because it deals with incorrect URLs differently to other index filters and produces a debug file. Sorry if these circumstances are not considered bugs.
    -------------------------

    The Record Company index_filter will return a PHP error if &record_company_id= is not included in the URL ie main_page=index&typefilter=record_company

    Other index filters (eg main_page=index&typefilter=music_genre) will return the index page (specifically the index content without index css being recognised). Record company will return an error and the following debug content:

    PHP Fatal error: 1054:Unknown column 'r.record_company_id' in 'field list' :: select distinct r.record_company_id as id, r.record_company_name as name
    from products p, products_to_categories p2c, product_music_extra pme, record_company m
    where p.products_status = 1
    and pme.record_company_id = r.record_company_id
    and p.products_id = p2c.products_id
    and pme.products_id = p.products_id
    and p2c.categories_id = '0'
    order by r.record_company_name in /includes/classes/db/mysql/query_factory.php on line 101

    I was able to 'fix' (posting here to see if there are any ramifications) this by editing line 192 in /includes/index_filters/record_company_filter.php
    TABLE_RECORD_COMPANY . " m
    to
    TABLE_RECORD_COMPANY . " r
    Last edited by maac2; 16 Jul 2012 at 01:29 PM.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP Error when no Record Company ID with Typefilter

    Good catch.
    The fix is correct, and is included in v1.5.1.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Adding description to Record Company or Record Artist
    By koesbong in forum General Questions
    Replies: 3
    Last Post: 21 Apr 2009, 04:25 AM
  2. Record Company link breaks when adding new product
    By credenscel in forum General Questions
    Replies: 5
    Last Post: 19 Sep 2008, 02:51 PM
  3. Record Company link breaks when i add products to it
    By credenscel in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Sep 2008, 06:04 AM
  4. Record Company image
    By swortis in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 12 Aug 2008, 05:46 AM
  5. artist and record company
    By amopro in forum General Questions
    Replies: 0
    Last Post: 3 Feb 2007, 10:02 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