Forums / Upgrading from 1.3.x to 1.3.9 / While working through my conversion...

While working through my conversion...

Locked

Started by mrforce on 13 Sep 2006, 2:48 AM · Views: 1,715

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
13 Sep 2006, 2:48 AM
#1
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

While working through my conversion...

Hey Folks,

I'm currently working thru a V1.3.0.2 to V1.3.5 conversion. Things are going well for the most part, but I do have a nasty little error I'm hoping someone can help point me along the right debug path.

The following error repeats ~9-12 times (product dependent) on my product_info pages:

Warning: preg_match() [function.preg-match]: Unknown modifier 't' in /my/hosts/path/htdocs/store/includes/classes/template_func.php on line 60

This error appears:

  • only on product_info pages
  • only with my custom overrides (i.e. works fine with "Classic Template" selected)

I have only the category sidebox enabled throughout category, product listing and product info pages, yet the error shows up only on product_info.

On a semi-related note, I use the following addOns and can offer this status update:
admin_profiles_1.0.3.zip (tested - needs work)
zc_import_layout_settings.zip (tested - worked without incident)
quickbooks_import_qbi_3.02 (tested - needs work)
backup_mysql_plugin_1.2.10 (tested - worked without incident)
column_layout_grid_for_product_listing_1.3.0.2.zip (tested - worked without incident)
newsletter_subscribe_2.0.5.zip (tested - works with fix described in another thread)
email_archive_search_1.0.zip (tested - worked without incident)
pdf_order_center_.zip (v1.1.1) - (partially tested - seems to work without incident)

Thanks in advance,

Craig

14 Sep 2006, 5:55 AM
#2
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

Re: While working through my conversion...

Note to self :^)

It seems the source of my error is coming from a custom override of product_info.
As a debug step I copied without any modification V1.3.5 template_default/common/tpl_main_page.php into my product_info override directory and it still generates the same errors. If I remove entirely the product_info override directory, all functions correctly.

Can anyone else verify this phenomena?

Thanks,

Craig

19 Sep 2006, 10:20 PM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,899
Plugin Contributions:
22

Re: While working through my conversion...

MrForce:

Warning: preg_match() [function.preg-match]: Unknown modifier 't' in /my/hosts/path/htdocs/store/includes/classes/template_func.php on line 60
What does that line look like?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Sep 2006, 2:21 AM
#4
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

Re: While working through my conversion...

Hmmm...Looks like you're buggered up, too.
Any insight to a fix/workaround?
I've stalled my 1.3.5 migration until I can devote more mindshare to this one.

Thanks for the note...

Craig

20 Sep 2006, 3:36 AM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,899
Plugin Contributions:
22

Re: While working through my conversion...

Let me try it in Yankee since you're north of the Brazos:D

Open the template_func.php mentioned in your post.

Copy lines 54 through 67 and post them here.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Sep 2006, 4:20 AM
#6
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

Re: While working through my conversion...

Righto...thanks for the Big D translation. ;^)

  }
  function file_exists($file_dir, $file_pattern, $debug=false) {
    $file_found = false;
    $file_pattern = '/'.$file_pattern.'$/';
    if ($mydir = @dir($file_dir)) {
      while ($file = $mydir->read()) {
        if (preg_match($file_pattern, $file)) {
          $file_found = true;
          break;
        }
      }

Thought at first it might have something to do with running under a subdomain, so I moved my install out from under the sub...no dice.

Craig

20 Sep 2006, 4:24 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: While working through my conversion...

what are the names of the extra files/folders you have created for this product-type, that don't exist within the basic Zen Cart fileset?

this is parsing filenames and template names in order to determine proper override logic. I need to know what exactly it could be discovering in terms of filenames/folders in order to better understand what's causing this ...

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

20 Sep 2006, 5:06 AM
#8
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

Re: While working through my conversion...

DrByte,

The only folder/file set that causes this is listed below:

includes/templates/custom_template/product_info
  tpl_main_page.php

This is the only file in the folder. I copied the file directly from the v1.3.5 template_default directory without modification and have the same results.

If I remove the product_info directory from my override template set...everything works fine.

Thanks,

Craig

21 Sep 2006, 8:51 PM
#9
wilt avatar

wilt

Oji-san

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

Re: While working through my conversion...

The correct fix is to edit template_func.php

and replace the line (57)

from

$file_pattern = '/'.$file_pattern.'$/';

to

$file_pattern = '/'.str_replace("/", "\/", $file_pattern).'$/';

the problem was caused, by a directory separator in the file pattern, which is only ever there if the file pattern represents a custom template page override.

Thanks for the report

22 Sep 2006, 4:07 AM
#10
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

Re: While working through my conversion...

Wilt,

Happy to help.

That did the trick...Many thanks for the patch code!

Regards,

Craig