Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Also noticed a problem with hyphenated names (eg all-products.php)

I changed the name to all_products_seo.php and it works.

 

OsCommerce does not use hyphenated filenames .. USU5 also has security measures .. these include cleansing of the querystring and only allowing valid filenames, if contributions use illegal filenames then they will not be allowed through.

 

Also getting an error for articles box

Warning: Usu_Articles Incorrect tPath presented: in C:\server\xampp\htdocs\public_html\includes\modules\ultimate_seo_urls5\modules\Usu_Articles.php on line 126

 

(this is the code block in Usu_Articles.php that includes line 126)

// Sanity check - if the $base_path is not numeric then we dump it

if ( false === is_numeric( $base_path ) ) {

(line 126) trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );

return false;

}

 

I suspect it may be due to another hyphenated name: articles-topics.php

and rather than changing that name, thought there might be a more

all-encompassing solution to accommodate hyphenated names.

 

I won't be allowing hyphenated filenames as they are bad coding in osCommerce.

 

Re: the triggered error at the top of the file find ..

 

private $suppress_underscores = true;

 

and set it to false; This is in place because most of those contributions use a cPath equivalent badly for the purposes of highlighting their menu .. these are instant duplicate content.

 

also can r84 be updated to r141 without, as the hitchhikers guide puts it,

"all the tedious mucking about in hyperspace" ?

 

USU5 and 5 PRO work out of the box on a standard osCommerce the only time there are issues is when they are badly coded and do not adhere to standard osCommerce coding practices.

 

the exception is the $suppress_underscores = true; bit which I added to prevent duplicate content but it does mean that the menus of those contributions will not work until it is set to false.

Edited by FWR Media
Link to comment
Share on other sites

This google_sitemap Contrib also works only with USU off.....

I have uploadet the two files from the extras/googlesitemap.

 

Again the question: Why does such a simple script not work (I need to know it for the future for my own coded scripts):

alleprodukte.php:

<?php require('includes/application_top.php'); ?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html <?php echo HTML_PARAMS; ?>> 
<head><title>Alle Produkte</title></head>
<body  bgcolor="#FFFFFF">
<?php
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_date_added from (" . TABLE_PRODUCTS . " p , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '2' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' order by pd.products_name");
echo 'Test';
     while($products = tep_db_fetch_array($products_query))
           {
           echo $products['products_id'] .' - <a href="'. tep_href_link('product_info.php', 'products_id='. $products['products_id']). '">' . $products['products_name'].'</a><br>';
           }
?> 
</body></html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> 

With USU off it´s work, with USU on there is nothing to see in the browser, also no echo 'Test' will be executed.

Why does tep_href_link in this little skript stop all echo´s?

 

Your little script works fine with USU5 I just loaded it on my local version .. you must have an issue your side.

 

Re: Google XML Sitemap SEO that also works fine with USU5.

Link to comment
Share on other sites

I have seen this issue before which was double encoding of & I have yet to find the contribution that is causing the issue and would like to get it sorted .. could you run some tests for me please?

 

Well, I may have stumbled onto an ersatz solution for the amp; cramp,

all I did was replace the code in product_listing with code from shopping_cart.php

which had a buy now button that worked and products are now added to the cart

(except products that have attributes)

Here is what the code change looks like:

 

in catalog/includes/modules/product_listing.php (the second instance of: case 'PRODUCT_LIST_BUY_NOW':)

//1-5-10 original this code adds amp; to querystring $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

// modified code from shopping cart

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

 

as you can see, I simply replaced

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

 

with

tep_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' .

 

(by the way, this only occurs on localhost using xampp, php5.3 and usu5 r141,

on the hosted site, there are no amp; occurrences in the querystring- using php<5.3 and usu5 r84)

 

hopefully this sheds some light on the pesky amp; situation

 

incidently regarding the other problem with:

Warning: Usu_Articles Incorrect tPath presented: in C:\server\xampp\htdocs\public_html\includes\modules\ultimate_seo_urls5\modules\Usu_Articles.php on line 126

I replaced the entire folder- ultimate_seo_urls5 with the one in ULTIMATE_Seo_Urls_5_r141_stable\uploads\catalog\includes\modules

and renamed the hyphenated articles-topics.php to articles_topics.php and the problem has resolved itself,

doubtless I messed up when upgrading from r84 to each newer version preceding r141

 

jk

Link to comment
Share on other sites

Well, I may have stumbled onto an ersatz solution for the amp; cramp,

all I did was replace the code in product_listing with code from shopping_cart.php

which had a buy now button that worked and products are now added to the cart

(except products that have attributes)

 

jk

 

John thanks for this hopefully it will lead to the issue. What I am thinking is that somewhere they may have been some sort of W3C fix that added htmlspecialchars to function tep_get_all_get_params in includes/general.php.

 

Maybe even ..

 

$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

 

Was hardcoded to ..

$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

 

Could you have a look at yours please against the function from a fresh RC2a?

Edited by FWR Media
Link to comment
Share on other sites

Hello Robert.

 

I updated from the old 2.1 to your usus5.

 

Sorry, but I don't read the whole 56 sides, but much of it. I hope that you can help me.

After installing the contrib my URLs look like this: www.xxxx.de/-c-88.html (categories) or www.xxxx.de/-p-654.html (products) and not how it should be

www.xxxx.de/alpha-vogt-filterelement-88top-p-654.html for example.

 

Any solution? Thanks.

 

using PHP 5.2.6

 

Thomas

Link to comment
Share on other sites

Hello Robert.

 

I updated from the old 2.1 to your usus5.

 

Sorry, but I don't read the whole 56 sides, but much of it. I hope that you can help me.

After installing the contrib my URLs look like this: www.xxxx.de/-c-88.html (categories) or www.xxxx.de/-p-654.html (products) and not how it should be

www.xxxx.de/alpha-vogt-filterelement-88top-p-654.html for example.

 

Any solution? Thanks.

 

using PHP 5.2.6

 

Thomas

 

USU5 doesn't do that Thomas, how have you done the character conversion? file based or admin based?

Link to comment
Share on other sites

I installed Ultimate SEO URLs 5 a while back and updated to R141 last month. Everything appeared to be functional, until my store is about complete and I was testing the checkout system. I was able to place an order, but when I clicked to confirm order, I got the following error:

 

Fatal Error: Call to private method usu::performance() from context " in home/*****/*****/public_html/catalog/includes/footer-tracker.php on line 39.

 

That line is an add on by SEO URLs 5. Any guesses, suggestions? I am not even sure where to start and am hoping someone else has had this issue.

 

I am using PayPal Pro direct payments & express checkout V1.0.7a as the payment method. I used a credit card transaction in this case. I wasn't able to receive a PayPal IPN back into Oscommerce, but that may be another issue and not an additional issue with this error, so I would like to fix this issue up first.

 

Thanks!

Link to comment
Share on other sites

I installed Ultimate SEO URLs 5 a while back and updated to R141 last month. Everything appeared to be functional, until my store is about complete and I was testing the checkout system. I was able to place an order, but when I clicked to confirm order, I got the following error:

 

Fatal Error: Call to private method usu::performance() from context " in home/*****/*****/public_html/catalog/includes/footer-tracker.php on line 39.

 

That line is an add on by SEO URLs 5. Any guesses, suggestions? I am not even sure where to start and am hoping someone else has had this issue.

 

I am using PayPal Pro direct payments & express checkout V1.0.7a as the payment method. I used a credit card transaction in this case. I wasn't able to receive a PayPal IPN back into Oscommerce, but that may be another issue and not an additional issue with this error, so I would like to fix this issue up first.

 

Thanks!

 

Hi this was my fault and already mentioned in this thread .. in one upgrade I forgot to tell you to remove ..

 

usu::performance();

 

from includes/footer.php

Link to comment
Share on other sites

Robert, I use the admin based version like before with 2.1

 

And the server is running on PHP5.2+?

 

It may be worth quickly changing the error_reporting in application_top.php to ..

 

error_reporting( E_ALL );

 

because USU5 wouldn't do this unless something is wrong, are you sure you installed it all correctly and made sure all the old database entries from the old series 2 were removed with the removal tool?

Link to comment
Share on other sites

I just wanted to say thank you Robert for taking the time to redo the google feed module. It works great with USU5 now.

 

Regards,

 

Rick

 

My pleasure Rick.

Link to comment
Share on other sites

And the server is running on PHP5.2+?

 

It may be worth quickly changing the error_reporting in application_top.php to ..

 

error_reporting( E_ALL );

 

because USU5 wouldn't do this unless something is wrong, are you sure you installed it all correctly and made sure all the old database entries from the old series 2 were removed with the removal tool?

 

Yes, it is 5.2.6 and I installed it correctly. So far I know...;-)

