♥toyicebear Posted September 17, 2009 Share Posted September 17, 2009 (edited) I didn't have the trailing / before upgrading. It is hardcoded in filenames - define('FILENAME_HOME', '/'); Keep it like that and try the following: In includes/functions/html_output.php change this section if ($connection == 'NONSSL') { To read.. if ($page == '/') $page = '';if ($connection == 'NONSSL') { Edited September 17, 2009 by toyicebear Quote Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
mr_absinthe Posted September 17, 2009 Share Posted September 17, 2009 Thank you for your reply. You're referring to a function that was replaced by the HTML href link wrapper function, therefore it is no longer there: //// // ULTIMATE Seo Urls 5 by FWR Media // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls, $languages_id, $request_type, $session_started, $sid; if ( !is_object($seo_urls) ){ include_once DIR_WS_MODULES . 'ultimate_seo_urls5' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'usu.php'; $seo_urls = new usu($languages_id, $request_type, $session_started, $sid); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); } Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
♥toyicebear Posted September 17, 2009 Share Posted September 17, 2009 Thank you for your reply. You're referring to a function that was replaced by the HTML href link wrapper function, therefore it is no longer there: //// // ULTIMATE Seo Urls 5 by FWR Media // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls, $languages_id, $request_type, $session_started, $sid; if ( !is_object($seo_urls) ){ include_once DIR_WS_MODULES . 'ultimate_seo_urls5' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'usu.php'; $seo_urls = new usu($languages_id, $request_type, $session_started, $sid); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); } Then it looks like the file to make some edits to would be: includes/modules/ultimate_seo_urls5/classes/usu.php Quote Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
mr_absinthe Posted September 17, 2009 Share Posted September 17, 2009 Thank you, I'll give it a go. Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 17, 2009 Author Share Posted September 17, 2009 Thank you for your quick reply, it doesn't work unfortunately: Error! Unable to determine the page link! Enjoy your wine and have a great evening! Yes the reason you are getting "Unable to determine the page link!" is in ... includes/modules/ultimate_seo_urls5/includes/Usu_General_Functions.php Lines 15 - 17 as below : - if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } This guards the script against errors where an empty value is passed as the filename. I think you could probably comment out this code to make it work but you would need to be aware that the safeguard no longer exists. Hope that helps. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 17, 2009 Author Share Posted September 17, 2009 Yes the reason you are getting "Unable to determine the page link!" is in ... includes/modules/ultimate_seo_urls5/includes/Usu_General_Functions.php Lines 15 - 17 as below : - if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } This guards the script against errors where an empty value is passed as the filename. I think you could probably comment out this code to make it work but you would need to be aware that the safeguard no longer exists. Hope that helps. Better to try this .. define('FILENAME_HOME', 'aardwark'); includes/modules/ultimate_seo_urls5/includes/Usu_General_Functions.php Find .. if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } Add immediately below: - // Highly intelligent Aardwark mod if ( $page == 'aardwark' ) { $page = ''; } Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
mpanda Posted September 18, 2009 Share Posted September 18, 2009 Hello Robert, first of all congrats for this excellent contribution. I'm aboslute beginner either oscomm or seo urls 5 so I apologie for any basic question. I installed contribution and urls work fine, then start guide tells to install database and there I've some doubt. Why I need to install a new db where oscomm has already installed its own? Thanks Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 18, 2009 Author Share Posted September 18, 2009 Hello Robert,first of all congrats for this excellent contribution. I'm aboslute beginner either oscomm or seo urls 5 so I apologie for any basic question. I installed contribution and urls work fine, then start guide tells to install database and there I've some doubt. Why I need to install a new db where oscomm has already installed its own? Thanks Hi No need to apologise, we all started somewhere. It is not installing a new database, it is adding some entries to the existing database so that you will have administration options in your admin panel. Hope that clarifies. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
mpanda Posted September 18, 2009 Share Posted September 18, 2009 Thank you Robert, it's all clear now. Another short question related to SEO. Do you think seo contributions have to be installed on a fresh Osc installation or it's better after you'll populate your site? Can you suggest some SEO addon known to be effective on search engine optimization and userfriendly like yours? Thanks again, mario Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 18, 2009 Author Share Posted September 18, 2009 (edited) Thank you Robert, it's all clear now. Another short question related to SEO. Do you think seo contributions have to be installed on a fresh Osc installation or it's better after you'll populate your site? Can you suggest some SEO addon known to be effective on search engine optimization and userfriendly like yours? Thanks again, mario Hi again Mario This is the support topic for this specific contribution .. if you want general advice please use the general forums. Edited September 18, 2009 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
smartwork Posted September 22, 2009 Share Posted September 22, 2009 (edited) Hi there, Robert Thanks for what I'm hoping will be our dream contribution. I'm trying to fit it to an old shop, and for the most part I think we're having some luck. I have a few questions if you have a moment. It appears we're generating seo urls in the format mysite.com/category-name-c-111.html?category=category%252name Questions: 1. They are all 404-ing on me, and I've not yet found why. The urls appear to be correct format, but do not resolve. I don't see any errors in debug mode. 2. Is is possible to remove the ?category=category%252name NOTE: these are subcategories In a few instances where we have category names with 3 words such as "Good Green Stuff", the resulting url is mysite.com/stuff-c-111.html?category=good%252green It drops the first words in the category's name before the .html and drops the last word of the category's name when listed in the string after the ? Would you have any pointers on how we can straighten it out? Thanks! -Shaun EDITED TO ADD: We've got the rewrite mod on, and the htaccess file and rewrite base all appear correct. Edited September 22, 2009 by smartwork Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 22, 2009 Author Share Posted September 22, 2009 Hi there, Robert Thanks for what I'm hoping will be our dream contribution. I'm trying to fit it to an old shop, and for the most part I think we're having some luck. I have a few questions if you have a moment. It appears we're generating seo urls in the format mysite.com/category-name-c-111.html?category=category%252name Questions: 1. They are all 404-ing on me, and I've not yet found why. The urls appear to be correct format, but do not resolve. I don't see any errors in debug mode. 2. Is is possible to remove the ?category=category%252name NOTE: these are subcategories In a few instances where we have category names with 3 words such as "Good Green Stuff", the resulting url is mysite.com/stuff-c-111.html?category=good%252green It drops the first words in the category's name before the .html and drops the last word of the category's name when listed in the string after the ? Would you have any pointers on how we can straighten it out? Thanks! -Shaun EDITED TO ADD: We've got the rewrite mod on, and the htaccess file and rewrite base all appear correct. You are getting very odd results .. never seen anything like it before. I'd need to see the site in question .. send a link by pm if it is not for public consumption. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 23, 2009 Author Share Posted September 23, 2009 (edited) Hi Shaun I didn't realise the site was THAT old. It uses default.php instead of index.php and the what is now cPath in your site is ?category= This means that without modification USU5 will not work with it. Try opening up file .. catalog/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php and changing all instances of cPath to category. I haven't a clue if you may encounter more problems as I have never worked with an osCommerce this old, therefore the contribution was not designed for it. Edited September 23, 2009 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
mr_absinthe Posted September 23, 2009 Share Posted September 23, 2009 Better to try this .. define('FILENAME_HOME', 'aardwark'); includes/modules/ultimate_seo_urls5/includes/Usu_General_Functions.php Find .. if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } Add immediately below: - // Highly intelligent Aardwark mod if ( $page == 'aardwark' ) { $page = ''; } Thank you, it worked. Is there a problem with feeds (google, yahoo, shopzilla, etc.)? As far as I understand, most of them have been revised to work with Ultimate SEO URLs 2.1d and they have include_once('../' .DIR_WS_CLASSES . 'seo.class.php'); coded in. Is there a safe way around it? Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 23, 2009 Author Share Posted September 23, 2009 Thank you, it worked. Is there a problem with feeds (google, yahoo, shopzilla, etc.)? As far as I understand, most of them have been revised to work with Ultimate SEO URLs 2.1d and they have include_once('../' .DIR_WS_CLASSES . 'seo.class.php'); coded in. Is there a safe way around it? A number of contributions are hardcoded to use a particular url contribution (like usu series 2) as they have hardcoded it in it means a rewrite to use anything else. It is thoroughly unnecessary to have hardcoded it in, most were hardcoded because they couldn't get around cron jobs disliking includes but all they had to do was use wget in the cron to access the file via apache then includes are just fine. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Golovorez Posted September 26, 2009 Share Posted September 26, 2009 (edited) Good work :blush: Edited September 26, 2009 by Golovorez Quote Link to comment Share on other sites More sharing options...
2fix4u Posted September 28, 2009 Share Posted September 28, 2009 Hi, Robert i've installed your contrib since your first release and updated it to the last version. But now I noticed that some of my top categories become after some time a wrong url. e.g. http://www.my_great_site/categorie-c-31_29_33_41_34_32'>http://www.my_great_site/categorie-c-31_29_33_41_34_32 instead of http://www.my_great_site/categorie-c-31 but when i reset the usu5 cache all works as expected. Unfortunately after a few klicks it went back to the messed up url. for your help i am greatly appreciated. SORRY for my english regards Harry Quote Link to comment Share on other sites More sharing options...
leafyglade Posted September 28, 2009 Share Posted September 28, 2009 But now I noticed that some of my top categories become after some time a wrong url. e.g. http://www.my_great_site/categorie-c-31_29_33_41_34_32'>http://www.my_great_site/categorie-c-31_29_33_41_34_32 instead of http://www.my_great_site/categorie-c-31 but when i reset the usu5 cache all works as expected. Hi Harry I reported a problem with similar symptoms some time ago but Robert indicated to me that I was the only one with this problem and that it must be a problem with my own configuration. I think another person has since reported the same type of issue so that makes three of us now. The problem I had only occurred with the category urls and it could be temporarily fixed by clearing the cache but then would happen again within a few hours. If you figure out the problem, please post the solution so we may benefit. Thanks Quote Link to comment Share on other sites More sharing options...
2fix4u Posted September 29, 2009 Share Posted September 29, 2009 Hi Harry I reported a problem with similar symptoms some time ago but Robert indicated to me that I was the only one with this problem and that it must be a problem with my own configuration. I think another person has since reported the same type of issue so that makes three of us now. The problem I had only occurred with the category urls and it could be temporarily fixed by clearing the cache but then would happen again within a few hours. If you figure out the problem, please post the solution so we may benefit. Thanks Yes that is exactly the problem. But at the moment I don't have any clue, it goes far beyond my understanding of php. I hope Robert will have a look at this issue. If nevertheless i find out a solution, i will post it here Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 29, 2009 Author Share Posted September 29, 2009 Hi all It is possible that these problems are occuring in limited cases because currently USU5 "believes" the cPath as provided by osCommerce to be correct in instances where it is in fact not correct, the current revision does not check the validity of each incoming cPath as it was thought an unnecessary overhead. 2fix4u I have a prototype file available which checks the incoming cPath if you send me an email at admin(at)fwrmedia(dot)co(dot)uk I will send the file and perhaps you could test it for me to see if it alleviates the issue. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Mark Brandon Posted October 1, 2009 Share Posted October 1, 2009 I am setting up a new shop. Installed seo header tags then added this contribution usu5. When i check the urls in firefox everything is ok. When i do the same in Internet Explorer http://lasure-bois.com/oscommerce-2.2rc1-F...talog/index.php works fine then when i go to categories, the links are ok but the images and stylesheets dont show up properly. The links in the other boxes Informations, Meilleures ventes etc ... are ok. If i turn off Enable SEO URLs everything works fine again. Could someone point me in the right direction ? Thanks Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted October 1, 2009 Author Share Posted October 1, 2009 I am setting up a new shop. Installed seo header tags then added this contribution usu5. When i check the urls in firefox everything is ok. When i do the same in Internet Explorer http://lasure-bois.com/oscommerce-2.2rc1-F...talog/index.php works fine then when i go to categories, the links are ok but the images and stylesheets dont show up properly. The links in the other boxes Informations, Meilleures ventes etc ... are ok. If i turn off Enable SEO URLs everything works fine again. Could someone point me in the right direction ? Thanks There is a post about this somewhere here. If I remember correctly header tags uses $PHP_SELF which is returning an seo url where the header tags script is expecting a filename. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Mark Brandon Posted October 1, 2009 Share Posted October 1, 2009 There is a post about this somewhere here. If I remember correctly header tags uses $PHP_SELF which is returning an seo url where the header tags script is expecting a filename. Hi Robert I also set up another shop using USU 5 I use Enable SEO URLs? true and have no problem. Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted October 1, 2009 Author Share Posted October 1, 2009 Hi RobertI also set up another shop using USU 5 I use Enable SEO URLs? true and have no problem. It's hard for me to comment Mark. Logically all this contribution does is produce seo uris via the correct tep_href_link() wrapper, it should not affect any other contribution in any way. It certainly wouldn't affect html/style. The only core code changed is in application_top where the spoofable $PHP_SELF is replaced with the safe $_SERVER['SCRIPT_NAME'] this does not affect osCommerce which uses $PHP_SELF to store the filename but there seems to be something in header tags which doesn't like it (having never used header tags I wouldn't know where). Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted October 1, 2009 Author Share Posted October 1, 2009 Hi all It is possible that these problems are occuring in limited cases because currently USU5 "believes" the cPath as provided by osCommerce to be correct in instances where it is in fact not correct, the current revision does not check the validity of each incoming cPath as it was thought an unnecessary overhead. 2fix4u I have a prototype file available which checks the incoming cPath if you send me an email at admin(at)fwrmedia(dot)co(dot)uk I will send the file and perhaps you could test it for me to see if it alleviates the issue. It has now been confirmed that a prototype Usu_Categories.php solves the issues that certain users have been having where USU5 was "believing" invalid cPaths. I will be repackaging a new revision over the weekend. This new revision will not only include this new file but all modules will be reworked based on the same new template, this uniformity should make it easy for developers of contributions to create their own modules. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. 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.