Zen Cart Logo
Forums / General Questions / Finding a non existent file?

Finding a non existent file?

Views: 944

Results 1 to 7 of 7
19 Jan 2011, 9:53 PM
#1
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Finding a non existent file?

Got a bit of a puzzle here... error message says that

require(includes/templates/template_default/templates/tpl_product_music_default.php): failed to open stream: No such file or directory in /includes/templates/template_default/common/tpl_main_page.php on line 122

Fine - that tells me (not surprisingly!) that there's no file named tpl_product_music_default.php which is being called from line 122 in tpl_main_page.php

The problem is that line 122 is ```
require($body_code);

19 Jan 2011, 10:45 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Finding a non existent file?

That filename may be dynamically generated wherever it is used, so it would not appear as such. Try a smaller string, like product_music or something.

22 Jan 2011, 9:14 PM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Finding a non existent file?

Oh, I've tried everything I can think of! A variation of the error is displayed today with the filenames of tpl_product_music_infoaND88_default.php and tpl_product_music_infoaND83_default.php so as you suggest, it's being dynamically generated...but as to where from remains a complete mystery...to me anyway!

But thanks for the response.

22 Jan 2011, 10:56 PM
#4
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Finding a non existent file?

Are you using a mod of some kind or have music products?

includes/templates/template_default/templates/tpl_product_music_default.php

  • although this is not a default Zen Cart file, it does need to be there -- as part of a module -- if another file calls for it -- but it won't call for it by that name. Weird, I know, but that's how some of the files work.
23 Jan 2011, 12:12 AM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Finding a non existent file?

Thanks for that Rob - it is music products. The site has recently been upgraded to 1.3.9h but I have checked all the old files just to see if I'd missed something, but it didn't exist there either...and the old one was a 1.3.7 so had been there for ever!

It's an odd one for sure - it's not repeated tonight

23 Jan 2011, 1:40 AM
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Finding a non existent file?

Although line 122 states require($body_code); is there an IF statement just before that?

Odds are there is... or some module, default or addon, with files in 'includes/modules/pages/custom_module' is calling for an array or other type code and needs the 'tpl_product_music_default.php' to display the output. I'm not a database guy so not quite sure of the details but I've had some custom modules created which work along the same method.

23 Jan 2011, 2:06 AM
#7
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Finding a non existent file?

Nope - the tpl_main_page is as per the ZC default for 1.3.9h and there is no override.

I've text-searched all filea using grep at root level and I've searched the database... nothing that shouldn't be there.

But thanks for the suggestions. To be honest, unless it starts becoming a serious problem, I'm not going to waste any more time it....but it's just so £%*(! frustrating! :D