Jump to content
spidometrs

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

Recommended Posts

Another change he made .. same query change languages_id to language_id. I think I will change the core package to relfect the newer version but it isn't worth a version just for this.

 

Dear Robert,

 

never mind, it's alright with me. But since you are not ready, I'll have to return to contrib "Ultimate_SEO_URLSv22d_5" in the meantime, to keep out of harm's way. Please do let me know when you are through with it.

 

Regards

Tom

Share this post


Link to post
Share on other sites

Please explain why.

 

I noticed you make comments such as ..

 

First, be sure it is the latest version - 2.2d_5

 

and ...

 

You can't go by what's on top of the list (whatever that is). The correct version to use is 2-2.2d-5.

 

and ..

 

you should be using the latest Ultimate SEO - version 2.2d_5. Other versions can cause problems.

 

I then decided to test out the code to see if it was true that this was the new stable version.

 

On installing the main issues were ..

 

The install/uninstall code has fundamental errors, playing wrongly with database table and field installs and deletions is obviously serious.

 

The core problem arises on MySQL5 database servers where they are strict with poor syntax (a decent version of MySQL5 perhaps with STRICT_TRANS_TABLES). This leads to the following extremely serious issue: -

 

1) Caching no longer works therefore USU is loading every category .. every product .. every item of the added contributions on EVERY page load. Disaster for even medium sized shops.

2) On every page load a table is deleted from the database .. a configuration_group field is deleted from the database and all configuration field values related to USU are deleted from the database .. THEN .. they are all put back in again! this in turn is raising the database auto increment by 19 on every single click the site gets, human or bot! Not good!

3) Because of 1 and 2 admin settings are reset on every page load this means that no admin settings excepting those of the initial install work.

4) Creates 80 - 90 queries per page on a stock install.

 

The problems aren't evident on MySQL4 or less strict set ups of MySQL5 but the code errors are still there and it is what I was first faced with testing it, which in turn led to my comment.

 

Effectively 2.2d_5 is a feature add rather than a new stable version. There is nothing at all wrong with feature adds but after the whole 2.1d ORIGINAL updated scenario I question "The correct version to use is 2-2.2d-5" perhaps "a good option if you want header tags based link text" is nearer the mark.

 

Other issues that suggest this is not the stable version:

 

1) Where there were no errors with error reporting set high at E_ALL | E_STRICT there is now a page full of error notices. Like undefined variables errors for header tags related code etc. Sure users won't see them as most suppress notices but this is not good stable code.

2) USU link text made reliant on other seperate packages. I don't use header tags and neither do a lot more people, if you do make seo urls functions reliant on a contribution then tag it like 2.2 [header tags version]. The rest of us don't want to download what we believe to be the core stable version including a load of code that we are not interested in. For instance you hijacked the Article manager contribution and made the latest versions reliant on header tags, this is really annoying for users and for people like me who downloaded it to test our own contributions only to find it wouldn't work.

3) Where there was validation for all seo urls (independent seo urls validation) there is now nothing. Meaning at the minimum that if you change a product or categories name then your SEO is stuffed. This is a significant step backwards.

4) What is SEO_URLS_UNINSTALL? it doesn't do anything.

Share this post


Link to post
Share on other sites

A few hosts don't have that php function enabled in their installations. You can ask your host to recompile their php so that they do but they may not. If you search the includes/classes/seo.class.php file for mb_convert_case, you'll find one instance of it followed by a line that starts with //. Add // in front of the line with mb_convert_case and remove the // from the beginning of the other line and it should work for you. The actual code is mentioned elsewhere in this thread if you want to look that up. Or (and this is the preferred method), you can always use google to search. It would save you a lot of time and aggravation by doing so. Here are the results of the search I did for you.

 

Thanks Jacks for your answer.

I'm trying on local before apply changes at production server.

I'll reinstall PHP on my computer with all extensions.

 

Daniel

Share this post


Link to post
Share on other sites

I read a lot a lot a lot of topic pages with the problem 404 not found. Sometimes I that to do with the incorrect RewriteBase. Sometimes you need to place the .htaccess in all the subfolder until /catalog/.

Other stories are about removing "+FollowSymLinks" from the .htaccess file or completly remove the first line.

