Claudia Posted January 15 Share Posted January 15 Did something change with the pagination with CC6.4.9 or is it my custom code? 1. On all pages of my store, even checkout, there is a } on the top left corner - see image 2. On the category page my pagination is messed up. If I have multiple pages and click on the individual number it's ok. But if I click on view all it gives me a blank screen except for this in the top left corner - See image 3. Here's the code of my top pagination on the category page: {if $PAGINATION} <div class="row text-right right"> <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top"> {include file='templates/element.paginate.php'} </div> </div> {/if} 4. Here’s the code for the bottom pagination on the category page that I've always used: {if $PAGINATION} <div class="row"> <div class="small-12 large-9 columns"> {$PAGINATION} </div> </div> {/if} <div class="hide" id="ccScrollCat">{$category.cat_id}</div> {if $page!=='all' && ($page < $total)} {$params[$var_name] = $page + 1} {* Add "hide-for-medium-up" to the class attribute to not display the more button *} <a href="{$current}{http_build_query($params)}{$anchor}" data-next-page="{$params[$var_name]}" data-cat="{$category.cat_id}" class="button tiny expand ccScroll-next hide-for-medium-up">{$LANG.common.more} <svg class="icon"><use xlink:href="#icon-angle-down"></use></svg></a> {/if} <div class="text-center hide" id="loading"><svg class="icon-x3"><use xlink:href="#icon-spinner"></use></svg></div> </div> 5. When I noticed the above I looked at my error log and I still had over 800 errors even though I had changed my ini.inc.php file as Brian suggested. Is it always going to be like this? 6. Here's what was in the error log pertaining to the pagination. Today, 10:58 [<strong>Exception</strong>] [<strong>Deprecated</strong>] /home/xxxxx/public_html/classes/cache/file.class.php:224 - preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated https://www.cambargainstore.com/ashtrays?page=1 Today, 10:58 [<strong>Exception</strong>] /home/xxxxxx/public_html/cache/skin/918a8a00811b40113065ec26a12d2bc080540e8b_0.file.element.paginate.php.php:43 - Unsupported operand types: string - int https://www.cambargainstore.com/ashtrays?page=all Today, 10:58 [<strong>Deprecated</strong>] /home/xxxxxxx/public_html/classes/cache/file.class.php:224 - preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated https://www.cambargainstore.com/ashtrays?page=3 Today, 10:58 [<strong>Deprecated</strong>] /home/xxxxxxx/public_html/classes/cache/file.class.php:224 - preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated https://www.cambargainstore.com/ashtrays?page=2 As always I truly appreciate any and all help Claudia Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 For #6, please see: https://github.com/cubecart/v6/issues/3114 To fix this, make this edit: In /classes/gui.class.php, near lines 1305-1310, find: $GLOBALS['cache']->write($vars, $cache_id); // See #3026 and #3114 $GLOBALS['smarty']->assign('POPULAR', $vars); $content = $GLOBALS['smarty']->fetch('templates/box.popular.php'); $GLOBALS['smarty']->assign('POPULAR_PRODUCTS', $content); /*}*/ } Make a comment of the first line: // $GLOBALS['cache']->write($vars, $cache_id); // See #3026 and #3114 $GLOBALS['smarty']->assign('POPULAR', $vars); $content = $GLOBALS['smarty']->fetch('templates/box.popular.php'); $GLOBALS['smarty']->assign('POPULAR_PRODUCTS', $content); /*}*/ } Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 15 Author Share Posted January 15 Thanks Brian What about my pagination code stuff? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 In the template "element.paginate.php", I am guessing the culprit is this line: Near line 19: {$params[$var_name] = $page-1} Try this: {$params[$var_name] = $page - 1} Also do the same for line 13 - put spaces on either side of the dash. You may need to have CubeCart clear its internal cache after this skin edit. Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 15 Author Share Posted January 15 I did as you said Line 19: {$params[$var_name] = $page - 1} Line 13: {if ($page >= $show - 1)} It still doesn't work - same issues. Here's what I got in the error log [<strong>Exception</strong>] /home/cambarga/public_html/cache/skin/918a8a00811b40113065ec26a12d2bc080540e8b_0.file.element.paginate.php.php:43 - Unsupported operand types: string - int https://www.cambargainstore.com/aromatherapy?page=all [<strong>Exception</strong>] /home/cambarga/public_html/cache/skin/918a8a00811b40113065ec26a12d2bc080540e8b_0.file.element.paginate.php.php:43 - Unsupported operand types: string - int https://www.cambargainstore.com/aromatherapy?page=all Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 Ah! page=all means that {$page} is something that does not look like a number. It seems this problem should have been evident for many (probably all) versions of CC6. There have been no relevant changes to that template. I will explore some more. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 For #3, have you tried: Instead of: {if $PAGINATION} <div class="row text-right right"> <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top"> {include file='templates/element.paginate.php'} </div> </div> {/if} Use: {if $PAGINATION} <div class="row text-right right"> <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top">{$PAGINATION}</div> </div> {/if} Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 15 Author Share Posted January 15 That didn't change anything Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 (edited) What is your "cam-1" skin based off of? If the code you are using is similar to CC5, then please know that CC6 (not sure what version) has changed that to expect a drop-down selector to force a limit on the number of products to show per page - instead of all of them. The "bug", so to speak, is that CC6 can no longer deal with 'page=all', but did not provide code to catch that should it happen. Edited January 15 by bsmither Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 15 Author Share Posted January 15 It's based off Foundation. When I upgraded to 6.4.9 I went thru each file to see what changes were made. I just noticed that my other store that is running 6.4.7 has this same issue. "The "bug", so to speak, is that CC6 can no longer deal with 'page=all', but did not provide code to catch that should it happen." What can I do to remedy this? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 (edited) There are two immediate choices: Re-code the skins to not show "View All" and implement the code that Foundation now uses for a drop-down selector. Wait for a customization to the core code to deal with "?page=all" For the first, examine the bottom of Foundation's template content.catalogue.php and use the 'traditional' sub-template. Then make sure "cam-1" has the template element.category.pagination.traditional.php. Also, look at the bottom of Foundation's element.paginate.php and note that the code to show "View All" has been commented out. An issue has been posted in the Github: https://github.com/cubecart/v6/issues/3133 Edited January 15 by bsmither Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 (edited) As for the closing parenthesis, examine the template main.php. There may be a rogue paren anywhere between the code in these two lines: {include file='templates/element.google_analytics.php'} {include file='templates/element.js_head.php'} If not then examine the template element.js_head.php. There may be a rogue paren anywhere above or before the code in this line: {combine input=$js_head output='cache/js_head.{$SKIN_FOLDER}.js' age='604800' debug=$CONFIG.debug||!$CONFIG.cache} Edited January 15 by bsmither Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 15 Author Share Posted January 15 I have looked thru those files and more many times and I can't find a rogue }. Probably looking right at it and don't see it knowing me. I changed to the dropdown box for the pagination but I hope this gets resolved sooner than later - that box is ugly LOL Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15 Share Posted January 15 Can't find it? Last place I can think of to examine is element.google_analytics.php. There may be a rogue paren anywhere after </script> near the end of the file. Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 15 Author Share Posted January 15 Found it! I keep copies of my changed files on my computer. Those are the ones I checked. I decided to check thru cPanel and found it in element.google_analytics.php Thanks for all your help! Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 16 Share Posted January 16 For the <select> styling, try this: In element.paginate.php, find: <ul class="pagination" id="element-paginate"> Change to: <ul class="pagination" id="element-paginate" style="padding-top:6px ! important;"> In element.category.pagination.traditional.php, find: <div class="row"> Change to: <div class="row" style="margin-right:12px;"> Find: <select class="url_select"> Change to: <select class="url_select" style=" width: 145px; height: 30px; border: 1px solid #999; font-size: 9px; color: #1c87c9; background-color: #eee; border-radius: 5px; box-shadow: 4px 4px #ccc;"> Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 16 Author Share Posted January 16 That looks alot better - Thanks again! Quote Link to comment Share on other sites More sharing options...
Claudia Posted January 16 Author Share Posted January 16 Thank you Brian, Al and whoever else was involved for gettting this fixed so quickly. Really appreciated Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.