Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Error regarding split_page.php - Sheffield Blue 2.0

Error regarding split_page.php - Sheffield Blue 2.0

Views: 3,301

Results 1 to 17 of 17
25 Jan 2016, 11:55 PM
#1
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Error regarding split_page.php - Sheffield Blue 2.0

Hi All,

Im using the excellent responsive Shefield Blue 2.0 template for our website www.thegreatgiftshop.co.uk

However im getting an error to do with the split_page.php which seems to only occure when 'featured' or all product links are clicked at the bottom of the page.

On the site itself I get the standard > WARNING: An Error occurred, please refresh the page and try again.

and Ive installed the backtrack .sql tool and the log file it generates is the following:-

[25-Jan-2016 23:41:50 UTC] Request URI: /index.php?main_page=featured_products, IP address: ...#1 trigger_error() called at [/home/leisurel/public_html/thegreatgiftshop/includes/classes/db/mysql/query_factory.php:155]
#2 queryFactory->show_error() called at [/home/leisurel/public_html/thegreatgiftshop/includes/classes/db/mysql/query_factory.php:132]
#3 queryFactory->set_error() called at [/home/leisurel/public_html/thegreatgiftshop/includes/classes/db/mysql/query_factory.php:262]
#4 queryFactory->Execute() called at [/home/leisurel/public_html/thegreatgiftshop/includes/classes/split_page_results.php:87]
#5 splitPageResults->splitPageResults() called at [/home/leisurel/public_html/thegreatgiftshop/includes/modules/responsive_sheffield_blue/product_listing.php:35]
#6 include(/home/leisurel/public_html/thegreatgiftshop/includes/modules/responsive_sheffield_blue/product_listing.php) called at [/home/leisurel/public_html/thegreatgiftshop/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php:14]
#7 require(/home/leisurel/public_html/thegreatgiftshop/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php) called at [/home/leisurel/public_html/thegreatgiftshop/includes/templates/responsive_sheffield_blue/templates/tpl_featured_products_default.php:19]
#8 require(/home/leisurel/public_html/thegreatgiftshop/includes/templates/responsive_sheffield_blue/templates/tpl_featured_products_default.php) called at [/home/leisurel/public_html/thegreatgiftshop/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:251]
#9 require(/home/leisurel/public_html/thegreatgiftshop/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/home/leisurel/public_html/thegreatgiftshop/index.php:97]

[25-Jan-2016 23:41:50 UTC] PHP Fatal error: 1109:Unknown table 'p' in field list :: select count(p.products_id) as total ==> (as called by) /home/leisurel/public_html/thegreatgiftshop/includes/classes/split_page_results.php on line 87 <== in /home/leisurel/public_html/thegreatgiftshop/includes/classes/db/mysql/query_factory.php on line 155

Unfortunately though im getting better with .php and .css etc I must confess I have no idea what this means exactly or how to go about fixing it.

Oh I should mention it works fine when I switch to the default Zencart template template.

Any help with how to fix this would be much appreciated.

Cheers

John

26 Jan 2016, 1:33 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Error regarding split_page.php - Sheffield Blue 2.0

kobra:

There is a thread to support the shefield blue template
https://www.zen-cart.com/showthread.php?210062-Responsive-Sheffield-Blue-v1-0

Yeah, but somebody... ahem... Advised starting a new thread in order to understand what the log information meant...

26 Jan 2016, 9:35 AM
#4
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

As MC Said, so I have done....

So what does it mean and how do I fix it ;)

Regards,

John

26 Jan 2016, 12:06 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Error regarding split_page.php - Sheffield Blue 2.0

Bronco78th:

As MC Said, so I have done....

So what does it mean and how do I fix it ;)

Regards,

John

Take a look at the Version 1 of that template beginning around: https://www.zen-cart.com/showthread.php?210062-Responsive-Sheffield-Blue-v1-0&p=1286424#post1286424, supposedly this issue had been resolved in the version 2.0. Then in the 2.0 thread it looks like the solution is to again upload the template version of includes/classes/split_page_results.php as described:
https://www.zen-cart.com/showthread.php?217203-Responsive-Sheffield-Blue-v2-0&p=1298852#post1298852

26 Jan 2016, 12:48 PM
#6
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

Ive certainly put the split_results.php in the Includes/classes folder.

Ive done some experimenting with the turning the files names to .BAK files and that solves the problem...but obviously screws other things up and doesn't stop error logs being created.

26 Jan 2016, 12:51 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Error regarding split_page.php - Sheffield Blue 2.0

Bronco78th:

Ive certainly put the split_results.php in the Includes/classes folder.

Ive done some experimenting with the turning the files names to .BAK files and that solves the problem...but obviously screws other things up and doesn't stop error logs being created.

What other plugins are installed (in this template) or have been installed in the past on this fileset. (May have overridden a file that is "core" or not overriddent by the templatem)

26 Jan 2016, 12:56 PM
#8
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

Only addons are UK Basic mail which adds to Include/Modules/Shipping and nothing else and now (though only after this issue first appears) .SQL back trace....otherwise its a clean install.

