Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

I have uploaded a new version due to a "cock up" I made pointed out by Peder (thanks Peder). Nothing major just forgot that compatibility.php loads much further down application_top.php in MS2.2 than it does in RC2a.

 

If you downloaded and installed r117 don't worry no need to upgrade just make the change in this post

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hey Robert..

At the checkout_success page when a customer clicks on continue.. I get the FWR page not found.. Can you tell me what I did wrong..

I was thinking it was the configure.php but cant seem to see an error..

Share this post


Link to post
Share on other sites

Hey Robert..

At the checkout_success page when a customer clicks on continue.. I get the FWR page not found.. Can you tell me what I did wrong..

I was thinking it was the configure.php but cant seem to see an error..

 

Disregard last post.. Figured it out.. Had an extra "/" in there...,

Share this post


Link to post
Share on other sites

I m using ULTIMATE_Seo_Urls_5_r96_rc version. its works fine for all the pages. When I click review button for all the products its loading a blank page. This works well for firefox and we are facing problem only in IE version.can anyone help me!!!

 

thanks in advance

Share this post


Link to post
Share on other sites

 

There is a real problem with osCommerce itself and add on uri contributions when it comes to multi languages.

 

First I have to say thank you for your great contribution. It works nearly perfekt.

 

About "languages" I found a special problem:

 

My shop (in development) shall be seen in germany and in the czech republik. Anyway I can use charset=windows-1250 for both countries.

As long, as I use admin/Seo Urls 5/enter special character conversions for the special letters of one language everything works fine and I can combine it with the letter array of the other language in ultimate_seo-urls5/includes/character_conversion/german.php or czech.php

 

But whenever I try to have two language.phps in the same directory (even if I use just a renamed copy of the german.php for the czech.php) there is a strange behavior of the system:

Customers can move arround in the shop and everything looks as it should, but in the same moment, when they switch the language from german to czech or the other way arround, they see only a blank screen and even browser-back-button cannot help them out of this desaster.

 

So in this moment I combine admin settings for one language with a character_conversion file for the other language. I would be very glad, if anyone could give me some advice to improve that situation.

 

Hope you'll understand me. I'm from germany and my english isn't perfect at all.

 

Thanks for reading

Manfred

Share this post


Link to post
Share on other sites

First I have to say thank you for your great contribution. It works nearly perfekt.

 

About "languages" I found a special problem:

 

My shop (in development) shall be seen in germany and in the czech republik. Anyway I can use charset=windows-1250 for both countries.

As long, as I use admin/Seo Urls 5/enter special character conversions for the special letters of one language everything works fine and I can combine it with the letter array of the other language in ultimate_seo-urls5/includes/character_conversion/german.php or czech.php

 

But whenever I try to have two language.phps in the same directory (even if I use just a renamed copy of the german.php for the czech.php) there is a strange behavior of the system:

Customers can move arround in the shop and everything looks as it should, but in the same moment, when they switch the language from german to czech or the other way arround, they see only a blank screen and even browser-back-button cannot help them out of this desaster.

 

So in this moment I combine admin settings for one language with a character_conversion file for the other language. I would be very glad, if anyone could give me some advice to improve that situation.

 

Hope you'll understand me. I'm from germany and my english isn't perfect at all.

 

Thanks for reading

Manfred

 

Hi Manfred

 

Your English is almost perfect so please make no apologies there :)

 

I can't replicate this issue so something must be causing it at your end.

 

Are both german.php and czech.php saved as the correct charset? make sure there is no whitespace or DOM marks at the very top and bottom of the files.

 

Whitespace can cause this "blank page" issue.

 

Also if you have a multi language site you may be interested in the post regarding the upcoming USU5 development

Edited by FWR Media

Share this post


Link to post
Share on other sites

Whitespace can cause this "blank page" issue.

 

Thanks a lot. That has been the reason.

 

By the way I found out something else:

Because some products have names with special german characters and others have names with czech characters I had to build a mixed language-file including all czech and german special characters. At last I made two copies of that file, named them czech.php and german.php and moved them to character_conversion folder.

 

Also if you have a multi language site you may be interested in the post regarding the upcoming USU5 development

 

