Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Hello. The contribution works very well but I checked my error log and this is what I found out:

 

How many times do these errors occur in the log?

Share this post


Link to post
Share on other sites

PHP Fatal error: Call to a member function retrieveDependencies() on a non-object in /home/original/public_html/includes/modules/ultimate_seo_urls5/main/bootstrap.php on line 409

 

Well this one turns out to be nice and easy .. good catch. It is some legacy code left over from development and is not needed at all.

 

catalog/includes/modules/ultimate_seo_urls5/main/bootstrap.php

 

Find ...

 

	private function uriModulesParsePath() {
 	if ( !is_readable( Usu_Main::i()->getVar( 'page_modules_path' ) . Usu_Main::i()->getVar( 'filename' ) ) ) {
   	return false;
 	}
 	$dependencies = Usu_Main::i()->getVar( 'page_modules', substr( Usu_Main::i()->getVar( 'filename' ), 0, -4 ) )->retrieveDependencies();
 	$uri_modules = Usu_Main::i()->getVar( 'uri_modules' );
 	foreach ( $uri_modules as $object ) {
   	if ( false !== ( $object->isValidUri() ) ) {
     	$object->parsePath();
   	}
 	}
} // end method

 

Change to ..

 

	private function uriModulesParsePath() {
 	if ( !is_readable( Usu_Main::i()->getVar( 'page_modules_path' ) . Usu_Main::i()->getVar( 'filename' ) ) ) {
   	return false;
 	}
 	$uri_modules = Usu_Main::i()->getVar( 'uri_modules' );
 	foreach ( $uri_modules as $object ) {
   	if ( false !== ( $object->isValidUri() ) ) {
     	$object->parsePath();
   	}
 	}
} // end method

Share this post


Link to post
Share on other sites

Hi Robert,

 

Happy Holidays.

 

I see we've both been busy updating your esteemed contributions, thanks for all.

 

have 3 questions (PRO_r197)

 

re: public_html/includes/modules/ultimate_seo_urls5/database_install/ installer_class.php

1. Should that be deleted after completing installation? (I hope this question doesn't cause chortling)

 

re: (from Upgrade from Ultimate Seo Urls 5 by FWR Media)

 

2) Uploads directory

 

Upload the files and directories in the "uploads" directory to your server maintaining the directory structure of osCommerce.

 

Please note that "catalog" refers to the root of your osCommerce install and probably won't actually exist.

 

Important: now ensure that the following two directories are writable. Dependent on your server this may be 0755 or 0777.

 

* catalog/includes/ultimate_seo_urls5/cache_system/cache/

* catalog/includes/ultimate_seo_urls5/cache_system/sqlite/

 

2. That should be:

* catalog/includes/modules/ultimate_seo_urls5/cache_system/cache/

* catalog/includes/modules/ultimate_seo_urls5/cache_system/sqlite/

Correct?

 

