If this is your first visit, check our documentation. To post, register or login.
Forums / Bug Reports / [dup] Missing code in SQL upgrade script

[dup] Missing code in SQL upgrade script

Locked

Started by jeffd on 13 Sep 2006, 4:26 PM · Views: 1,570

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
13 Sep 2006, 4:26 PM
#1
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

[dup] Missing code in SQL upgrade script

After upgrading to 1.3.5 I noticed the below errors in my error log and noticed the advanced search functionality was broken:

[13-Sep-2006 10:34:44] PHP Warning:  constant() [<a href='function.constant'>function.constant</a>]: Couldn't find constant  in C:\server\shop\includes\init_includes\init_add_crumbs.php on line 45

Looking at the code in init_add_crumbs.php it references fields in the get_terms_to_filter table that are not in the 1.3.02 table yet the sql upgrade script does not add these new fields.

Executing the following in the SQL patch tool seems to have corrected the errors and the problems with advanced search:

#
# Table structure for table 'get_terms_to_filter'
#
DROP TABLE IF EXISTS get_terms_to_filter;
CREATE TABLE get_terms_to_filter (
  get_term_name varchar(255) NOT NULL default '',
  get_term_table varchar(64) NOT NULL,
  get_term_name_field varchar(64) NOT NULL,
  PRIMARY KEY  (get_term_name)
) TYPE=MyISAM;

#
# Dumping data for table `get_terms_to_filter`
#

INSERT INTO get_terms_to_filter VALUES ('manufacturers_id', 'TABLE_MANUFACTURERS', 'manufacturers_name');
INSERT INTO get_terms_to_filter VALUES ('music_genre_id', 'TABLE_MUSIC_GENRE', 'music_genre_name');
INSERT INTO get_terms_to_filter VALUES ('record_company_id', 'TABLE_RECORD_COMPANY', 'record_company_name');

Hope this helps!
Jeff

14 Sep 2006, 4:27 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: [dup] Missing code in SQL upgrade script

.
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.

14 Sep 2006, 5:08 PM
#3
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: [dup] Missing code in SQL upgrade script

Sorry Dr. Byte... I searched the forums for advanced search problems and posted this when I found none.

14 Sep 2006, 6:45 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: [dup] Missing code in SQL upgrade script

No problem ... just keeping things consolidated together, rather than open-ended :D

.
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.