Looks great. Hope you will publish the final release soon and with the same perfect installation-instructions as with your previous contributions.

 

Thanks again

Manfred

Share this post


Link to post
Share on other sites

By the way I found out something else:

Because some products have names with special german characters and others have names with czech characters I had to build a mixed language-file including all czech and german special characters. At last I made two copies of that file, named them czech.php and german.php and moved them to character_conversion folder.

 

Thanks for sharing this Manfred .. very interesting.

 

I hadn't considered when coding this that there may be a mixture of language characters .. your solution seems a good idea in such cases and I'm sure it will benefit other users.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Robert..

Do you know of an sitemap generator that works with this contribution.. I have Jack_mcs Google sitemap XML.. It doesn't generate the product pages correctly with this contribution..

Didn't know if there was one out there that works correspondently.

 

Thanks

Jay

Share this post


Link to post
Share on other sites

Robert..

Do you know of an sitemap generator that works with this contribution.. I have Jack_mcs Google sitemap XML.. It doesn't generate the product pages correctly with this contribution..

Didn't know if there was one out there that works correspondently.

 

Thanks

Jay

 

This has been covered before in this thread .. look in the extras folder in the downloaded package.

 

To use the cron you will have to use wget .. read this thread for more info.

Edited by FWR Media

Share this post


Link to post
Share on other sites

I have uninstalled Chemo's Ultimate SEO URLs (2.1d ORIGINAL updated) and installed Ultimate SEO URLs 5 by FWR Media (Version 1.0 [sTABLE] r119 [FULL PACKAGE]) and, as far as I can tell, things are looking good. The one issue that I have run into is that I'm getting an error when I click on my all-products.php link (from All Products SEO V 1.1). The error is showing lines like the following:

 

Warning: USU5 could not find a valid base filename, please inform the developer.

'

'

'

'

Unable to determine the page link!

 

Any ideas as to what is going on here? If this has been addressed please kindly direct me to where to find the solution.

 

Thank you to FWR for the great work.

Share this post


Link to post
Share on other sites

I have uninstalled Chemo's Ultimate SEO URLs (2.1d ORIGINAL updated) and installed Ultimate SEO URLs 5 by FWR Media (Version 1.0 [sTABLE] r119 [FULL PACKAGE]) and, as far as I can tell, things are looking good. The one issue that I have run into is that I'm getting an error when I click on my all-products.php link (from All Products SEO V 1.1). The error is showing lines like the following:

 

Warning: USU5 could not find a valid base filename, please inform the developer.

'

'

'

'

Unable to determine the page link!

 

Any ideas as to what is going on here? If this has been addressed please kindly direct me to where to find the solution.

 

Thank you to FWR for the great work.

 

All products does not use the excepted file naming convention of osCommerce, osCommerce files are written filename.php or two or more words separated by _ (underscore) new_filename.php all products uses hyphen all-products.php.

 

The solution: Patch All products by converting the filename to the correct all_products.php.

 

This involves

Renaming the file in catalog/ to all_products.php

Renaming the file in languages/<my language> to all_products.php

Changing the define in filenames.php to ..

define('FILENAME_ALLPRODS_SEO', 'all_products.php');

 

That should do it.

 

Alternatively you could modify USU5 by changing in application_top.php

 

preg_match( '@[a-z0-9_]+\.php@i', $_SERVER[$base->current()], $matches );

 

to ..

 

preg_match( '@[a-z0-9_-]+\.php@i', $_SERVER[$base->current()], $matches );

 

this would allow hyphens in filenames but I don't advise it as it is changing a file that is correct to allow for a file that is incorrect. It also allows any files in catalog root that have hyphens which really shouldn't exist in an osCommerce installation.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hi!

 

I had a Ultimate Seo Urls v. 2.2d_5 and i've upgrade it to Ultimate Seo Url 5 by FWR Media.

I did twice exactly as istructions says and i have this coming out on the top of page when i'm opening main page:

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /includes/application_top.php:65) in /includes/functions/sessions.php on line 102

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/application_top.php:65) in /includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

 

Any ideas why it happends?

Thanks

Share this post


Link to post
Share on other sites

Hi!

 

I had a Ultimate Seo Urls v. 2.2d_5 and i've upgrade it to Ultimate Seo Url 5 by FWR Media.