Updated page_modules.php (Randy's bug)

 

Another change was recently discussed (.htaccess)

# 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA]

# Works RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]

 

Either way, received no errors (localhost, xxamp, php5.3)

 

3. Was that change global/generic or specific to a certain situation?

 

Thanks for your illumination,

jk

Share this post


Link to post
Share on other sites

re: public_html/includes/modules/ultimate_seo_urls5/database_install/ installer_class.php

1. Should that be deleted after completing installation? (I hope this question doesn't cause chortling)

 

Nope it stays there.

 

re: (from Upgrade from Ultimate Seo Urls 5 by FWR Media)

2) Uploads directory

That should be:

* catalog/includes/modules/ultimate_seo_urls5/cache_system/cache/

* catalog/includes/modules/ultimate_seo_urls5/cache_system/sqlite/

Correct?

 

Yup good catch but caught earlier in this thread I'm afraid.

 

Another change was recently discussed (.htaccess)

# 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA]

# Works RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]

 

Either way, received no errors (localhost, xxamp, php5.3)

 

Was that change global/generic or specific to a certain situation?

 

It will be generic as far as future releases are concerned so may as well use it.

Share this post


Link to post
Share on other sites

Well this one turns out to be nice and easy .. good catch. It is some legacy code left over from development and is not needed at all.

 

catalog/includes/modules/ultimate_seo_urls5/main/bootstrap.php

 

Find ...

 

	private function uriModulesParsePath() {
 	if ( !is_readable( Usu_Main::i()->getVar( 'page_modules_path' ) . Usu_Main::i()->getVar( 'filename' ) ) ) {
   	return false;
 	}
 	$dependencies = Usu_Main::i()->getVar( 'page_modules', substr( Usu_Main::i()->getVar( 'filename' ), 0, -4 ) )->retrieveDependencies();
 	$uri_modules = Usu_Main::i()->getVar( 'uri_modules' );
 	foreach ( $uri_modules as $object ) {
   	if ( false !== ( $object->isValidUri() ) ) {
     	$object->parsePath();
   	}
 	}
} // end method

 

Change to ..

 

	private function uriModulesParsePath() {
 	if ( !is_readable( Usu_Main::i()->getVar( 'page_modules_path' ) . Usu_Main::i()->getVar( 'filename' ) ) ) {
   	return false;
 	}
 	$uri_modules = Usu_Main::i()->getVar( 'uri_modules' );
 	foreach ( $uri_modules as $object ) {
   	if ( false !== ( $object->isValidUri() ) ) {
     	$object->parsePath();
   	}
 	}
} // end method

 

 

And the other error

 

Fatal error: Call to a member function store() on a non-object in /home/original/public_html/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78, referer: http

 

I also checked this on forum and there was something similar but I don't now when the error triggers because usually rewrites work fine.

Share this post


Link to post
Share on other sites

Since installing this great contribution, when I go to the Ultimate SEO section on Configuration, I get the following error.

 

Warning: call_user_func(tep_reset_cache_data_usu5) [function.call-user-func]: First argument is expected to be a valid callback in /home/*******/includes/functions/general.php on line 1277

 

The code it relates to is

 

function tep_call_function($function, $parameter, $object = '') {
   if ($object == '') {
     return call_user_func($function, $parameter);
   } else {
     return call_user_func(array($object, $function), $parameter);
   }
 }

Share this post


Link to post
Share on other sites

Since installing this great contribution, when I go to the Ultimate SEO section on Configuration, I get the following error.

 

Warning: call_user_func(tep_reset_cache_data_usu5) [function.call-user-func]: First argument is expected to be a valid callback in /home/*******/includes/functions/general.php on line 1277

 

The code it relates to is

 

function tep_call_function($function, $parameter, $object = '') {
   if ($object == '') {
     return call_user_func($function, $parameter);
   } else {
     return call_user_func(array($object, $function), $parameter);
   }
 }

 

Part of the install instructions was to add a function to

 

ADMIN/includes/functions/general.php

Share this post


Link to post
Share on other sites

I have sent you a pm I think your configure.php file is incorrect.

 

That works perfectly...I realised there was an extra / on my configure.php....GOOD SPOT!!!!

 

Okay, so I seem to have the same problem, and apparently a configure.php with an extra slash is the likely cause, but I'm looking and they all seem sane to me so go on, one of you two want to give me a clue what setting is the likely problem?

Share this post


Link to post
Share on other sites

Correct includes/configure.php Settings

 

A lot of people seem to have bad configuration files .. so here is a reference for everybody: -

 

Note:

  • If you are not using the wwws' then HTTP_SERVER and HTTPS_SERVER will be different.
  • If your SSL domain is different then HTTPS_SERVER and HTTPS_COOKIE_DOMAIN will be different.

1) Your shop is accessed directly via the domain as www.mysite.com/

 

  define('HTTP_SERVER', 'http://www.mysite.com');
 define('HTTPS_SERVER', 'https://www.mysite.com');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');

