[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
TABLE_RECORD_COMPANY . " r
Last edited by maac2; 16 Jul 2012 at 01:29 PM.
Re: PHP Error when no Record Company ID with Typefilter
The fix is correct, and is included in v1.5.1.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
By koesbong in forum General Questions
Last Post: 21 Apr 2009, 04:25 AM
By credenscel in forum General Questions
Last Post: 19 Sep 2008, 02:51 PM
By credenscel in forum Setting Up Categories, Products, Attributes
Last Post: 14 Sep 2008, 06:04 AM
By swortis in forum Setting Up Categories, Products, Attributes
Last Post: 12 Aug 2008, 05:46 AM
By amopro in forum General Questions
Last Post: 3 Feb 2007, 10:02 AM
Content and Graphics Copyright (c) 2003 - 2013 Zen Ventures, LLC - all rights reserved
Zen Cart® is a Registered Trademark of Zen Ventures, LLC