Christopher Short Posted February 9, 2017 Share Posted February 9, 2017 How long does it typically take for cubecart to rebuild the SEO links when you delete them? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2017 Share Posted February 9, 2017 Depends where you delete an seo_path. From what I see in the code, if editing a product and you blank the Custom SEO Path, CubeCart rebuilds a default path immediately. If you are in Maintenance, and you bulk delete all custom or default seo_paths, then CubeCart should rebuild default paths at the time CubeCart wants to populate storefront pages with products. (Also applies to categories and documents.) However, I also see in the code that if rebuilding a sitemap is atempted immediately after clearing the seo_path database table, the links will simply have the product name. Which is probably what the default seo_path would be generated as anyway. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 9, 2017 Author Share Posted February 9, 2017 57 minutes ago, bsmither said: Depends where you delete an seo_path. From what I see in the code, if editing a product and you blank the Custom SEO Path, CubeCart rebuilds a default path immediately. If you are in Maintenance, and you bulk delete all custom or default seo_paths, then CubeCart should rebuild default paths at the time CubeCart wants to populate storefront pages with products. (Also applies to categories and documents.) However, I also see in the code that if rebuilding a sitemap is atempted immediately after clearing the seo_path database table, the links will simply have the product name. Which is probably what the default seo_path would be generated as anyway. Is there a way to force the population of the links without manually opening each page? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2017 Share Posted February 9, 2017 How many products do you have? If a reasonable amount, set your store to Global sale mode. Set number of items to display at a high number. On the storefront, click the Sale Items link. You will get only 10-12 items. In the browser address bar, after the URL, add ?page=all This is, of course, the hard way to do it. Hopefully, nothing will melt down. But I see no other way without some code edits. After, put your store's sales mode back to what it was. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 9, 2017 Author Share Posted February 9, 2017 I have over 1500 items... Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2017 Share Posted February 9, 2017 You won't get products that are out of stock or are otherwise not available. Still, 1500 products.... I assume that you are not interested in creating any custom seo paths. You will accept the default.. Let me poke around for a bit. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 9, 2017 Author Share Posted February 9, 2017 Thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2017 Share Posted February 9, 2017 Don't do the following. ================== Please make these edits. Don't. Line numbers are approximate to CC614: Line 268, find: break; ABOVE that, add: $dbType = 'cat'; Line 279, find: break; On a new blank line ABOVE that, add: $dbType = 'doc'; Line 304, find: break; On a new blank line ABOVE that, add: $dbType = 'prod'; Line 310, find: $safe_path = SEO::_safeUrl($path); BELOW that, add: if($existing === false) { $this->setdbPath($dbType,$id,$path,false,false); } The first three edits are necessary because the other functions that call this function use a variety of words, where the seo_path system uses specific words. So, when you have CubeCart rebuild the sitemap, Cubecart will 'ping' Google to fetch it. If you take your store offline first, that notification won't happen. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 10, 2017 Share Posted February 10, 2017 This is not going to work. I have just created an infinite loop. So, don't do this. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 10, 2017 Share Posted February 10, 2017 @Christopher Short can you tell us why you need these seo urls to be immediately generated ? Unless you have a reason that the rest of us are unaware of, we are struggling to understand why you would need this ? Ian Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 10, 2017 Author Share Posted February 10, 2017 48 minutes ago, havenswift-hosting said: @Christopher Short can you tell us why you need these seo urls to be immediately generated ? Unless you have a reason that the rest of us are unaware of, we are struggling to understand why you would need this ? Ian I am getting 404 errors in google. I had to move a bunch of products into new categories as customers were complaining about the category organizing. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 10, 2017 Share Posted February 10, 2017 Doing what you are asking to do wouldn't solve that issue. The way to prevent 404 and loss of SEO link juice is to create 301 redirect directives from the old URL to the new URL - this is done within your .htaccess file Ian Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 16, 2017 Author Share Posted February 16, 2017 On 2/10/2017 at 3:52 AM, havenswift-hosting said: Doing what you are asking to do wouldn't solve that issue. The way to prevent 404 and loss of SEO link juice is to create 301 redirect directives from the old URL to the new URL - this is done within your .htaccess file Ian Can you explain this further for me? When I did some reorganization on the website, moving products from one category to a new category(it was too cluttered), I sent the request to google crawl and now they email me about a huge increase in 404 errors. I had already rebuilt and submitted the sitemap, as well as reset the seo links. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 16, 2017 Share Posted February 16, 2017 What you have done is ask Google (by creating a new sitemap and also asking them to recrawl the site) to start the process of seeing your new urls. There is no control over how quickly they start or how many urls they add to their index - it can take hours, days, weeks or many months. However, what it doesnt do is remove the old links that were already indexed and now dont exist although Google will eventually start doing that - in fact you dont want them immediately removed What you want is for people clicking on that link after doing a Google search is to be redirected to the new url - that is what a 404 error is and what creating a 301 redirect directive does, preserving any SEO link juice that you have built up. The other thing you have to consider is whether any other site has linked to your site (this is the main goal of SEO as external links to your website are one of the main ranking factors) using any of those urls that now dont exist - if they have and somebody clicks on that link to get to your site and gets a 404 error instead, that will almost certainly be a lost sale as well as losing the benefit of that link. Moral of the story, if you ever change a url for something different or remove a url, you should always create a 301 redirect for that url Ian 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.