2) Your shop is accessed as www.mysite.com/store/

 

  define('HTTP_SERVER', 'http://www.mysite.com');
 define('HTTPS_SERVER', 'https://www.mysite.com');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTP_COOKIE_PATH', '/store/');
 define('HTTPS_COOKIE_PATH', '/store/');
 define('DIR_WS_HTTP_CATALOG', '/store/');
 define('DIR_WS_HTTPS_CATALOG', '/store/');  

 

 

3) Your shop is accessed as www.mysite.com/store/shop/

 

  define('HTTP_SERVER', 'http://www.mysite.com');
 define('HTTPS_SERVER', 'https://www.mysite.com');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTP_COOKIE_PATH', '/store/shop/');
 define('HTTPS_COOKIE_PATH', '/store/shop/');
 define('DIR_WS_HTTP_CATALOG', '/store/shop/');
 define('DIR_WS_HTTPS_CATALOG', '/store/shop/');

Share this post


Link to post
Share on other sites

Hmm, well my configure.php is set the same as example 1 and I still get looping redirects so I guess my problem is something different. Cheers anyway, I'll have a dig in other parts to see what I find.

Share this post


Link to post
Share on other sites

Hmm, well my configure.php is set the same as example 1 and I still get looping redirects so I guess my problem is something different. Cheers anyway, I'll have a dig in other parts to see what I find.

 

Well you say the same problem but what exactly are you experiencing?

Share this post


Link to post
Share on other sites

Well you say the same problem but what exactly are you experiencing?

I had looping redirects, which gives the redirect unable to resolve this redirect message Farbor reported. Access log showed the file being requested 5 times, each one throwing a 301 redirect before the browser gives up.

 

However I cracked it, my problem was in my rewrite rules. I think I missed one of the 2.2 version rules when deleting and was throwing it into an infinite loop as wiping all the RewriteRule and putting them in again seems to have solved it. I just got over-excited by someone reporting the same basic error and assumed I'd made the same mistake, when apparently I can make new and way dafter ones all by myself :)

 

Fixed for me, it was a sloppy upgrade on my behalf.

Edited by FredFred

Share this post


Link to post
Share on other sites

Current Status for Ultimate SEO Urls 5 PRO

 

To save people reading back through this thread here is the current status for the latest release of USU5 PRO.

 

1 major and 1 minor issue have been found and solved: -

 

Post #2483 ( major issue )

 

Single modification to

 

catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php

 

Post #2507 ( minor - only affects certain servers )

 

Minor change to the .htaccess RewriteRules

 

Currently the files that you download via Addons require these changes.

 

USU5 PRO is looking extremely stable for a brand new release of a relatively complex product, I will update the package a little later once it has had a bit more "usage in the field".

Edited by FWR Media

Share this post


Link to post
Share on other sites

Just wondered if there is any way to remove/hide the .html extension in the URL:

 

Example :

change:

http://www.example.com/product-example.html'>http://www.example.com/product-example.html

to show as:

http://www.example.com/product-example

 

While at the same time http://www.example.com/product-example.html'>http://www.example.com/product-example.html would still go to http://www.example.com/product-example to preserve existing google searches.

We would like to follow the lead of major websites that are dropping the file extensions. We got it to work with straight .php extensions such as /shipping.php now shows as /shipping but, of course Seo Urls Pro rewrites it to .html extensions (as it is correctly supposed to do).

 

Thanks and

Happy new year to all!

Share this post


Link to post
Share on other sites

Part of the install instructions was to add a function to

 

ADMIN/includes/functions/general.php

 

Thank you, sorry replaced the file in error.

There is always one that does something daft

Share this post


Link to post
Share on other sites

Thank you, sorry replaced the file in error.

There is always one that does something daft

 

Ok glad you got it sorted.

Share this post


Link to post
Share on other sites

Hi Mate,

 

Thanks for your hint on the www redirect...it works perfectly.

Just an extra question (hopefully the last).

I noticed that under extra in this release there is a sitemap functionality that generate index,categories,product and manufacturer.