I noticed another problem what could couse the page into a 404 not found or Object not found (all the same) etc.

 

It has exacly the same source of URL:

http://myip/domeinname.nl/product_info.php?products_id=457

 

Take a look at this URL:

(THIS WILL GIVE AN 404 ERROR)

 

Sometimes this source URL become:

(Which is GOOD)

 

Why is there sometimes a ?osCsid in it?

 

It may be related to cookies? How to solve this issue?

 

Thank you already...

 

EDIT:

I think I found the solution you can give it a try with the option in the backend:

Configuration->Sessions->Force Cookie Use set this value to True.

 

Kind regards,

Melroy van den Berg

Edited by danger89

Share this post


Link to post
Share on other sites

I read a lot a lot a lot of topic pages with the problem 404 not found. Sometimes I that to do with the incorrect RewriteBase. Sometimes you need to place the .htaccess in all the subfolder until /catalog/.

Other stories are about removing "+FollowSymLinks" from the .htaccess file or completly remove the first line.

I've never ran across such issues with this contribution. The .htaccess file to be changed is the one in the root of the shop. There are some changes made to a .htaccess file that needs to be placed in other .htaccess files, depending on the server, but not in this case.

 

I noticed another problem what could couse the page into a 404 not found or Object not found (all the same) etc.

 

It has exacly the same source of URL:

http://myip/domeinname.nl/product_info.php?products_id=457

This isn't a valid url so I would expect it to fail.

 

Why is there sometimes a ?osCsid in it?

It's almost always caused by an incorrectly setup configure file. How to set it up has been covered many times in this thread so you should be able to find it.

It may be related to cookies? How to solve this issue?

 

EDIT:

I think I found the solution you can give it a try with the option in the backend:

Configuration->Sessions->Force Cookie Use set this value to True.

No, that is not needed and you shouldn't do it. Forcing cookies is a sure way to lose sales.

Share this post


Link to post
Share on other sites

I've never ran across such issues with this contribution. The .htaccess file to be changed is the one in the root of the shop. There are some changes made to a .htaccess file that needs to be placed in other .htaccess files, depending on the server, but not in this case.This isn't a valid url so I would expect it to fail.It's almost always caused by an incorrectly setup configure file. How to set it up has been covered many times in this thread so you should be able to find it.

No, that is not needed and you shouldn't do it. Forcing cookies is a sure way to lose sales.

 

USU is receiving bad input, I can replicate this issue but it can only be replicated by making a mistake in the code e.g.

 

tep_href_link( FILENAME_PRODUCT_INFO, 'products_id=27?osCsid=54g54t3543' );

 

Which on a stock osCommerce produces ..

http://www.mysite.com/hewlett-packard-laserjet-1100xi-p-27?osCsid.html

 

You can handle it I believe by changing the following code but you really should solve the true issue ..

 

includes/classes/seo.class.php

Find ..

                       $p2 = @explode('=', $valuepair);

 

Replace with ..

 

 

                        $p2 = @explode('=', $valuepair);
                       ( ( false !== strpos( $p2[1], '?' ) ) && array_key_exists( 1, $p2 ) ) ? $p2[1] = str_replace( strrchr( $p2[1], '?' ), '', $p2[1] ) : false;

Edited by FWR Media

Share this post


Link to post
Share on other sites

Jack,

 

I used 2.2d_5 version. After installation. I got the error:

 

Parse error: syntax error, unexpected $end in /home/topdispl/public_html/includes/application_top.php on line 558

 

How am I go about this.

 

Thank you.

Share this post


Link to post
Share on other sites

Jack,

 

I used 2.2d_5 version. After installation. I got the error:

 

Parse error: syntax error, unexpected $end in /home/topdispl/public_html/includes/application_top.php on line 558

 

How am I go about this.

 

Thank you.

It means you made a mistake when making the changes to the includes/application_top.php file. Compare your changes to that file with the instructions. Be sure you did not forget to copy the closing }, or something else. Also be sure you pasted it in its own section, not with the preceeding section of code that ends in }.

Share this post


Link to post
Share on other sites

It means you made a mistake when making the changes to the includes/application_top.php file. Compare your changes to that file with the instructions. Be sure you did not forget to copy the closing }, or something else. Also be sure you pasted it in its own section, not with the preceeding section of code that ends in }.

 

 

