Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Very odd error and now I'm stuck!

Very odd error and now I'm stuck!

Locked

Views: 2,144

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
10 Aug 2006, 6:46 PM
#1
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Very odd error and now I'm stuck!

Warning: preg_match(): Unknown modifier 'f' in /home/azure/public_html/includes/classes/template_func.php on line 30

This is the error I'm receiving. I just reinstalled Zen this afternoon (to fix the HTML Area problem I've been having and it's now finally resolved) but I'm baffled. It's working fine on the English side but I'm getting this error on the French side.

http://67.19.186.2/~azure/

This is the link to the main page which is working just fine.... then click on the French flad and you will see this error.

Thank you!
Jennie

10 Aug 2006, 8:19 PM
#2
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

This is due to an unescaped slash in

preg_match($template_part, $file)

Can you print out the value of $template_part and $file immediately after line 30 and let me know what you see?
San

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

10 Aug 2006, 8:32 PM
#3
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

superprg:

This is due to an unescaped slash in

preg_match($template_part, $file)

Can you print out the value of $template_part and $file immediately after line 30 and let me know what you see?
San

Hi! This is what I have:

function get_template_part($page_directory, $template_part, $file_extension = '.php') {
$directory_array = array();
if ($dir = @dir($page_directory)) {
while ($file = $dir->read()) {
if (!is_dir($page_directory . $file)) {
if (substr($file, strrpos($file, '.')) == $file_extension && preg_match($template_part, $file)) {
$directory_array[] = $file;
}
}
}

This is from line 25 to 34.

10 Aug 2006, 8:34 PM
#4
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

Yeah nothing wrong with that code
It is the value of $template_part which is not getting retrieved correct. Dont know how that is happening!
Can you immediately after that line say:
echo $template_part."--" .$file;

and let me know the output
San

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

10 Aug 2006, 8:44 PM
#5
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

superprg:

Yeah nothing wrong with that code
It is the value of $template_part which is not getting retrieved correct. Dont know how that is happening!
Can you immediately after that line say:
echo $template_part."--" .$file;

and let me know the output
San

Hm.... maybe I put it in the wrong spot but now I'm getting a worse error.

/^header_php/--header_php.php
Warning: main(includes/modules/pages/index/.): failed to open stream: No such file or directory in /home/azure/public_html/index.php on line 36

Warning: main(includes/modules/pages/index/.): failed to open stream: No such file or directory in /home/azure/public_html/index.php on line 36

Warning: main(includes/modules/pages/index/.): failed to open stream: No such file or directory in /home/azure/public_html/index.php on line 36

Fatal error: main(): Failed opening required 'includes/modules/pages/index/.' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/azure/public_html/index.php on line 36
10 Aug 2006, 8:59 PM
#6
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

Did you change it back?
I dont see that error at
http://67.19.186.2/~azure/index.php?main_page=index&language=fr

Anyways, you have got the value as /^header_php/--header_php.php
which seems to be correct to me
How come 'f' is coming in the error then? :(

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

10 Aug 2006, 9:00 PM
#7
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

superprg:

Did you change it back?
I dont see that error at
http://67.19.186.2/~azure/index.php?main_page=index&language=fr

Anyways, you have got the value as /^header_php/--header_php.php
which seems to be correct to me
How come 'f' is coming in the error then? :(

Yep - flipped it back asap so I could keep working - my default language is EN so I needed to keep plowing through.

10 Aug 2006, 9:04 PM
#8
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

Is the errror you mentioned generates when you call
http://67.19.186.2/~azure/index.php?main_page=index&language=fr

If not, just do that change again and let me know the result when you call
http://67.19.186.2/~azure/index.php?main_page=index&language=fr

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

10 Aug 2006, 9:06 PM
#9
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

superprg:

Is the errror you mentioned generates when you call
http://67.19.186.2/~azure/index.php?main_page=index&language=fr

If not, just do that change again and let me know the result when you call
http://67.19.186.2/~azure/index.php?main_page=index&language=fr

It's only happening in French....

And can you please tell me exactly where to add that echo liine? I'm not 100% sure where to insert it

10 Aug 2006, 9:15 PM
#10
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

Please let me know what you have in
\includes\languages
Thanks

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

10 Aug 2006, 9:20 PM
#11
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

superprg:

Please let me know what you have in
\includes\languages
Thanks

/azure (my custom template name)
/classic
/english
/french

10 Aug 2006, 9:24 PM
#12
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

And what all files in /french?

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

10 Aug 2006, 9:27 PM
#13
mommydesigns avatar

mommydesigns

Zen Follower

Join Date:
Jul 2006
Posts:
135
Plugin Contributions:
0

Re: Very odd error and now I'm stuck!

superprg:

And what all files in /french?

/azure
/classic
/extra_definitions
/html_includes
/images
/modules
all the same files you find in the English folder.

I'm wondering if I messed something up when I installed the "About_Us" contrib earlier. It's the only contrib. I've added since I reinstalled the French Language contrib which was working fine....