azpro Posted October 25, 2014 Share Posted October 25, 2014 (edited) HI all, Does anyone know whether changes need te be made to USU5 in regard to OSC 2.3.4 Improve $PHP_SELF ? For application_top.php the upgrade guide states: $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']); change to : $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']);$PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); The USU5 installation reguires : Find ... // set php_self in the local scope $PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']); Replace with ... /** * ULTIMATE Seo Urls 5 PRO by FWR Media * function to return the base filename */ function usu5_base_filename() { // Probably won't get past SCRIPT_NAME unless this is reporting cgi location $base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF', 'REQUEST_URI', 'ORIG_PATH_INFO', 'HTTP_X_ORIGINAL_URL', 'HTTP_X_REWRITE_URL' ) ); while ( $base->valid() ) { if ( array_key_exists( $base->current(), $_SERVER ) && !empty( $_SERVER[$base->current()] ) ) { if ( false !== strpos( $_SERVER[$base->current()], '.php' ) ) { preg_match( '@[a-z0-9_]+\.php@i', $_SERVER[$base->current()], $matches ); if ( is_array( $matches ) && ( array_key_exists( 0, $matches ) ) && ( substr( $matches[0], -4, 4 ) == '.php' ) && ( is_readable( $matches[0] ) ) ) { return $matches[0]; } } } $base->next(); } // Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) || ( $_SERVER['PHP_SELF'] == '/' ) ) { return 'index.php'; } // Return the standard RC3 code return ( ( ( strlen( ini_get( 'cgi.fix_pathinfo' ) ) > 0) && ( (bool)ini_get( 'cgi.fix_pathinfo' ) == false ) ) || !isset( $_SERVER['SCRIPT_NAME'] ) ) ? basename( $_SERVER['PHP_SELF'] ) : basename( $_SERVER['SCRIPT_NAME'] ); } // End function// set php_self in the local scope $PHP_SELF = usu5_base_filename(); So should we change this line : // Return the standard RC3 code return ( ( ( strlen( ini_get( 'cgi.fix_pathinfo' ) ) > 0) && ( (bool)ini_get( 'cgi.fix_pathinfo' ) == false ) ) || !isset( $_SERVER['SCRIPT_NAME'] ) ) ? basename( $_SERVER['PHP_SELF'] ) : basename( $_SERVER['SCRIPT_NAME'] ); to : $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); // OSC 2.3.4return substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG));// OSC 2.3.4 Edited October 25, 2014 by azpro Quote Link to comment Share on other sites More sharing options...
tushee Posted December 11, 2014 Share Posted December 11, 2014 hi to everybody,until now i use "seo urls by Chemo", yesterday i install "Ultimate Seo Urls 5 Pro" and it work great, but have few question.Wen i set the url tipe at the "Rewrite", indexed pages from google wont opening (from google search, the page can not displayed ).In site they work but now do i have to wait google indexed again ?When set the url type at the "Standard", google search opening with the new url, but then have "index.php" and "product_info.php" in the address.Do i have chance to remove "index.php" "product_info.php" when at the url type is a "standart" ?If not how to set the "Ultimate Seo Urls 5 Pro" without losing positions on the indexed pages from google ? thanks in advance. Quote Link to comment Share on other sites More sharing options...
tushee Posted December 11, 2014 Share Posted December 11, 2014 never mind, i fix thatChanging the .htaccess fileadd a RewriteRule from url seo's by chemo Quote Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted February 14, 2015 Share Posted February 14, 2015 Do you have an idea to resolve this problem when multilanguage is activate When I clic on a link I have that http://mysite/store/mysitestoreindex.phpen if I change the link http://mysite/store/mysitestoreindex.phpen by that http://mysite/store/index.php/en work well. I have a problem somewhere but I don't where exactly. Thank Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
♥Gyakutsuki Posted February 14, 2015 Share Posted February 14, 2015 resolved ! // for language box // if ( $value['directory'] == $language ) { if ( $value['directory'] == $_SESSION['language'] ) { usu5.php public function initiate( $lng, &$languages_id, &$language, $force_language = false ) { if ( false !== $force_language ) { $this->vars['languages_id'] = $_SESSION['languages_id']; $this->vars['language'] = $_SESSION['$language']; // $this->vars['languages_id'] = $languages_id; // $this->vars['language'] = $language; if you have a problem static function with memcache (memcache.php) change in function iAdmin() { by public static function iAdmin() { Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum Link to comment Share on other sites More sharing options...
broadstreetbully Posted March 3, 2015 Share Posted March 3, 2015 I'm trying to install this addon but in the first edit it says- find: // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); and directly after place this: // Ultimate SEO URLs v2.2d if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) { include_once(DIR_WS_CLASSES . 'seo.class.php'); if ( !is_object($seo_urls) ){ $seo_urls = new SEO_URL($languages_id); } } but instead of the: // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); I have this // include the language translations $_system_locale_numeric = setlocale(LC_NUMERIC, 0); require(DIR_WS_LANGUAGES . $language . '.php'); setlocale(LC_NUMERIC, $_system_locale_numeric); has anyone else ran into this issue? if so please let me know how to fix it...I would like to use this addon. thanks. Quote Link to comment Share on other sites More sharing options...
broadstreetbully Posted March 3, 2015 Share Posted March 3, 2015 I'm trying to install this addon but in the first edit it says- find: // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); and directly after place this: // Ultimate SEO URLs v2.2d if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) { include_once(DIR_WS_CLASSES . 'seo.class.php'); if ( !is_object($seo_urls) ){ $seo_urls = new SEO_URL($languages_id); } } but instead of the: // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); I have this // include the language translations $_system_locale_numeric = setlocale(LC_NUMERIC, 0); require(DIR_WS_LANGUAGES . $language . '.php'); setlocale(LC_NUMERIC, $_system_locale_numeric); has anyone else ran into this issue? if so please let me know how to fix it...I would like to use this addon. thanks. fixed, I just added the code under the first edit Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted March 31, 2015 Share Posted March 31, 2015 Hi!! Can someone help with this issue! I use 2.3.4 oscommerceWhen I try accessing product URLS in this format with id and attribute...www.radhavallabh.com/radhakrishna-store/product_info.php?products_id=1278{2}83{1}17{38}253{40}289{43}343{36}241{50}430{51}450 it redirects to index page Whereas the seo urls and only product id urls www.radhavallabh.com/radhakrishna-store/product_info.php?products_id=1278work fine Any clue of what is wrong??Please help would be greatly appreciated....Thanks in advance.. Quote Link to comment Share on other sites More sharing options...
Patty Posted July 13, 2016 Share Posted July 13, 2016 Yes, with the osc upgrade I convert all to UTF-8. All my sql tables are all in utf8_unicode_ci Yehhhh... that do the trick. Thank you very much :) Every day a new lesson. Never eared before about BOM or without BOM. I save the file without BOM and work like a charm. Many thanks once again, you are a master ;) I was having the same problem. Saving file without BOM did it! Thank you for sharing! Quote Patty Link to comment Share on other sites More sharing options...
egutierrez Posted January 4, 2017 Share Posted January 4, 2017 For those who were using a multilangue shop with USU 5 pro and eliminate one or more language, what is the best practice to redirect the url's from the deleted language? Thanks Quote Link to comment Share on other sites More sharing options...
beerbee Posted March 2, 2017 Share Posted March 2, 2017 (edited) @@radhavallabh Hi, I had the same problem with the shopping_cart navbar module of BS Edge, I don't know if I missed something with the rewrite rules. My solution was to ad (int) where the product_id was called. Example: //change $products[$i]['id'] //to (int)$products[$i]['id'] works for me. Best regards Christoph Edited March 2, 2017 by beerbee radhavallabh 1 Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted March 3, 2017 Share Posted March 3, 2017 @@beerbee Thank you so much .... It works great. Your help is deeply appreciated. Warm Regds/ Radhavallabh Quote Link to comment Share on other sites More sharing options...
Psytanium Posted June 13, 2017 Share Posted June 13, 2017 in Google Webmaster Tools, HTML Improvements. I have almost all my web pages duplicate titles. e.g. /index.php/pos-system-signature-capture-c-155_185_2093_0_45_252_474 /index.php/pos-system-signature-capture-c-155_45_252_474 another e.g. /product_info.php/targus-bag-tss588us-156-black-p-6437 /product_info.php?products_id=6437 Why ? and what should I do ? thanks Quote Link to comment Share on other sites More sharing options...
Psytanium Posted June 16, 2017 Share Posted June 16, 2017 (edited) Sorry for posting again but i really have to repair this problem, duplicate URLs in Google Webmaster Tools e.g. /product_info.php/targus-bag-tss588us-156-black-p-6437 /product_info.php?products_id=6437 Edited June 16, 2017 by Psytanium Quote Link to comment Share on other sites More sharing options...
Stephan Gebbers Posted August 25, 2017 Share Posted August 25, 2017 Hi, i'm using ultimate seo urls 5 pro with 2.3.4BS i have a content module to authorise the account by entering a code that has been sent to the account email before. The problem is, when i am coming from the shop in language english and enter this module page, it always changes back to default language german. The authorise module page is here /ext/modules/content/account/authorise.php Any idea how to fix this? btw: it seemsto be a problem for all content modules behind /ext/modules/conent/ ..etc Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted August 25, 2017 Share Posted August 25, 2017 (edited) Hello Stephan @Stephan Gebbers, Someone posted a fix for the same problem happening with twitter typeahead autocomplete search module. It works for me and should be also the solution for your issue. In application top wrap the following if statement around that USU5 code snippet: /** * ULTIMATE Seo Urls 5 PRO by FWR Media */ if (basename($PHP_SELF) != 'autocomplete.php') { Usu_Main::i()->setVar( 'languages_id', $languages_id ) ->setVar( 'request_type', $request_type ) ->setVar( 'session_started', $session_started ) ->setVar( 'sid', $SID ) ->setVar( 'language', $language ) ->setVar( 'filename', $PHP_SELF ) ->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id, $language ); } and change the following line to "authorize.php": if (basename($PHP_SELF) != 'authorize.php') { @piernas, maybe this could be included as a troubleshooting instruction to the package. or better find a global solution based on the entire "ext/" directory. rgds Rainer Edited August 25, 2017 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...
Stephan Gebbers Posted August 25, 2017 Share Posted August 25, 2017 (edited) it kinda works but still behaves a little strange. i call that module page and the language stays as it should with your changes (except it is authorise.php). but if i leave that page by clicking on the home link it switches back to german language. a global solution for all content modules under /ext/ would be nice, right! Edited August 25, 2017 by Stephan Gebbers Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted August 25, 2017 Share Posted August 25, 2017 I do not use authorise, can't check further. If you find a stable fix, let us know. :-) 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...
Stephan Gebbers Posted August 25, 2017 Share Posted August 25, 2017 please check this @raiwa in /includes/modules/ultimate_seo_urls5/includes/usu_general_functions.php right after $multi_language_valid = true; if ( ( false !== strpos( $page, '/' ) ) || ( substr( $page, -4, strlen( $page ) ) != '.php' ) ) { $multi_language_valid = false; } add this if ((false !== strpos( $page, "ext/modules" ) ) && ( substr( $page, -4, strlen( $page ) ) == '.php' )) $multi_language_valid = true; It is within the function osc_href_link, wich will be used by usu for non usu links (no page module for this pagename available for example) Page-Strings that contain a / or that dont end to .php will not be treated as multilanguage. So the new line should set the $multi_language_valid to true for .php files under ext/modules. let me know if that makes sense/works, or if i introduced other problems with this fix. it creates links for non usu pages that look like that https://www.example.com/ext/modules/content/product_info/ask_question.php/en?products_id=31 Maybe you have further ideas how to make this more beatiful? :) Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted August 25, 2017 Share Posted August 25, 2017 @Stephan Gebbers, nop, doesn't work for me with the autocomplete problem. 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...
bedfordch Posted August 31, 2017 Share Posted August 31, 2017 Hi all, just installed over the Chemo's SEO and seems to work. The main reason I updated was to get the language in URL. But !!! I can't get it to work if I force URL not to have the index.php in URL. So this URL works http://www.mysite.com/index.php/fr But this one doesn't http://www.mysite.com/fr Have I missed something or it is a limitation of the module ? Also did someone find a way to also have the link directly to the correct page (http://www.mysite.com/my_great_article-p-15500.html => http://www.mysite.com/fr/mon_super_article-p-15500.html) ? Thank you for your help Quote Link to comment Share on other sites More sharing options...
Psytanium Posted September 18, 2017 Share Posted September 18, 2017 Hello, recently I have installed 2 addons that require some files to run from inside includes folders or ext. but the files where failing to run until I turn off the Seo Urls 5. Another solution is to move the files to catalog directory. Only the catalog directory which is public_html seems to work. Any advice ? thankls Quote Link to comment Share on other sites More sharing options...
Psytanium Posted September 18, 2017 Share Posted September 18, 2017 18 minutes ago, Psytanium said: Hello, recently I have installed 2 addons that require some files to run from inside includes folders or ext. but the files where failing to run until I turn off the Seo Urls 5. Another solution is to move the files to catalog directory. Only the catalog directory which is public_html seems to work. Any advice ? thankls the 2 addons are Auto Update Currency and Twitter Autocomplete Quote Link to comment Share on other sites More sharing options...
sudhara429 Posted October 17, 2017 Share Posted October 17, 2017 hi how to add self-referencing hreflang tag to href lang module bcz This SEO error show on my website No self-referencing hreflang tag This is the most common issue in this section. We found out that if a website has a conflict within a page source code, in 96% of cases, the page doesn’t contain a self-referencing hreflang in its set of hreflang attributes. That means that those attributes may be ignored or interpreted incorrectly. To fix this mistake, make sure to include the page’s URL and language code in your set of hreflang attributes. Quote Link to comment Share on other sites More sharing options...
concorde44 Posted September 16, 2019 Share Posted September 16, 2019 Hi everybody, I'm using this amazing contribution since many years on my oscommerce ms2.2 still alive and perfectly working. I juste noticed I've 40% of redirects301 when I've some parameters in the valid URL : juste because I think This contribution is changing the parameters order. Example : A valid URL : https://mysite.com/product1-p-1184.html?utm_source=googleshopping&utm_campaign=googleshopping&utm_medium=catalogue becomes : https://mysite.com/product1-p-1184.html?utm_campaign=googleshopping&utm_medium=catalogue&utm_source=googleshopping Notice the utm_campaing reorganization , and thus generates a 301. Have you an idea of what I can do to disable the reordering of the url parameters ? Have some of you already seen that ? Thanks for your help and tips ! Reagrds Sebastien Quote Osc 2.2 MS2 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.
Note: Your post will require moderator approval before it will be visible.