Jack,

 

I DID say YOU'RE THE MAN, RIGHT? WEll if not, here you go.....

 

D A M N. YOU ARE THE MAN!!!

 

IT WORKS FAWLESS!!!! WHAT SHOULD I INSTALLED NEXT? LOL. SHOULD I INSTALLED ALL PRODUCTS SEO?

 

Should I install Article Manager? lol

Share this post


Link to post
Share on other sites

Jack,

 

I DID say YOU'RE THE MAN, RIGHT? WEll if not, here you go.....

 

D A M N. YOU ARE THE MAN!!!

 

IT WORKS FAWLESS!!!! WHAT SHOULD I INSTALLED NEXT? LOL. SHOULD I INSTALLED ALL PRODUCTS SEO?

 

Should I install Article Manager? lol

:) Thank you. Yes, I recommend installing All Products SEO but I suggest waiting since I plan on updating it this weekend and it will save you some work to wait.

Share this post


Link to post
Share on other sites

Hi there,

 

I have a problem with this contribution. It is indeed working well, but clashes with a Flash Carousel I have installed ( http://addons.oscommerce.com/info/6123 )

 

If the flash carousel is switched on, I get an error:

 

Notice: Undefined variable: cName in .../includes/classes/seo.class.php on line 1006

 

The affected function is

 

/**
* Function to get the product name. Use evaluated cache, per page cache, or database query in that order of precedent        
* @author Bobby Easland 
* @version 1.1
* @param integer $pID
* @return string Stripped anchor text
*/        
       function get_product_name($pID){
          $result = array();
          if ($this->attributes['SEO_ADD_CPATH_TO_PRODUCT_URLS'] == 'true') {
             $cName = $this->get_all_category_parents($pID, $cName);
          }
               switch(true){
                       case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('PRODUCT_NAME_' . $pID)):
                               $this->performance['CACHE_QUERY_SAVINGS']++;
                               $return = (tep_not_null($cName) ? $cName . '-'. constant('PRODUCT_NAME_' . $pID) : constant('PRODUCT_NAME_' . $pID));
                               $this->cache['PRODUCTS'][$pID] = $return;
                               break;
                       case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && isset($this->cache['PRODUCTS'][$pID])):
                               $this->performance['CACHE_QUERY_SAVINGS']++;
                               $return = (tep_not_null($cName) ? $cName . '-'. $this->cache['PRODUCTS'][$pID] : $this->cache['PRODUCTS'][$pID]);
                               break;
                       default:
                               $this->performance['NUMBER_QUERIES']++;
                               $sqlCmd = $this->attributes['USE_SEO_HEADER_TAGS'] == 'true' ? 'products_name as pName' : 'products_name as pName';
                               $sql = "SELECT " . $sqlCmd . "
                                         FROM ".TABLE_PRODUCTS_DESCRIPTION." 
                                         WHERE products_id='".(int)$pID."' 
                                         AND language_id='".(int)$this->languages_id."' 
                                         LIMIT 1";
                               $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );

                               $pName = $this->strip( $result['pName'] );
                               $this->cache['PRODUCTS'][$pID] = $pName;
                               $this->performance['QUERIES']['PRODUCTS'][] = $sql;
                               $return = (tep_not_null($cName) ? $cName . '-'.  $pName : $pName);
                               break;                                                                
               } # end switch                
               return $return;
       } # end function

 

 

 

 

line 1006 is

$return = (tep_not_null($cName) ? $cName . '-'. constant('PRODUCT_NAME_' . $pID) : constant('PRODUCT_NAME_' . $pID));

 

 

 

When the Carousel is turned off, the store loads without errors.

 

Do You have any idea, why?

 

Thanks for any ideas.

Share this post


Link to post
Share on other sites

Hi there,

 

