Forums / General Questions / Catchable fatal error

Catchable fatal error

Locked

Started by notset4life on 8 Apr 2007, 1:23 PM · Views: 3,758

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
8 Apr 2007, 1:23 PM
#1
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Catchable fatal error

Under: Discount Coupons Product/Category Restrictions,

Product Restrictions

Coupon ID Coupon Name Product ID Product Name Allow Deny Remove
Displaying 0 to 0 (of 0 products) Page 0 of 0

Product Name

Catchable fatal error: Object of class queryFactoryResult could not be converted to string in /htdocs/catalog/admin/includes/functions/html_output.php on line 333

what's this about?

10 Apr 2007, 8:34 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Catchable fatal error

Do you have any products in your store?

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

11 Apr 2007, 7:20 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Catchable fatal error

  1. What version of Zen Cart are you using?
  2. What addons/mods have you installed on your site?
  3. How many coupons do you have created?
  4. How many restrictions have you built?
  5. Is it correct that this is only happening for "product" restrictions, and that the "category" restrictions area does not report any errors ?

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

11 Apr 2007, 12:58 PM
#5
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Catchable fatal error

1.3.7
One mod - MSRP thing
About 5 coupons
Restricted to 1 category
No product restrictions

To the right of the dropdown box under Product restrictions is
where that error message appears

Catchable fatal error: Object of class queryFactoryResult could not be converted to string in //htdocs/catalog/admin/includes/functions/html_output.php on line 333

12 Apr 2007, 8:06 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Catchable fatal error

notset4life:

Restricted to 1 category
No product restrictions

To the right of the dropdown box under Product restrictions is
where that error message appears

Catchable fatal error: Object of class queryFactoryResult could not be converted to string in //htdocs/catalog/admin/includes/functions/html_output.php on line 333

There are normally 2 dropdowns under Category Restrictions, and 3 dropdowns under Product Restrictions.

  1. Do I understand correctly that you're seeing the 2 under Category Restrictions but only the first (left) one under Product Restrictions?
  2. In that first dropdown under Product Restrictions, what is selected? Does it say "Top" or does it show the name of the category to which the product is already restricted above in the Category Restrictions section?

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

12 Apr 2007, 11:32 AM
#7
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Catchable fatal error

I've attached a screenshot.

thanks for the help so far.

12 Apr 2007, 11:47 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Catchable fatal error

  1. Do any of your products' names contain any multibyte or non-english characters, including non-letters/numbers ?

  2. Try this edit for debugging: /admin/coupon_restrict.php
    approx line 287:<td class="smallText" valign="top"><?php echo HEADER_PRODUCT_NAME; ?></td> <td class="smallText" align="left"><?php echo zen_draw_pull_down_menu('products_drop', $products_array, $current_category_id); ?></td>Add this ABOVE that:```

<td><pre><?php print_r($products_array); ?></pre></td> ``` This will bust the table-layout, but will show you what data it thinks it's supposed to put into the pulldown menu. Will need another screenshot ;)

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

12 Apr 2007, 5:25 PM
#9
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Catchable fatal error

  1. I don't believe the products contain any "illegal" characters.

I added the lines and it just added a product drop down list with nothing in it.

If I choose a category, the error goes away. (TOP has no Products)

12 Apr 2007, 11:05 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Catchable fatal error

Something seems odd with your database.
However, this bandage approach may work:

/admin/coupon_restrict.php
around line 286 you have:<form name="restrict_category" method="post" action="<?php echo zen_href_link('coupon_restrict.php', zen_get_all_get_params(array('info', 'action', 'x', 'y')) . 'action=add_product&info=' . $cInfo->restrict_id, 'NONSSL'); ?>"> <td class="smallText" valign="top"><?php echo HEADER_PRODUCT_NAME; ?></td> <td class="smallText" align="left"><?php echo zen_draw_pull_down_menu('products_drop', $products_array, $current_category_id); ?></td> <td class="smallText" align="left"><?php echo zen_draw_pull_down_menu('restrict_status', $restrict_array); ?></td> <td class="smallText" align="left"><input type="submit" name="add" value="Add"></td> <td class="smallText" align="left"> </td> <td class="smallText" align="left"> </td>change that to:```
[B]<?php if (sizeof($products_array) > 0) { ?>[/B]
<form name="restrict_category" method="post" action="<?php echo zen_href_link('coupon_restrict.php', zen_get_all_get_params(array('info', 'action', 'x', 'y')) . 'action=add_product&info=' . $cInfo->restrict_id, 'NONSSL'); ?>">
<td class="smallText" valign="top"><?php echo HEADER_PRODUCT_NAME; ?></td>
<td class="smallText" align="left"><?php echo zen_draw_pull_down_menu('products_drop', $products_array, $current_category_id); ?></td>
<td class="smallText" align="left"><?php echo zen_draw_pull_down_menu('restrict_status', $restrict_array); ?></td>
<td class="smallText" align="left"><input type="submit" name="add" value="Add"></td>
<td class="smallText" align="left"> </td>
<td class="smallText" align="left"> </td>
[B]<?php } else { ?>
<td class="smallText" align="left" colspan="6"> </td>

<?php } ?>

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

13 Apr 2007, 2:04 AM
#11
notset4life avatar

notset4life

Zen Follower

Join Date:
Sep 2004
Posts:
177
Plugin Contributions:
0

Re: Catchable fatal error

don't undertand any of this, but it resolved the issue.

thank much

27 Apr 2007, 1:28 PM
#12
deadeye avatar

deadeye

Zen Follower

Join Date:
Jul 2005
Posts:
109
Plugin Contributions:
0

Re: Catchable fatal error

Actually I was getting this same error. 1.3.7 ...upgraded from 1.3.0.2 The product restrictions area initially has the errors, but seems to work after I select a category.

Seems like it's because the 'Top' category is the default but I don't have any products at the top, so it produced the error. Selecting a category with products removes the error and displays the product drop-down for the category. So, seems more like just a check is missing for the 0 products...which your fix should fix. =)

27 Apr 2007, 1:37 PM
#13
deadeye avatar

deadeye

Zen Follower

Join Date:
Jul 2005
Posts:
109
Plugin Contributions:
0

Re: Catchable fatal error

deadeye:

Actually I was getting this same error. 1.3.7 ...upgraded from 1.3.0.2 The product restrictions area initially has the errors, but seems to work after I select a category.

Seems like it's because the 'Top' category is the default but I don't have any products at the top, so it produced the error. Selecting a category with products removes the error and displays the product drop-down for the category. So, seems more like just a check is missing for the 0 products...which your fix should fix. =)

Actually I spoke to soon. That doesn't fix the issue I'm seeing. lol It doesn't really matter, just seems like a check is missing.

5 Jun 2007, 11:09 AM
#14
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Catchable fatal error

for PHP 5.2 people and error message see if this helps - thread