I did twice exactly as istructions says and i have this coming out on the top of page when i'm opening main page:

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /includes/application_top.php:65) in /includes/functions/sessions.php on line 102

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/application_top.php:65) in /includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

 

Any ideas why it happends?

Thanks

 

This is for all pages? index.php or what?

 

This should only happen for an incorrect page file name.

Share this post


Link to post
Share on other sites

This is for all pages? index.php or what?

 

This should only happen for an incorrect page file name.

 

 

No, this is just for mypage.com . Funny is that when im typing mypage.com/index.php its not happening.

It also doesnt happend with all other pages.

I'm wondering it coudl be sometging wrong with .htaccess ?

 

For now i comment this line out from application_top:

trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING );

 

 

and its not showing any more but it doesnt solve my problem.

All contribution seems to works great!

Thanks for replay!

Edited by zooyork

Share this post


Link to post
Share on other sites

No, this is just for mypage.com . Funny is that when im typing mypage.com/index.php its not happening.

It also doesnt happend with all other pages.

I'm wondering it coudl be sometging wrong with .htaccess ?

 

For now i comment this line out from application_top:

trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING );

 

 

and its not showing any more but it doesnt solve my problem.

All contribution seems to works great!

Thanks for replay!

 

Well this is odd .. could you do the following please .. in application_top.php

 

Find ..

 

// set php_self in the local scope
 $PHP_SELF = usu5_base_filename();

 

Add temporarily below: -

 

  // REMOVE ME
 echo 'FWR Debug: $_SERVER[\'SCRIPT_NAME\'] = ' . $_SERVER['SCRIPT_NAME'] . '<br />';
 echo 'FWR Debug: $_SERVER[\'PHP_SELF\'] = ' . $_SERVER['PHP_SELF'] . '<br />';
 echo 'FWR Debug: $_SERVER[\'REQUEST_URI\'] = ' . $_SERVER['REQUEST_URI'] . '<br />';
 // REMOVE ME

 

Access your site as mysite.com (no index.php) and report back here the output of the code please.

Share this post


Link to post
Share on other sites

 

Access your site as mysite.com (no index.php) and report back here the output of the code please.

 

 

Mainpage:

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

FWR Debug: $_SERVER['SCRIPT_NAME'] = /

FWR Debug: $_SERVER['PHP_SELF'] = /

FWR Debug: $_SERVER['REQUEST_URI'] = /

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/application_top.php:65) in /includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

 

 

Now i have an errors on all other pages:

FWR Debug: $_SERVER['SCRIPT_NAME'] = /contact_us.php

FWR Debug: $_SERVER['PHP_SELF'] = /contact_us.php

FWR Debug: $_SERVER['REQUEST_URI'] = /contact_us.php

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/application_top.php:70) in /includes/functions/sessions.php on line 102

Share this post


Link to post
Share on other sites

Mainpage:

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

FWR Debug: $_SERVER['SCRIPT_NAME'] = /

FWR Debug: $_SERVER['PHP_SELF'] = /

FWR Debug: $_SERVER['REQUEST_URI'] = /

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/application_top.php:65) in /includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /includes/application_top.php on line 65

 

 

Now i have an errors on all other pages:

FWR Debug: $_SERVER['SCRIPT_NAME'] = /contact_us.php

FWR Debug: $_SERVER['PHP_SELF'] = /contact_us.php

FWR Debug: $_SERVER['REQUEST_URI'] = /contact_us.php

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /includes/application_top.php:70) in /includes/functions/sessions.php on line 102

 

Ok remove the test code.

 

You have an odd server there, when accessed as mysite.com (no index.php) $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF'] should contain /index.php .. yours contains nothing. What server type is it?

 

Where you used to have ..

   trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING );

 

Change the line to ..

 

    return 'index.php';

Share this post


Link to post
Share on other sites

 

Change the line to ..

 

    return 'index.php';

 

 

return 'index.php' works fine. Is this issue makes any diffrance for working of whole Ultimate Seo Urls 5 ?

 

Server is:

 

FreeBSD 6.2-STABLE

PHP Version 5.2.6

UltraCGI/1.0 for IdeaWebServer