The products were added via a spreadsheet as a salvage job as the previous database was bloated to hell and effectually gave up the ghost trying to keep things simple this time and not have a need to install many Mods.

Im gonna contact Anna and see where I can get the .sql for thi template as its not included in the latest install it seems.

26 Jan 2016, 1:10 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Error regarding split_page.php - Sheffield Blue 2.0

Im gonna contact Anna and see where I can get the .sql for thi template as its not included
She has converted it to an auto installer
It is in admin > includes > installer > responsive_sheffield_blue > 2_0.php

26 Jan 2016, 1:26 PM
#10
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

Sorry to be dim but I presume therefore it automatically installs the correct stuff.

Ive got that file uploaded to Admin/includes/Installers/responsive_sheffield_blue

If thats the case then the idea thats to cause for my problems is out the window :(

26 Jan 2016, 3:26 PM
#11
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

Ok after some messing around Ive now managed to get rid of the errors and everything is functioning., no errors are being logged.

But I now have a new problem. The split columes used on the product listing page(s) are not working and seems to be defaulting back to the classic layout for product listing.

Demo - http://zenlyzen.com/mobile-friendly-zen-cart/index.php?main_page=index&cPath=3_10

My site - http://www.thegreatgiftshop.co.uk/index.php?main_page=index&cPath=10_74

Any ideas?

Regards,

John

26 Jan 2016, 8:40 PM
#12
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

ok so after more investigation it seems the 'product lists' thats the Featured items,view all,product lists etc are all defaulting back to the original tpl_tabular_display.php and ignoring the sheffield blue responsive template in override.

The tpl_tabular_display.php is found in Inc/templates/templates_default/common and if I convert that file into a .BAK file on my server no item lists then display.

Still confused about why this had happened though or how to fix it :(

Regards,

John

27 Jan 2016, 12:58 AM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Error regarding split_page.php - Sheffield Blue 2.0

in Inc/templates/templates_default/common and if I convert that file into a .BAK file
Please do not mess with the template_default files
ZenCart's override system needs the base file to exist and will use an override file if there is one

27 Jan 2016, 10:00 AM
#14
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Error regarding split_page.php - Sheffield Blue 2.0

This looks like an issue with sql and aliases. where a table you are querying is set to a letter "p" to make the sql easier. Could I suggest that you put everything back as it was then modify includes/classes/split_page_results.php to turn on the debugging.
after " global $db;" on line 27 add a line as below

$debug=true;

upload the changed file then rerun the page that is giving you issues. This will look bad as lodes of extra printing will be on the screen. copy and paste the extra info in reply to this post and I'll take a look from there. This may take a bit of time as we will have to go step by step to find the solution.

27 Jan 2016, 10:37 AM
#15
bronco78th avatar

bronco78th

New Zenner

Join Date:
Jan 2014
Posts:
51
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

Morning all!

After spending many hours tearing hair out to fix this problem(s) Ive finally solved both.

Unfortunately in regards the initial problem with the error message and log file im not sure what I did, I obviously did something but it seemed to fix itself though ultimately it reverted back to the Tubular default template.

Britainmark as it turns out is on the money. I had experimented with Anna's 'All Bis template' when deciding on a template which most suits our need. which requires a seperate .sql.

I left that .sql in my database initially and when trying to fix the errors on the all listing and Featured page for Sheffield Blue used the .sql script Anna provided for Un- installation of that template to give myself a 'clean slate'.

Unfortunately that forced the Tubular default which was ignoring all the overrides. So I uploaded the first part of the .sql from all Bis which references the layout and changed the layout settings in Admin - configuration from rows to columns (this Option is what the .sql seems to add to the options) and BOOM it all works.

It appears that possibly the autoloaders with the Sheffield Blue didn't work for me.

Gone about 10 hours now and no new log errors ----today will be a good day! :smile:

Cheers for the help/offerings!

John

27 Jan 2016, 10:46 AM
#16
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Error regarding split_page.php - Sheffield Blue 2.0

If you want to try to get to the bottom of the issue check out the index filters. I suspect that there may be one that you use for columns that are not default zen cart. If this is the case then make make sure that in the code where ever you have ' . TABLE_PRODUCTS . ' in the code that it is followed by '" p .." if you do not have the space then the table name will have p appended to it and if the space p is missing then it will not be recognised." below is and example of ok

     $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
       from " . TABLE_PRODUCTS . " p left join " 

not ok

     $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
       from " . TABLE_PRODUCTS . "p left join " 

Could be worth checking out just in case you want to use rows for your listing.

they are in includes\index_filters\ or just search for $listing_sql.

8 Mar 2017, 1:08 AM
#17
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Re: Error regarding split_page.php - Sheffield Blue 2.0

I am getting the exact same error log. I tried looking into the " p left join " that brittainmark mentioned and my code is correct.

Is there another solution for this problem? It appears Bronco78th solved it, but I didn't really understand how his fix would apply to me. And actually, I can't seem to recreate the error either. It shows up daily in my logs, so customers are obviously creating it, but how do I go about duplicating it?