Now I had delete the characters in the admin section and used your german.php file. Now it's running, great.

 

I have change the german.php a little bit, because some characters does not occur..

 

// German

$char_convert = array ('ä' => 'ae', 'Ä' => 'Ae',

'ö' => 'oe', 'Ö' => 'Oe', 'ß' => 'ss',

'ü' => 'ue', 'Ü' => 'Ue', '®' => '', '-' => '');

?>

 

Once again thank you for another fine contrib.

 

Thomas

Link to comment
Share on other sites

Now I had delete the characters in the admin section and used your german.php file. Now it's running, great.

 

I have change the german.php a little bit, because some characters does not occur..

 

Once again thank you for another fine contrib.

 

Thomas

 

My pleasure and sorry for my character conversion files, a linguist I am not, as you no doubt realised :)

Link to comment
Share on other sites

Thanks, I couldn't find this in any searches. That did the trick. Thanks for the quick reply. :)

 

Hi this was my fault and already mentioned in this thread .. in one upgrade I forgot to tell you to remove ..

 

usu::performance();

 

from includes/footer.php

Link to comment
Share on other sites

My pleasure and sorry for my character conversion files, a linguist I am not, as you no doubt realised :)

 

:rolleyes:

 

Robert as I now established I have another problem. I use the Googlefeeder v2.5 from Jack and the contrib need the seo.class which I must deleted for your usu5

If there any solution for this problem or I must ask in the "googlefeederforum"?

 

Thomas

Link to comment
Share on other sites

Hello. I get this notice in error log

 

 

PHP Notice: Usu5 cannot find the full filepath, please ensure that DIR_FS_CATALOG in configure.php contains a FULL path in /var/www/sites/*************/html/*************/includes/modules/ultimate_seo_urls5/classes/usu.php on line 97, referer: http://www.*************.ro/*************/index.php

 

and another strange error

 

File does not exist: /var/www/sites/*************/html/unicprice/index.phpcss, referer: http://www.*************/*************/index.php

Link to comment
Share on other sites

:rolleyes:

 

Robert as I now established I have another problem. I use the Googlefeeder v2.5 from Jack and the contrib need the seo.class which I must deleted for your usu5

If there any solution for this problem or I must ask in the "googlefeederforum"?

 

Thomas

 

Yes sadly the Googlefeeder contribution has the old series 2 seo urls hardcoded in. I put up a patch file into that contribution yesterday .. it should work for you.

Link to comment
Share on other sites

Hello. I get this notice in error log

 

 

PHP Notice: Usu5 cannot find the full filepath, please ensure that DIR_FS_CATALOG in configure.php contains a FULL path in /var/www/sites/*************/html/*************/includes/modules/ultimate_seo_urls5/classes/usu.php on line 97, referer: http://www.*************.ro/*************/index.php

 

and another strange error

 

File does not exist: /var/www/sites/*************/html/unicprice/index.phpcss, referer: http://www.*************/*************/index.php

 

WOW I never thought a hosting service could ever be that wrong that they get past my checks!! which version of USU5 are you on?

 

