Zen Cart Logo
Forums / General Questions / Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Views: 1,968

Results 1 to 18 of 18
21 Jun 2012, 9:37 AM
#1
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

I have about 11 categories on my site and all of them except two work fine
the two that dont work when i click on them the page loads blank...
but when i de activate the products in those categories it works fine...
can anyone help???

[21-Jun-2012 10:26:41] PHP Warning: Missing argument 2 for cache::sql_cache_exists(), called in /html/includes/classes/db/mysql/query_factory.php on line 123 and defined in /html/includes/classes/cache.php on line 43
[21-Jun-2012 10:26:42] PHP Warning: Cannot modify header information - headers already sent by (output started at /html/includes/languages/black_pure_free/english.php:1421) in /html/includes/init_includes/init_templates.php on line 155
[21-Jun-2012 10:26:42] PHP Warning: Cannot modify header information - headers already sent by (output started at /html/includes/languages/black_pure_free/english.php:1421) in /html/includes/functions/functions_general.php on line 89

21 Jun 2012, 2:45 PM
#2
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Can anybody help?

21 Jun 2012, 9:04 PM
#3
ksookma avatar

ksookma

Zen Follower

Join Date:
Aug 2009
Posts:
212
Plugin Contributions:
1

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Open up a debug file and post that here for me to read.

22 Jun 2012, 8:28 AM
#4
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

ksookma:

Open up a debug file and post that here for me to read.

dude the debug file is in the original post... lol

22 Jun 2012, 12:49 PM
#5
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,865
Plugin Contributions:
3

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Hi,

Can you post which version of Zen Cart you are using.

Thanks

22 Jun 2012, 12:57 PM
#6
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

wilt:

Hi,

Can you post which version of Zen Cart you are using.

Thanks

Version 1.5

22 Jun 2012, 1:48 PM
#7
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,865
Plugin Contributions:
3

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Hi,

It looks like you have customised versions of the files, that the errors are contained in.

Do you have any contributions installed ?

22 Jun 2012, 1:52 PM
#8
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

wilt:

Hi,

It looks like you have customised versions of the files, that the errors are contained in.

Do you have any contributions installed ?

The Time Zone Fix
And The Testimonials module

22 Jun 2012, 2:17 PM
#9
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,865
Plugin Contributions:
3

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

hi,

In /html/includes/classes/db/mysql/query_factory.php

There is a line that reads

function Execute($zf_sql, $zf_limit = false, $zf_cache = false, $zf_cachetime=0) {

can you paste here, that line and the following 30 lines.

22 Jun 2012, 2:30 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Note that "the time zone fix" addon is NOT needed in v1.5, because that code is already built-in. So, it could be that you're using a version of query_factory that was build for an older version of Zen Cart.

25 Jun 2012, 8:23 AM
#11
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

DrByte:

Note that "the time zone fix" addon is NOT needed in v1.5, because that code is already built-in. So, it could be that you're using a version of query_factory that was build for an older version of Zen Cart.

ahhhh, is there anyway to remove it then as i am unsure how to remove them

25 Jun 2012, 8:24 AM
#12
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

wilt:

hi,

In /html/includes/classes/db/mysql/query_factory.php

There is a line that reads

function Execute($zf_sql, $zf_limit = false, $zf_cache = false, $zf_cachetime=0) {

can you paste here, that line and the following 30 lines.

function Execute($zf_sql, $zf_limit = false, $zf_cache = false, $zf_cachetime=0) {

// bof: collect database queries

if (defined('STORE_DB_TRANSACTIONS') && STORE_DB_TRANSACTIONS=='true') {

  global $PHP_SELF, $box_id, $current_page_base;

  if (strtoupper(substr($zf_sql,0,6))=='SELECT' /*&& strstr($zf_sql,'products_id')*/) {

    $f=@fopen(DIR_FS_SQL_CACHE.'/query_selects_' . $current_page_base . '_' . time() . '.txt','a');

    if ($f) {

      fwrite($f,  "\n\n" . 'I AM HERE ' . $current_page_base . /*zen_get_all_get_params() .*/ "\n" . 'sidebox: ' . $box_id . "\n\n" . "Explain \n" . $zf_sql.";\n\n");

      fclose($f);

    }

    unset($f);

  }

}

// eof: collect products_id queries

global $zc_cache;

if ($zf_limit) {
26 Jun 2012, 2:34 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

danmiddo:

ahhhh, is there anyway to remove it then as i am unsure how to remove them
Simple: if you replaced any files when you installed the addon, then put back the original versions of those files.

26 Jun 2012, 8:23 AM
#14
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

DrByte:

Simple: if you replaced any files when you installed the addon, then put back the original versions of those files.

i've replaced the file again but i ran an sql...
how would i remove that?

26 Jun 2012, 10:49 AM
#15
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

Still hav'nt uninstalled the sql if thats what i need to do but my newest debug is this

[26-Jun-2012 10:30:55] PHP Warning: Cannot modify header information - headers already sent by (output started at /html/includes/languages/black_pure_free/english.php:1421) in /html/includes/init_includes/init_templates.php on line 155
[26-Jun-2012 10:30:56] PHP Warning: Cannot modify header information - headers already sent by (output started at /html/includes/languages/black_pure_free/english.php:1421) in /html/includes/functions/functions_general.php on line 89

27 Jun 2012, 9:00 AM
#17
danmiddo avatar

danmiddo

New Zenner

Join Date:
Jun 2012
Posts:
18
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

DrByte:

Unrelated to sql.

A quick FAQ search for "headers already sent" brings up this article: http://www.zen-cart.com/content.php?129-warning-headers-already-sent

Finally sorted thanks :)

24 Aug 2014, 10:40 PM
#18
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Blank Category Pages (2 cats only) - Missing argument 2 for cache::sql_cache_exists()

DrByte:

Note that "the time zone fix" addon is NOT needed in v1.5, because that code is already built-in. So, it could be that you're using a version of query_factory that was build for an older version of Zen Cart.

I upgraded 1 site for my client from 1.3.9 to 1.5.0 and was getting this error. So I updated query_factory.php file from original zc 1.5 and it solved the problem but in ZC admin > version time zone in Central but customer is in Eastern. How I can correct this now?