Jack_mcs Posted April 2, 2019 Share Posted April 2, 2019 I don't know what the problem might be. All I can say is that I've installed this addon into many shops without any problems. Try setting all of the settings for it to false, except for the first one to see if that makes a difference. If not, the problem is beyond something I can fix in a support thread. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 2, 2019 Share Posted April 2, 2019 13 hours ago, vampirehunter said: i did error log check and it says this PHP Warning: mysql_fetch_array() expects parameter 2 to be long, string given in /home/test/mysite.com/store/includes/functions/database.php on line 225 @vampirehunter I recommend that you try to get the mysqli extension enabled for your installation. mysql is deprecated even on php 5.6 and not available on php7. It's possible that there are bits of code that don't work properly on this old extension. vampirehunter and altoid 2 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...
vampirehunter Posted April 2, 2019 Share Posted April 2, 2019 54 minutes ago, BrockleyJohn said: @vampirehunter I recommend that you try to get the mysqli extension enabled for your installation. mysql is deprecated even on php 5.6 and not available on php7. It's possible that there are bits of code that don't work properly on this old extension. how is this enabled on web hosting? does the webhost have to do it? or can it be done in cpanel? Quote Link to comment Share on other sites More sharing options...
vampirehunter Posted April 2, 2019 Share Posted April 2, 2019 1 hour ago, BrockleyJohn said: @vampirehunter I recommend that you try to get the mysqli extension enabled for your installation. mysql is deprecated even on php 5.6 and not available on php7. It's possible that there are bits of code that don't work properly on this old extension. i installed the latest 2.2 seo urls on an edge installation and im getting that php error in error log. neither the category or product names are showing in the urls, just the product ids and category ids been through the installlation step by step multiple times so not sure why its not working Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 2, 2019 Share Posted April 2, 2019 5 minutes ago, vampirehunter said: how is this enabled on web hosting? does the webhost have to do it? or can it be done in cpanel? On shared hosting, it's usually implicit in your choice of php version. You'll likely need the host's help to get the right php.ini file set up. First, use the Server Info option in admin/tools and search for mysqli. If you have a section with that heading, the extension is enabled and there's an issue with the code somewhere. If you don't have that section, speak to your webhosts and if you need more help from us on here, start a separate thread because in that case it's not an SEO Urls issue vampirehunter 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...
vampirehunter Posted April 2, 2019 Share Posted April 2, 2019 8 minutes ago, BrockleyJohn said: On shared hosting, it's usually implicit in your choice of php version. You'll likely need the host's help to get the right php.ini file set up. First, use the Server Info option in admin/tools and search for mysqli. If you have a section with that heading, the extension is enabled and there's an issue with the code somewhere. If you don't have that section, speak to your webhosts and if you need more help from us on here, start a separate thread because in that case it's not an SEO Urls issue Hi, that was it! i enabled mysqli in cpanel via php selector and it worked straight away cheers Quote Link to comment Share on other sites More sharing options...
edoscript Posted April 22, 2019 Share Posted April 22, 2019 I have installed this module back in January and everything works fine. Last week I noticed a strange BUG that I couldn't yet find a solution to, and I would appreciate if someone can give me a hint. Basically, if the product name contains the word "by" (i.e. Good Product by Our company) then the script returns an error. In other words, the URL that is being generated will be something similar to this: https://www.-...-.com/good-product-by-our-company-p-23.html which returns an error: Not Found The requested URL /all-products.php was not found on this server. Then if I remove the phrase "-by-" or change it in any way (i.e. replacing it with "-by_-") then the error goes away. So somehow the presence of the "-by-" phrase sends a request for the URL /all-products.php, which is not found on the server. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 22, 2019 Share Posted April 22, 2019 6 hours ago, edo.script said: Then if I remove the phrase "-by-" or change it in any way (i.e. replacing it with "-by_-") then the error goes away. So somehow the presence of the "-by-" phrase sends a request for the URL /all-products.php, which is not found on the server. This addon uses certain characters to identify the page. For example, -p- is a product page and -c- is a category page. The -by- is used to identify All Product pages. So when that is used in the url, the code thinks it is a link to an All Products page and tries to create the url for it, which is invalid. The word by is not useful for SEO and will be ignored by the search engines. If you want it for your customers, you would have to change the code in this addon to use a different identifier. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
edoscript Posted April 22, 2019 Share Posted April 22, 2019 7 hours ago, Jack_mcs said: This addon uses certain characters to identify the page. For example, -p- is a product page and -c- is a category page. The -by- is used to identify All Product pages. So when that is used in the url, the code thinks it is a link to an All Products page and tries to create the url for it, which is invalid. The word by is not useful for SEO and will be ignored by the search engines. If you want it for your customers, you would have to change the code in this addon to use a different identifier. That makes sense and I was guessing that it has to be a kind of a key phrase. Then I guess I would simply get rid of it. Thanks. Quote Link to comment Share on other sites More sharing options...
edoscript Posted April 22, 2019 Share Posted April 22, 2019 7 hours ago, Jack_mcs said: This addon uses certain characters to identify the page. For example, -p- is a product page and -c- is a category page. The -by- is used to identify All Product pages. So when that is used in the url, the code thinks it is a link to an All Products page and tries to create the url for it, which is invalid. The word by is not useful for SEO and will be ignored by the search engines. If you want it for your customers, you would have to change the code in this addon to use a different identifier. I saw the RewriteRules (-by-, -au-, -links-, etc.) in the .htaccess file. Wouldn't it be a better idea to check for these key-phrases within the product name and remove them before the SEO link is generated? I took a quick look and couldn't find the code where the str_replace(" ", "-",... command is executed for product names. if you can point it out to me that would be helpful. Thanks! Quote Link to comment Share on other sites More sharing options...
edoscript Posted April 22, 2019 Share Posted April 22, 2019 (edited) 25 minutes ago, edo.script said: I saw the RewriteRules (-by-, -au-, -links-, etc.) in the .htaccess file. Wouldn't it be a better idea to check for these key-phrases within the product name and remove them before the SEO link is generated? I took a quick look and couldn't find the code where the str_replace(" ", "-",... command is executed for product names. if you can point it out to me that would be helpful. Thanks! If there are no other reasons why we shouldn't, maybe within function get_product_name($pID){ right after line: $pName = $this->strip( $result['pName'] ); we can add something like: $pName = str_replace("-p-", "-", $pName); $pName = str_replace("-c-", "-", $pName); $pName = str_replace("-m-", "-", $pName); $pName = str_replace("-pi-", "-", $pName); $pName = str_replace("-by-", "-", $pName); ...... $pName = str_replace("-fra-", "-", $pName); $pName = str_replace("-i-", "-", $pName); $pName = str_replace("-links-", "-", $pName); ................ which would remove the phrases that have no SEO benefits yet may interfere with the SEO functionality. Thanks! Edited April 22, 2019 by edo.script Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted April 22, 2019 Share Posted April 22, 2019 (edited) You could use the short word filter and set it to 2: Filter Short Words This setting will filter words less than or equal to the value from the URL. or use the character conversion list: Enter special character conversions This setting will convert characters. The format MUST be in the form: char=>conv,char2=>conv2 This allows to remove concrete expressions like: by=>[leave empty] Don't forget to reset the SEO cache after changing any of these settings 😉 Edited April 22, 2019 by raiwa 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...
edoscript Posted April 22, 2019 Share Posted April 22, 2019 12 minutes ago, raiwa said: You could use the short word filter and set it to 2: Filter Short Words This setting will filter words less than or equal to the value from the URL. or use the character conversion list: Enter special character conversions This setting will convert characters. The format MUST be in the form: char=>conv,char2=>conv2 This allows to remove concrete expressions like: by=>[leave empty] Much better idea. Thank you for bringing this up. My short words was on 1, which i changed to 2. As far as the character conversion, I see it is Case SeNSitive. So we would need to have (By=>, BY=>, by=> ) to make sure it serves the purpose. Thanks. raiwa 1 Quote Link to comment Share on other sites More sharing options...
douglaswalker Posted May 14, 2019 Share Posted May 14, 2019 Hi there using this great contribution oscom-ultimate-seo-urls latest version sorry if I am in the wrong spot somehow Google has found a url https://www.mysite.com.au/index.php?cpath=50 note the lower case p in cpath instead of P. This has never been a url on my site No idea where this URL came from but google is insisting it is an error and if this link is followed it creates a redirect loop . I have tried to 301 redirect it to the correct place which is https://www.mysite.com.au/kaleidoscopes-c-50.html but i cannot for the life of me get it to redirect. The correct version with the proper cPath redirects correctly Just wondered if you have an suggestions Quote Link to comment Share on other sites More sharing options...
douglaswalker Posted May 14, 2019 Share Posted May 14, 2019 as suggested by Jack I have searched for cpath as opposed to cPath in my files. I can find instances of cpath in the includes/classes/category_tree.php however checking the latest version they are all cpath is that correct? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 14, 2019 Share Posted May 14, 2019 The uses of cpath in that file are for variables. The actual url parameter uses cPath. I didn't scour the whole file but it doesn't appear that there is a problem with that file. douglaswalker 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Hotclutch Posted May 14, 2019 Share Posted May 14, 2019 you should remove the htaccess redirect until you're sure of the code, because you can't do a simple redirect with the query string parameter. It's possible that there's an external link to that URL, that might be how google discovered it. You should examine that URL with the google inspection tool to see what further information there might be. I have checked your site, and does not appear that you are linking to that URL anywhere. Quote Link to comment Share on other sites More sharing options...
douglaswalker Posted May 14, 2019 Share Posted May 14, 2019 Thank you @Hotclutch @Jack_mcsfor your time I have searched all files and there is no cpath apart from what i mentioned above which is not relevant The search tool says ... referring page None detected URL might be known from other sources that are currently not reported search anomaly I am not trying to redirect it and have removed code as it didn't work anyway. Why does the incorrectly formed cpath go into a loop and not just to a 404 not found? Quote Link to comment Share on other sites More sharing options...
Hotclutch Posted May 14, 2019 Share Posted May 14, 2019 It returns 301, you can use an online tool to check: http://tools.seobook.com/server-header-checker/ I checked this behaviour on a USU5 site, and with cpath it redirects to the homepage. I don't know what it is supposed to be with this addon. Quote Link to comment Share on other sites More sharing options...
douglaswalker Posted May 14, 2019 Share Posted May 14, 2019 hmm just goes round and round until it fails. @Jack_mcs should a non existent url go to a 404 It looks like the redirect for the correctly formed cPath is somehow catching the cpath and stopping it going to a 404. Quote Link to comment Share on other sites More sharing options...
douglaswalker Posted May 14, 2019 Share Posted May 14, 2019 also just checked for my interest dpath will redirect home npath will redirect to home lpath goes round and round is the htaccess code case sensitive? Quote Link to comment Share on other sites More sharing options...
Hotclutch Posted May 14, 2019 Share Posted May 14, 2019 Happens on other sites with this addon. In the meantime, don't add anything to htaccess while you wait for reply. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 14, 2019 Share Posted May 14, 2019 1 hour ago, douglaswalker said: should a non existent url go to a 404 The short answer is no. The code just redirects to the given page. Once on that page, if it doesn't exist then it should show not found. But oscommerce doesn't return 404's. It might show a 404 on the page but the actual header status is different. That's why I wrote the https://apps.oscommerce.com/znMRO. Though I'm not sure that will help with your problem. Try turning this addon off to see if it makes a difference. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
douglaswalker Posted May 15, 2019 Share Posted May 15, 2019 7 hours ago, Jack_mcs said: The short answer is no. The code just redirects to the given page. Once on that page, if it doesn't exist then it should show not found. But oscommerce doesn't return 404's. It might show a 404 on the page but the actual header status is different. That's why I wrote the https://apps.oscommerce.com/znMRO. Though I'm not sure that will help with your problem. Try turning this addon off to see if it makes a difference. I have your header Status Handler installed. So I tried turning off SEO and accessing https://www.mysite.com.au/index.php?cpath=50 .... redirects to index with no issue .. so that seems to show that the .htaccess is ok? But with SEO on it just loops and times out. It is the only URL that this issue is being reported on.. so not a huge issue but i would love to get to the bottom of it.. or find away to redirect the incorrect and non existent URL. I also tested with just Header Status handler off as well... that made no difference Quote Link to comment Share on other sites More sharing options...
Hotclutch Posted May 15, 2019 Share Posted May 15, 2019 5 hours ago, douglaswalker said: I have your header Status Handler installed. So I tried turning off SEO and accessing https://www.mysite.com.au/index.php?cpath=50 .... redirects to index with no issue .. so that seems to show that the .htaccess is ok? But with SEO on it just loops and times out. It is the only URL that this issue is being reported on.. so not a huge issue but i would love to get to the bottom of it.. or find away to redirect the incorrect and non existent URL. I also tested with just Header Status handler off as well... that made no difference This problem can be replicated with all your category URLs at least. It may only be the one that is reported, but the question is how did google come to discover it. Did you search the addon files for the occurrence of cpath? 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.