MySQL 5.0.66a

Share this post


Link to post
Share on other sites

All products does not use the excepted file naming convention of osCommerce, osCommerce files are written filename.php or two or more words separated by _ (underscore) new_filename.php all products uses hyphen all-products.php.

 

The solution: Patch All products by converting the filename to the correct all_products.php.

 

This involves

Renaming the file in catalog/ to all_products.php

Renaming the file in languages/<my language> to all_products.php

Changing the define in filenames.php to ..

define('FILENAME_ALLPRODS_SEO', 'all_products.php');

 

That should do it.

 

 

I changed the filenames as instructed and this fixed the problem. All Products SEO now works correctly.

 

Thank you for a great contribution and thank you for taking the time to help me through this.

 

Much appreciated.

Share this post


Link to post
Share on other sites

return 'index.php' works fine. Is this issue makes any diffrance for working of whole Ultimate Seo Urls 5 ?

 

Server is:

 

FreeBSD 6.2-STABLE

PHP Version 5.2.6

UltraCGI/1.0 for IdeaWebServer

MySQL 5.0.66a

 

Will make no difference at all .. you just won't get any warning messages if contributions pass a bad filename like e.g. All Products Seo uses the filename all-products.php which should be all_products.php.

Share this post


Link to post
Share on other sites

return 'index.php' works fine. Is this issue makes any diffrance for working of whole Ultimate Seo Urls 5 ?

 

Here you are zooyork, if you replace the code in application_top.php with this it will work fine on your server but also you will retain the warning for bad filenames: -

 

 /**
 * USU5 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';
   } 
   trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING );
 } // End function
// set php_self in the local scope
 $PHP_SELF = usu5_base_filename();

Share this post


Link to post
Share on other sites

One of my clients has a modified layout of osc, and while installing the ultimate seo urls I noticed this cannot be found in /catalog/includes/modules/product_listing.php :

 

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; 

 

 

rather it looks something like this:

 

case 'PRODUCT_LIST_BUY_NOW':
       $lc_text = (PRODUCT_LIST_OPTIONS == 'true'  ? 'Product Options</td><td align="center" class="productListing-heading">' : '') . (strstr(LISTING_BUTTON, 'buy now')? TABLE_HEADING_BUY_NOW : TABLE_HEADING_DETAIL);
       $lc_align = 'center';
       break;
   }
   if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
     $lc_text = tep_create_sort_heading($_GET['sort'], $col+1, $lc_text);
   }
  $list_box_contents[] = array('align' => $lc_align,'params' => 'class="productListing-heading"','text' => ' ' . $lc_text . ' ');
 }
 return ($list_box_contents);

 

Any ideas for a workaround?

Share this post


Link to post
Share on other sites

One of my clients has a modified layout of osc, and while installing the ultimate seo urls I noticed this cannot be found in /catalog/includes/modules/product_listing.php :

 

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; 

 

 

rather it looks something like this:

 

case 'PRODUCT_LIST_BUY_NOW':
       $lc_text = (PRODUCT_LIST_OPTIONS == 'true'  ? 'Product Options</td><td align="center" class="productListing-heading">' : '') . (strstr(LISTING_BUTTON, 'buy now')? TABLE_HEADING_BUY_NOW : TABLE_HEADING_DETAIL);
       $lc_align = 'center';
       break;
   }
   if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
     $lc_text = tep_create_sort_heading($_GET['sort'], $col+1, $lc_text);
   }
  $list_box_contents[] = array('align' => $lc_align,'params' => 'class="productListing-heading"','text' => ' ' . $lc_text . ' ');
 }
 return ($list_box_contents);

 

Any ideas for a workaround?

 

You may be ok without it .. this wasn't a mod for USU5 it was in fact a bugfix for osCommerce.

 

In the standard osCommerce module product_listing.php there was this ..

 

tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])

 

This code was incorrect and should have been..

 

tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id'])

 

If the code mentioned above doesn't appear in your modded version then it is probably ok as is.

 

To check if ok ..

 

Add a product to cart from a category listing that has a few products, once added to cart hit the "continue shopping" button to return to the category listing.

 

Add a different product to cart from this listing .. did it add a new product? if so you are ok.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×