Zen Cart Logo
Forums / General Questions / Warning: an error occurred. please refresh the page

Warning: an error occurred. please refresh the page

Views: 1,806

Results 1 to 11 of 11
12 Apr 2016, 5:08 AM
#1
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Warning: an error occurred. please refresh the page

I am getting an Error in the Feature Products. You can see it here:

http://www.morrisgiftshop.biz/index.php?main_page=featured_products

Yes I do have some products in there.

12 Apr 2016, 5:26 AM
#2
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Warning: an error occurred. please refresh the page

Image attached.
Attachment 16206

12 Apr 2016, 5:35 AM
#3
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Warning: an error occurred. please refresh the page

I cannot see as its down for maintenance

12 Apr 2016, 5:39 AM
#4
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Warning: an error occurred. please refresh the page

gilby:

I cannot see as its down for maintenance

gilby, I just posted an image of it. Previous post.

12 Apr 2016, 5:51 AM
#6
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Warning: an error occurred. please refresh the page

DrByte:

FAQ on the same topic: http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again

DrByte this is what I got:

[12-Apr-2016 00:02:53 America/Chicago] Request URI: /, IP address: 50.26.57.249
#1 require() called at [/xxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php:22]
#2 require(/xxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php) called at [/xxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/column_left.php:31]
#3 require(/xxx/xxxx/public_html/morrisgiftshop.biz/includes/modules/column_left.php) called at [/xxxx/xxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#4 require(/xxxxx/xxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/xxxx/xxxxx/public_html/morrisgiftshop.biz/index.php:97]

[12-Apr-2016 00:02:53 America/Chicago] PHP Warning: require(includes/templates/template_default/sideboxes/tpl_languages_header.php): failed to open stream: No such file or directory in /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php on line 22
[12-Apr-2016 00:02:53 America/Chicago] Request URI: /, IP address: 50.26.57.249
#1 require() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php:22]
#2 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/column_left.php:31]
#3 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/column_left.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#4 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/index.php:97]

[12-Apr-2016 00:02:53 America/Chicago] PHP Warning: require(includes/templates/template_default/sideboxes/tpl_languages_header.php): failed to open stream: No such file or directory in /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php on line 22
[12-Apr-2016 00:02:53 America/Chicago] PHP Fatal error: require(): Failed opening required 'includes/templates/template_default/sideboxes/tpl_languages_header.php' (include_path='.:/opt/php55/lib/php') in /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php on line 22

12 Apr 2016, 5:53 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Warning: an error occurred. please refresh the page

It appears that you've got some custom sideboxes configured, but you're missing the files that make them work.

12 Apr 2016, 5:55 AM
#8
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Warning: an error occurred. please refresh the page

DrByte:

It appears that you've got some custom sideboxes configured, but you're missing the files that make them work.

Are the files that are missing listed in the error logs?

12 Apr 2016, 5:59 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: Warning: an error occurred. please refresh the page

mtechama:

Are the files that are missing listed in the error logs?
[12-Apr-2016 00:02:53 America/Chicago] PHP Warning: require(includes/templates/template_default/sideboxes/tpl_languages_header.php): failed to open stream: No such file or directory in /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php on line 22
[12-Apr-2016 00:02:53 America/Chicago] Request URI: /, IP address: 50.26.57.249
#1 require() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php:22]
#2 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/sideboxes/languages_header.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/column_left.php:31]
#3 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/column_left.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#4 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/index.php:97]

If you read it from the bottom to the top, you'll discover how it works:
index.php
calls tpl_main_page.php
which calls column_left.php
which calls /includes/modules/sideboxes/languages_header.php (not part of Zen Cart)
which calls checks for a tpl_languages_header.php file in your current template folder, and if that doesn't exist it tries template_default.
But since tpl_languages_header.php doesn't exist in your current template folder or in template_default, it's logging "failed to open ... no such file"

12 Apr 2016, 6:28 AM
#10
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Warning: an error occurred. please refresh the page

DrByte:

If you read it from the bottom to the top, you'll discover how it works:
index.php
calls tpl_main_page.php
which calls column_left.php
which calls /includes/modules/sideboxes/languages_header.php (not part of Zen Cart)
which calls checks for a tpl_languages_header.php file in your current template folder, and if that doesn't exist it tries template_default.
But since tpl_languages_header.php doesn't exist in your current template folder or in template_default, it's logging "failed to open ... no such file"

I found the problem and I uploaded the missing files and now I got this:

[12-Apr-2016 01:09:06 America/Chicago] Request URI: /index.php?main_page=featured_products, IP address: 50.26.57.249
#1 trigger_error() called at [/xxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_modules_products_featured_listing.php:21]
#5 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_modules_products_featured_listing.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_featured_products_default.php:87]
#6 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_featured_products_default.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php:171]
#7 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/index.php:97]

[12-Apr-2016 01:09:06 America/Chicago] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 10' at line 1 :: limit 10 ==> (as called by) /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_modules_products_featured_listing.php on line 21 <== in /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php on line 167

12 Apr 2016, 2:32 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Warning: an error occurred. please refresh the page

mtechama:

I found the problem and I uploaded the missing files and now I got this:

[12-Apr-2016 01:09:06 America/Chicago] Request URI: /index.php?main_page=featured_products, IP address: 50.26.57.249
#1 trigger_error() called at [/xxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_modules_products_featured_listing.php:21]
#5 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_modules_products_featured_listing.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_featured_products_default.php:87]
#6 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_featured_products_default.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php:171]
#7 require(/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/index.php:97]

[12-Apr-2016 01:09:06 America/Chicago] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 10' at line 1 :: limit 10 ==> (as called by) /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_classic/templates/tpl_modules_products_featured_listing.php on line 21 <== in /xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php on line 167
That's puzzling. The "limit 10" is from your default pagination setting of 10 items per page. That in itself is perfectly fine.
But the rest of the query that should precede it is missing entirely. That's a problem. And if you're using unaltered original v155 code I can't see why it would disappear.

Have you (or any plugins you've added) made any changes to /includes/modules/pages/featured_products/header_php.php (or are there multiple header_php.* files in that folder?)