I have a problem with this contribution. It is indeed working well, but clashes with a Flash Carousel I have installed ( http://addons.oscommerce.com/info/6123 )

 

If the flash carousel is switched on, I get an error:

 

Notice: Undefined variable: cName in .../includes/classes/seo.class.php on line 1006

 

The affected function is

 

/**
* Function to get the product name. Use evaluated cache, per page cache, or database query in that order of precedent        
* @author Bobby Easland 
* @version 1.1
* @param integer $pID
* @return string Stripped anchor text
*/        
       function get_product_name($pID){
          $result = array();
          if ($this->attributes['SEO_ADD_CPATH_TO_PRODUCT_URLS'] == 'true') {
             $cName = $this->get_all_category_parents($pID, $cName);
          }
               switch(true){
                       case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('PRODUCT_NAME_' . $pID)):
                               $this->performance['CACHE_QUERY_SAVINGS']++;
                               $return = (tep_not_null($cName) ? $cName . '-'. constant('PRODUCT_NAME_' . $pID) : constant('PRODUCT_NAME_' . $pID));
                               $this->cache['PRODUCTS'][$pID] = $return;
                               break;
                       case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && isset($this->cache['PRODUCTS'][$pID])):
                               $this->performance['CACHE_QUERY_SAVINGS']++;
                               $return = (tep_not_null($cName) ? $cName . '-'. $this->cache['PRODUCTS'][$pID] : $this->cache['PRODUCTS'][$pID]);
                               break;
                       default:
                               $this->performance['NUMBER_QUERIES']++;
                               $sqlCmd = $this->attributes['USE_SEO_HEADER_TAGS'] == 'true' ? 'products_name as pName' : 'products_name as pName';
                               $sql = "SELECT " . $sqlCmd . "
                                         FROM ".TABLE_PRODUCTS_DESCRIPTION." 
                                         WHERE products_id='".(int)$pID."' 
                                         AND language_id='".(int)$this->languages_id."' 
                                         LIMIT 1";
                               $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );

                               $pName = $this->strip( $result['pName'] );
                               $this->cache['PRODUCTS'][$pID] = $pName;
                               $this->performance['QUERIES']['PRODUCTS'][] = $sql;
                               $return = (tep_not_null($cName) ? $cName . '-'.  $pName : $pName);
                               break;                                                                
               } # end switch                
               return $return;
       } # end function

 

 

 

 

line 1006 is

$return = (tep_not_null($cName) ? $cName . '-'. constant('PRODUCT_NAME_' . $pID) : constant('PRODUCT_NAME_' . $pID));

 

 

 

When the Carousel is turned off, the store loads without errors.

 

Do You have any idea, why?

 

Thanks for any ideas.

 

That line was introduced in the 2-2.2d-5 uploads amongst other errors. I'd imagine that the carousel code is "softening" the error reporting somewhere allowing such errors (notices) to be visible.

Share this post


Link to post
Share on other sites

I have a problem with this contribution. It is indeed working well, but clashes with a Flash Carousel I have installed ( http://addons.oscommerce.com/info/6123 )

 

If the flash carousel is switched on, I get an error:

 

Notice: Undefined variable: cName in .../includes/classes/seo.class.php on line 1006

You didn't mention the version you are using or what it fails on but assuming you are using my latest version, it works fine with that contribution. Have you tried resetting cache in the settings? Do the contribution work prior to installing the carousel?

Share this post


Link to post
Share on other sites

You didn't mention the version you are using or what it fails on but assuming you are using my latest version, it works fine with that contribution. Have you tried resetting cache in the settings? Do the contribution work prior to installing the carousel?

 

Jack it has nothing whatsoever to do with failing or resetting cache.

 

if ($this->attributes['SEO_ADD_CPATH_TO_PRODUCT_URLS'] == 'true') {

$cName = $this->get_all_category_parents($pID, $cName);

}

switch(true){

case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('PRODUCT_NAME_' . $pID)):

$this->performance['CACHE_QUERY_SAVINGS']++;

$return = (tep_not_null($cName) ? $cName . '-'. constant('PRODUCT_NAME_' . $pID) : constant('PRODUCT_NAME_' . $pID));

$this->cache['PRODUCTS'][$pID] = $return;

break;

 

if define SEO_ADD_CPATH_TO_PRODUCT_URLS does not == true then you have an undefined variable and therefore an error!

Share this post


Link to post
Share on other sites

You didn't mention the version you are using or what it fails on but assuming you are using my latest version, it works fine with that contribution. Have you tried resetting cache in the settings? Do the contribution work prior to installing the carousel?

 

I have the latest Ultimate_SEO_URLSv22d_5 installed. Before installing the carousel the SEO URLs worked well. Also when I switch the carousel off, there is no error on my site.

Share this post


Link to post
Share on other sites

That line was introduced in the 2-2.2d-5 uploads amongst other errors. I'd imagine that the carousel code is "softening" the error reporting somewhere allowing such errors (notices) to be visible.

 

Is there any way to block such notices? Because despite the notice the carousel and SEO URLs contributions are working properly...

Share this post


Link to post
Share on other sites

Is there any way to block such notices? Because despite the notice the carousel and SEO URLs contributions are working properly...

 

Having had a quick look at the contribution.

 

open includes/classes/flash_carousel_image_resize.php

 

Find and delete..

 

error_reporting(E_ALL);

 

Please remember though that you are hiding errors which are being produced by the specific version of Ultimate Seo Urls you are using.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Having had a quick look at the contribution.

 

open includes/classes/flash_carousel_image_resize.php

 

Find and delete..

 

error_reporting(E_ALL);

 

Please remember though that you are hiding errors which are being produced by the specific version of Ultimate Seo Urls you are using.

 

Thank You very much that solved my problem (as it was just a notice and not an error) :)