This almost replace completely the add-on Google XML Sitemap.

If that is the case I would be happy to drop that add-on completely. My only corcern is that looking into the code I cannot see a sitemap generated for the pages. Is there a reason for that?

 

Please let me know.

Thanks in advance for your helpful support.

Happy New Year!!!

 

Cheers

JK

 

 

Something like ..

 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.organiculture\.co\.uk$
RewriteRule (.*) http://www.organiculture.co.uk/$1 [R=301,L]

 

Although if you are using USU5 PRO RewriteRules you will already have the RewriteEngine on so just find ( in .htaccess ) ..

 

</IfModule>

 

change to ..

 

  # Redirect domain without www. prefix
 RewriteCond %{HTTP_HOST} !^www\.organiculture\.co\.uk$
 RewriteRule (.*) http://www.organiculture.co.uk/$1 [R=301,L]
</IfModule>

Share this post


Link to post
Share on other sites

Sorry got what will probably be another silly error by me.

When I go into a Category on my front page I get the following error

 

Warning: SQLiteDatabase::query() [sqlitedatabase.query]: unable to open database file
in /home/******/includes/modules/ultimate_seo_urls5/cache_system/sqlite.php on line 101

Share this post


Link to post
Share on other sites

Sorry got what will probably be another silly error by me.

When I go into a Category on my front page I get the following error

 

Warning: SQLiteDatabase::query() [sqlitedatabase.query]: unable to open database file
in /home/******/includes/modules/ultimate_seo_urls5/cache_system/sqlite.php on line 101

 

Is the sqlite directory writeable as per the instructions?

Share this post


Link to post
Share on other sites

Ok glad you got it sorted.

 

Hi!

 

Thanks for contribution!!!

 

I have the same problem.:

 

Warning: call_user_func(tep_reset_cache_data_usu5) [function.call-user-func]: First argument is expected to be a valid callback in /home/vaciesuu/public_html/perlubode.com/a d m i n/includes/functions/general.php on line 1277

 

But... I checked installation 3 times. step by step.

 

what You suggest?

 

Thanks

Share this post


Link to post
Share on other sites

Warning: call_user_func(tep_reset_cache_data_usu5) [function.call-user-func]: First argument is expected to be a valid callback in /home/vaciesuu/public_html/perlubode.com/a d m i n/includes/functions/general.php on line 1277

 

But... I checked installation 3 times. step by step.

 

what You suggest?

 

There's not much I can do if you can't follow the instructions. You have missed the same part as the other guy.

Share this post


Link to post
Share on other sites

Hi everyone!

 

This contribuition work fine in my oscommerce 2.3.1 , but I have a problem with spanish characters!!!

 

You can see a example in this categorie:

 

http://laertes.es/secret/index.php/aventura-c-31

 

The product whit special character (Pruebá) not work, but the second product without the special character(Prueba) in the title yes work fine.

 

As I can solve this problem?

 

 

Thanks!!!

Share this post


Link to post
Share on other sites

Hi everyone!

 

This contribuition work fine in my oscommerce 2.3.1 , but I have a problem with spanish characters!!!

 

You can see a example in this categorie:

 

http://laertes.es/se...p/aventura-c-31

 

The product whit special character (Pruebá) not work, but the second product without the special character(Prueba) in the title yes work fine.

 

As I can solve this problem?

 

 

Thanks!!!

 

Languages that use special characters are covered in USU5 PRO you need to see ..

 

documentation/operation.htm

 

Enter special character conversions

 

See the character conversion files in ..

 

extras/character_conversion_pack/

 

There is one in there named espanol.php but it is empty.

 

Create your own array of conversions then upload the file to ..

 

catalog/includes/modules/ultimate_seo_urls5/includes/character_conversion/

 

Remember the file must be named the same as your language in osCommerce so ..

 

If the name of your language in osC is Spanish the file is spanish.php

 

If the language is espanol then the file is named espanol.php.

 

Once you have done this reset the cache to produce the new URIs

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

×