Guest Posted September 25, 2018 Share Posted September 25, 2018 Quote Enable automatic redirects? Default Setting: true This setting enables/disables the automatic 301 header redirect logic. This sends a moved permanent header for all old URLs to the new ones. This setting is highly recommended for stores that have already been indexed by spiders. I currently use SEO-G urls. I'm interested in removing it and going with Ultimate SEO URLs instead. Installed it in my test site and it works great. My concern is having to manually issue redirects for 6,000 urls. Will the Enable Automatic Redirects setting take care of that problem? Or does that logic only apply to the stock urls that come with a new install of osCommerce? - Andrea Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 25, 2018 Share Posted September 25, 2018 On 9/18/2018 at 12:18 PM, altoid said: PHP Notice: Undefined index: path in /home/barkav5/public_html/includes/classes/seo.class.php Those are due to the field not being declared for the array before it is used. The fix is to declare the field before it is used. But, at a quick glance, that doesn't appear to be a quick fix. For now, I suggest changing the error_reporting line in includes/application_top.php to the following: error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED); ini_set('display_errors','0'); Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 25, 2018 Share Posted September 25, 2018 52 minutes ago, puggybelle said: My concern is having to manually issue redirects for 6,000 urls. Will the Enable Automatic Redirects setting take care of that problem? Or does that logic only apply to the stock urls that come with a new install of osCommerce? It only applies to the stock urls. I think if SEO-G is no longer used, the stock url is provided and that would then be rewritten. But I'm only guessing here so don't rely on that. If not and if the SEO-G urls are consistent in their format, which I think they are, then a general redirect could be added to handle all of them. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted September 25, 2018 Share Posted September 25, 2018 The only difference between my current SEO-G urls and Ultimate SEO urls would be the addition of the product number extension on the end of the url. name-of-product.html will become name-of-product-p-123.html So, I suppose I would have to issue 6,000 redirects. Product 1, Product 2, Product 3 and so on. Bummer. Unless you have a better idea? I hope! - Andrea Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 25, 2018 Share Posted September 25, 2018 In that case I don't think there is a way to do a redirect just using the .htaccess file since the ID isn't in the url. It could be done with code in the application_top file or by using the .htaccess to redirect to a file, where a lookup is done using the rewritten name. I don't know how SEO-G handles that lookup so I can't help with that exactly but the code flow would be something like: if (an seo-g url) get the product ID for it create the stock url redirect to that location } I can't help with how to determine if it is a SEO-G link and then how to look it up since those would be specific to SEO-G. Have you searched the forums for a way to redirect SEO-G url's? That addon has not been actively supported for years, ignoring the recent re-release of it, so there may have been posts about redirecting it at one point. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mhsuffolk Posted September 26, 2018 Share Posted September 26, 2018 Just updated my 2.3.4 store to BS CE Frozen and whilst I was experimenting I accidentality clicked "Uninstall Ultimate SEO" The shop still produces the SEO URLs but the admin entry in Configuration is missing so I have no control. The configuration table has just 4 rows relating to the addon, if I delete them just those 4 return after clicking on a shop item. This worked perfectly on the old shop. Could the new shop, which has the same database as the old one with the exception of the configuration tables, be using a cache for the URLs so in fact it is not doing anything new? Quote Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 26, 2018 Share Posted September 26, 2018 When you use the uninstall option in admin, it just removes the database entries. As soon as a page is refreshed on the shop side, the database changes will be added back in. So, normally, it is safe to use that option as long as you know the settings may have to be adjusted to your site. But that doesn't seem to be the case in your shop. I'm wondering if you are running php 7. Someone on the previous page mentioned this same problem but I can't reproduce it. His problem appeared to be related to the php version though others run it successfully. If you are using V 7 and are able to change that to 5.6, please try that to see if the problem goes away. You might also want to try the version of this addon before the most recent one (just replace the seo.class.php file). Maybe something was changed in It that is causing the problem. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mhsuffolk Posted September 26, 2018 Share Posted September 26, 2018 I have it on 5.6 before I launch into 7. I think I had an error in my configuration table. I have recopied it from my test store and I have my settings back but I tried uninstalling it again and the same thing happened. In myPHPadmin, when displaying the configuration table I get this " Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available." Could this be the issue? I have reloaded the configuration table again and it is working OK (I think) and I can amend the settings. I will stay clear of uninstall! Quote Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
♥raiwa Posted September 26, 2018 Share Posted September 26, 2018 I rermember that I had a similar issue when the configuration table was corrupted and auto increment was not set for configuration id. Same for the configuration group table. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 26, 2018 Share Posted September 26, 2018 @mhsuffolk That message is due to there not being a primary key for that table. The key is part of the stock database so it seems it has either been deleted or that tales is corrupted, as @raiwa mentioned. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mhsuffolk Posted September 26, 2018 Share Posted September 26, 2018 I had not taken the option when I exported the data from my test site to include " PRIMARY KEY (`configuration_group_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1510 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; All working now, I can install and uninstall to my hearts content, and that message has gone from myphpadmin. I have an issue with Site Monitor but I will leave that until tomorrow and another forum. Quote Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
♥altoid Posted September 26, 2018 Share Posted September 26, 2018 On 9/25/2018 at 11:56 AM, Jack_mcs said: Those are due to the field not being declared for the array before it is used. The fix is to declare the field before it is used. But, at a quick glance, that doesn't appear to be a quick fix. For now, I suggest changing the error_reporting line in includes/application_top.php to the following: error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED); ini_set('display_errors','0'); Hi Jack, for clarification, I am not having problems with SEO URLs working shopside. The URLs are generating as they should. I am only letting you know what showed up in the error log as an FYI. I use php.ini for my settings rather than change application_top.php. I've been considering disabling notices and may eventually do so as they are not critical at this point. But if I understand how this works, eventually a notice could turn into a warning with a future php release. Then an even later release the warning could lead to a fatal error. So just long term thinking here is all. Thanks SK Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥altoid Posted September 28, 2018 Share Posted September 28, 2018 @Jack_mcs I rolled back to a 7.1 php version in that my 7.2 version may be causing some of these notices in the php error log. I'll advise later what I observe. Thx Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Mikepo Posted October 18, 2018 Share Posted October 18, 2018 Testing my CE upgrade site which has this SEO URL addon working. PHP 7. I just noticed that if I use the buy now button on the product_info page the continue shopping ( in the cart) returns ok as expected, However,when adding a product (called widget1) from the product listing page the continue shopping button in the Cart returns to the product listing page, but all products' buy now links on the this product listing page now have the same products_id. So if I click on another products' (called widget2) buy now button I add to the cart the previous product called widget1. So I disabled the seo URL addon and the continue shopping button works as normal. This is the code in the shopping cart button <div class="col-sm-<?php echo $content_width; ?> sc-continue-shopping-button"> <?php echo tep_draw_button(MODULE_CONTENT_SHOPPING_CART_BACK_BUTTON_PUBLIC_TITLE, $button_icons, tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']), 'primary', null, $button_style); ?> </div> so what causes this problem when the seo URL module is switched on? These are the SEO URL setting Enable SEO URLs? true Add cPath to product URLs? false Add category parent to product URLs? false Add category parent to begining of URLs? false Filter Short Words 3 Output W3C valid URLs (parameter string)? true Enable SEO cache to save queries? true Enable product cache? true Enable categories cache? true Enable manufacturers cache? true Enable Articles Manager Articles cache? false Enable Articles Manager Topics cache? false Enable FAQDesk Categories cache? false Enable Information Pages cache? false Enable Links Manager cache? false Enable NewsDesk Articles cache? false Enable NewsDesk Categories cache? false Enable Pollbooth cache? false Enable Page Editor cache? false Enable automatic redirects? true Enable use Header Tags SEO as name? false Enable performance checker? false Choose URL Rewrite Type Rewrite Enter special character conversions Remove all non-alphanumeric characters? false Reset SEO URLs Cache false Uninstall Ultimate SEO false Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 19, 2018 Share Posted October 19, 2018 It looks fine to me though maybe the backlink is not correctly formed. But even if it isn't, each url is rewritten as the page load so it would seem something is not right with the continue shopping code. If you add something to the cart and then click on a category, are all of the category links correct? If so, then it is the continue shopping code causing the issue for some reason. You can try disabling all of the cache settings to see if that helps. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Mikepo Posted October 19, 2018 Share Posted October 19, 2018 it would appear, with or without SEO URLS switched on, that the breadcrumb set of links is incorrect. If I start in new products the breadcrumb shows: Catalog - New Products I add a product (Fence Paint) in the shopping cart and then click the continue shopping button, the breadcrumb shows Catalog - Gardening Products - Garden Maintenance - Fence Paint - New Products Why is 'New Products' tagged on to the end of the breadcrumb? This only happens after I've added a product to the cart. The breadcrumb seems to behave itself all other times. Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 19, 2018 Share Posted October 19, 2018 Since the problem isn't related to this addon, please open a thread in the general section about it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted October 20, 2018 Share Posted October 20, 2018 Hi Jack...I am getting this type warning in my error log: [10-Oct-2018 02:37:26 America/New_York] PHP Warning: mysqli_connect(): (HY000/1203): User barkav5_osc1 already has more than 'max_user_connections' active connections in /home/UserName/public_html/includes/classes/seo.class.php on line 86 Here's what I see about in that location: function ConnectDB(){ $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db); if (!$this->link_id) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); Any ideas? Thx Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 20, 2018 Share Posted October 20, 2018 @altoidThat is probably a server issue. It can be caused by this addon if you have a very large number of products, the cache set in the settings and your site is busy. But it is usually a server issue. The problem is that the server has a setting for the number of calls allowed for the database in a certain period. When that limit is reached, you see that error. Once the connections fall back down, the page will then load. You can ask your host if they will increase the max user connections limit. But even if they do, it just allows for more connections and once that new limit is reached the same error will occur. If you have View Counter installed, check for data skimmers since they can cause the connections to increase dramatically and that increases the likelihood of this error. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted October 20, 2018 Share Posted October 20, 2018 2 minutes ago, Jack_mcs said: @altoidThat is probably a server issue. It can be caused by this addon if you have a very large number of products, the cache set in the settings and your site is busy. But it is usually a server issue. The problem is that the server has a setting for the number of calls allowed for the database in a certain period. When that limit is reached, you see that error. Once the connections fall back down, the page will then load. You can ask your host if they will increase the max user connections limit. But even if they do, it just allows for more connections and once that new limit is reached the same error will occur. If you have View Counter installed, check for data skimmers since they can cause the connections to increase dramatically and that increases the likelihood of this error. thanks Jack. I did contact my host and they said since I'm on a shared plan they can't do anything on the setting. This AM I manually blocked the IP for a China source. I may try the view counter to help root these out. Is it CE and PHP 7 good to go? Thx Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted October 20, 2018 Share Posted October 20, 2018 @altoid you can reduce the number of connections required with a simple edit, in the file seo.class.php, in the database handling class at the top, edit the function ConnectDB so that it is simply: function ConnectDB(){ global $db_link; $this->link_id = $db_link; } This makes the class reuse the connection that you already made with tep_db_connect, so each page request only needs a single connection. altoid 1 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
♥altoid Posted October 20, 2018 Share Posted October 20, 2018 20 minutes ago, BrockleyJohn said: @altoid you can reduce the number of connections required with a simple edit, in the file seo.class.php, in the database handling class at the top, edit the function ConnectDB so that it is simply: function ConnectDB(){ global $db_link; $this->link_id = $db_link; } This makes the class reuse the connection that you already made with tep_db_connect, so each page request only needs a single connection. Thx John. Will work on this upon return to workstation. Question, does this have anything to do with what my host asked of me...which is "does you code close it's database connection when it completes it's action"..or whatever. I am clueless on this topic? Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 20, 2018 Share Posted October 20, 2018 2 hours ago, altoid said: I may try the view counter to help root these out. Is it CE and PHP 7 good to go? Yes, it is compatible as far as I know. At least with 7.0. Maybe not with 7.2. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted October 20, 2018 Share Posted October 20, 2018 5 minutes ago, Jack_mcs said: Yes, it is compatible as far as I know. At least with 7.0. Maybe not with 7.2. Thx Jack. I will give it a go. Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted October 20, 2018 Share Posted October 20, 2018 36 minutes ago, altoid said: Thx John. Will work on this upon return to workstation. Question, does this have anything to do with what my host asked of me...which is "does you code close it's database connection when it completes it's action"..or whatever. I am clueless on this topic? Actually, now that you/they bring it up, I've a feeling that Chemo's class doesn't close the connection (while of course the core db functions do that via application_bottom). So you have a double saving - one connection instead of two and nothing left hanging around after the page is built. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x 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.