Share this post


Link to post
Share on other sites

Thank You very much that solved my problem (as it was just a notice and not an error) :)

 

Glad to have helped but don't be fooled

 

Of course it was an error, notice is an error reporting level error reporting levels are errors.

 

Errors like undefined variables are a hackers paradise and signify bad coding.

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

 

- Added code for FAQDesk contribution

- Added code for NewsDesk contribution

- Added code for Pollbooth contribution

- Added option to turn performance code on and off to increase page load times

- Fixed coding error that affected manufacturers on some servers

- Fixed problem with product notifications

- Fixed problem with short name filter not working with category names on products

- Fixed caching problem for categories

- Fixed caching problem for products

- Fixed caching problem for Links Manager

- Fixed caching problem for Page Editor (http://addons.oscommerce.com/info/2841)

- Fixed various small coding problems

- Removed the code for caching All Products SEO since it wasn't necessary

- Replaced all ereg type calls with preg_ type

 

All you need to do to upgrade from V 2.2dv-5 is to upload the seo.class.php file and add the new changes to the .htaccess file (if you have the added contributions installed).

Share this post


Link to post
Share on other sites

I used Cron. And this is what i got from it. I got Command not found... what is this mean?

 

/home/topdispl/public_html/googlesitemap/index.php: line 1: ?php

: No such file or directory

/home/topdispl/public_html/googlesitemap/index.php: line 2: /**

: No such file or directory

/home/topdispl/public_html/googlesitemap/index.php: line 3: access-logs: command not

found

/home/topdispl/public_html/googlesitemap/index.php: line 4: *

: command not found

/home/topdispl/public_html/googlesitemap/index.php: line 5: access-logs: command not

found

/home/topdispl/public_html/googlesitemap/index.php: line 6: access-logs: command not

found

/home/topdispl/public_html/googlesitemap/index.php: line 7: access-logs: command not

found

/home/topdispl/public_html/googlesitemap/index.php: line 8: access-logs: command not

found

/home/topdispl/public_html/googlesitemap/index.php: line 9: access-logs: command not

found

/home/topdispl/public_html/googlesitemap/index.php: line 10: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 11: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 12: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 13: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 14: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 15: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 16: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 17: access-logs: command

not found

/home/topdispl/public_html/googlesitemap/index.php: line 18: */

: No such file or directory

/home/topdispl/public_html/googlesitemap/index.php: line 19:

: command not found

/home/topdispl/public_html/googlesitemap/index.php: line 20: syntax error near

unexpected token `'../''

/home/topdispl/public_html/googlesitemap/index.php: line 20: ` chdir('../');

'

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for the nice contribution.

 

I have a little problem, mine url's are appearing as follows:

 

www.minedomain.com/catalog/greatpairshoes-p-122.html

 

how can i get the url to look like this:

 

 

www.minedomain.com/catalog/great-pair-shoes-p-122.html

 

Thanks!

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

×