USU5 checks realpath() - getcwd() - and ONLY if they all fail (which they shouldn't) it falls back on your own settings in includes/configure.php for DIR_FS_CATALOG

Link to comment
Share on other sites

I am using the last version

 

Make a new php file in the root of your osCommerce site (where product_info.php is) called fwrtest.php .. put in the file the following: -

 

<?php
 function checkpaths() {
   if( function_exists( 'realpath' ) ) {
     $realpath = str_replace( DIRECTORY_SEPARATOR, '/', realpath( '.' ) ) . '/';
     if( file_exists( $realpath . 'product_info.php' ) && !empty( $realpath ) ) {
       return $realpath;
     }
   }
   if( function_exists( 'getcwd' ) ) {
     $realpath = str_replace( DIRECTORY_SEPARATOR, '/', getcwd() ) . '/';
     if( file_exists( $realpath . 'product_info.php' ) && !empty( $realpath ) ) {
       return $realpath;
     }
   }
   return false; 
 }

 $error_text = 'Your system either cannot find the correct path or the standard file product_info.php does not exist in your osCommerce root';
 $success_text = 'We found your path to product_info.php just fine!';

 if ( false === checkpaths() ) {
   echo $error_text . '<br />' . PHP_EOL;
 } else {
   echo $success_text . '<br />' . PHP_EOL;
 } 
?>

 

Then browse to the file (www.mysite.com/fwrtest.php) and report here the output.

Link to comment
Share on other sites

John thanks for this hopefully it will lead to the issue. What I am thinking is that somewhere they may have been some sort of W3C fix that added htmlspecialchars to function tep_get_all_get_params in includes/general.php.

 

Maybe even ..

 

$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

 

Was hardcoded to ..

$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

 

Could you have a look at yours please against the function from a fresh RC2a?

 

okay, here are the two versions I have:

 

ORIGINAL tep_get_all_get_params

////

// Return all HTTP GET variables, except those passed as a parameter

function tep_get_all_get_params($exclude_array = '') {

global $HTTP_GET_VARS;

 

if (!is_array($exclude_array)) $exclude_array = array();

 

$get_url = '';

if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) {

reset($HTTP_GET_VARS);

while (list($key, $value) = each($HTTP_GET_VARS)) {

if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) {

$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

}

}

}

 

return $get_url;

}

X ORIGINAL tep_get_all_get_params

===================================

 

CURRENT tep_get_all_get_params

////

// Return all HTTP GET variables, except those passed as a parameter

function tep_get_all_get_params($exclude_array = '') {

global $_GET;

 

if (!is_array($exclude_array)) $exclude_array = array();

 

$get_url = '';

if (is_array($_GET) && (sizeof($_GET) > 0)) {

reset($_GET);

while (list($key, $value) = each($_GET)) {

if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) {

$get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

}

}

}

// testing echo ' in ' . $PHP_SELF . ' line 183 get_url = ' . $get_url; // my test echo to keep track of where it emanates from

$get_url = str_replace('&', '&', $get_url); (I added this is a futile attempt to remove the amp;)

return $get_url;

}

X CURRENT tep_get_all_get_params

===================================

alas, no hardcoded amp; in: $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

jk

Link to comment
Share on other sites

alas, no hardcoded amp; in: $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&';

jk

 

Well, all I can say is that this issue is not exhibited on a fresh install so must be a local problem.

 

What are the php settings (phpinfo()) for ..

 

arg_separator.input

arg_separator.output

Link to comment
Share on other sites

Well, all I can say is that this issue is not exhibited on a fresh install so must be a local problem.

 

What are the php settings (phpinfo()) for ..

 

arg_separator.input

arg_separator.output

 

WATSON: Good heavens, Holmes, you never cease to amaze me!

 

That was it...

phpinfo

arg_separator.input & &

arg_separator.output & &

 

1. changed arg_separator.output = "&" (in C:\server\xampp\php\php.ini)

2. changed code back to original in catalog/includes/modules/product_listing.php: (from code taken shopping cart)

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

3. restarted apache

4. querystring no longer has the amp;

and WORKS CORRECTLY (adds products to cart)

 

Thank you for your steadfast resolve in working this out

jk

Link to comment
Share on other sites

Hi,

 

Thank you for this contrib I just installed as a manual new installation. It is the first time I install and use it.

 

I checked the install sevral times and everything seems to be as it should. The files are upladed, the changes are made in the required files, the database was updated OK.

 

The problem is I get a Server Error 404 each time I try to open a product or manufacturer or anything concerned by the URL rename. The URL seems to be created OK, the patern looks perfect:

 

www.xxxx.com/product_info.php/ostrakh-bliss-chostakovitch-tchaikovsky-p-60570

 

All products are there and works fine when disabeling the contrib in Admin.

 

I use PHP 5.2.12 and IIS 7 on Windows Server 2008.

I activated Zlib as requested. I use standard mode as requested for IIS.

 

Where am I wrong?

 

Thanks.

Andybird

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...