Jump to content

Recommended Posts

I have started a git repository for FWR's USU5 for BS. So far I have added a page for BS integration and it was tested on Edge. I am working on getting the MySQL cache bug fix for the next commit. Please feel free to download and use.

 

https://github.com/clustersolutions/Ultimate_Seo_Urls_5_PRO_BS

 

FYI, I used USU5 for BS with these SEO addons and they worked fine: Burt's header tag reloaded. JackMC's sitemap, All Products, and google xml sitemap...

 

Share this post


Link to post
Share on other sites

That's great @@clustersolutions, I'll try your fix for cache as soon as you deploy it.

 

You may want to add multilanguage support from here: http://forums.oscommerce.com/topic/336702-ultimate-seo-urls-5-by-fwr-media/?p=1573463. I'm working on a hreflang module fo it too but for now I couldn't make it work.

 

@@vampirehunter it needs to modify tep_href_link function and use it's own.

Share this post


Link to post
Share on other sites

@@clustersolutions great that you are doing this... I use this addon currently and have made a couple updates;

 

1) in includes/includes/modules/ultimate_seo_urls5/page_modules.product_info.php

      if ( false === $text_array ) {

If an invalid url is used (such as catalog/under-siege-dark-territory-p-112340.html

 

I get;

 

Warning: Invalid argument supplied for foreach() in /public_html/catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 102

Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in /public_html/catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in /public_html/catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338

 

And edit to;

      //if ( false === $text_array ) {
	  if ( is_Null($text_array) || false === $text_array ) {

Fixes this issue...

 

2) Not sure if you've read this thread for fixing sqlite issues on php 5.4  http://forums.oscommerce.com/topic/336702-ultimate-seo-urls-5-by-fwr-media/?p=1653111

 

Note; I don't use sqlite cache.... I use file.

Share this post


Link to post
Share on other sites

@@vampirehunter. No, minimum core code change...probably the reason I kept USU5...the rest of the modules also core code change required...I think until there 's an official way to add/remove plugins like Wordpress there will be continue to be core code changes...hopefully to the minimum...

 

 

Thanks. Is this a non core editing module?
Also, the other modules you mentione, are those bootstrap as well?

Share this post


Link to post
Share on other sites

Ok...just updated sqlite cache to sqlite3 as that's the minimum support for php 5.4...feel free to report issues...i also have tested memcache but you need to make sure that your hosting supports it...

 

https://github.com/clustersolutions/Ultimate_Seo_Urls_5_PRO_BS/commit/8d315c33771fa25a6914b0816d6d589f4a9e12cb

Share this post


Link to post
Share on other sites

@@greasemonkey, thanks!

 

I see what you are saying with that product_info error...I did something to my live site and it returns the default page not found thingy...I 'll look into it and let you know what I did...yeah, my edge site gives me the same error too.

 

As for the sqllite error...i just read it and I think i was a mod for PDO...if you scroll up you'd find the fix for php5.4 and sqlite3 update in my github...thx! tim

 

 

 

 

@@clustersolutions great that you are doing this... I use this addon currently and have made a couple updates;

 

1) in includes/includes/modules/ultimate_seo_urls5/page_modules.product_info.php

      if ( false === $text_array ) {

If an invalid url is used (such as catalog/under-siege-dark-territory-p-112340.html

 

I get;

 

Warning: Invalid argument supplied for foreach() in /public_html/catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 102

Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in /public_html/catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in /public_html/catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338

 

And edit to;

      //if ( false === $text_array ) {
	  if ( is_Null($text_array) || false === $text_array ) {

Fixes this issue...

 

2) Not sure if you've read this thread for fixing sqlite issues on php 5.4  http://forums.oscommerce.com/topic/336702-ultimate-seo-urls-5-by-fwr-media/?p=1653111

 

Note; I don't use sqlite cache.... I use file.

Share this post


Link to post
Share on other sites

@@clustersolutions @@greasemonkey

 

I am working my way through all the necessary changes for a properly working USU5 ... What I found so far for sqlite caching to work with SQLite3 is that we need to change the function  createDatabase() in cache_system/sqlite.php

self::$db = new SQLite3( self::$sqlite_db_file, 0666, $error )

should be

self::$db = new SQLite3( self::$sqlite_db_file)

See http://php.net/manual/en/sqlite3.construct.phpfor reference.

 

My conclusion : now we have : new  SQLite3(db_name, permission, $error)

 

but for SQLite3 to function the second and third parameters stand for (optional) flags and ecryption.

 

Flags:

  • SQLITE3_OPEN_READONLY: Open the database for reading only.

  • SQLITE3_OPEN_READWRITE: Open the database for reading and writing.

  • SQLITE3_OPEN_CREATE: Create the database if it does not exist.

Encryption:

 string $encryption_key

 

 

Since SQLite3 is kind of new to me maybe an expert can coment!

Share this post


Link to post
Share on other sites

@@azpro, good catch and thanks for sharing!

 

I think it worked as it was as I had tested querying the sqlite db b4, but it was not catching any exceptions...now, this should fix it...

 

https://github.com/clustersolutions/Ultimate_Seo_Urls_5_PRO_BS/commit/2ad8379886c67e151aede560abc29dfd5ea37ae1

 

Pls LMK. Thx! Tim

 

 

@@clustersolutions @@greasemonkey

 

I am working my way through all the necessary changes for a properly working USU5 ... What I found so far for sqlite caching to work with SQLite3 is that we need to change the function  createDatabase() in cache_system/sqlite.php

self::$db = new SQLite3( self::$sqlite_db_file, 0666, $error )

should be

self::$db = new SQLite3( self::$sqlite_db_file)

See http://php.net/manual/en/sqlite3.construct.phpfor reference.

 

My conclusion : now we have : new  SQLite3(db_name, permission, $error)

 

but for SQLite3 to function the second and third parameters stand for (optional) flags and ecryption.

 

Flags:

  • SQLITE3_OPEN_READONLY: Open the database for reading only.

  • SQLITE3_OPEN_READWRITE: Open the database for reading and writing.

  • SQLITE3_OPEN_CREATE: Create the database if it does not exist.

Encryption:

 string $encryption_key

 

 

Since SQLite3 is kind of new to me maybe an expert can coment!

Share this post


Link to post
Share on other sites

@@clustersolutions As far as I have tested for now the codechange 

        try {
          self::$db = new SQLite3( self::$sqlite_db_file );
        }
        catch (Exception $exception) {
          trigger_error( 'Failed: ' . $exception->getMessage(), E_USER_WARNING );
        }

works as expected!

 

I found one more issue for my heavily modified 2.3.4BS shop regarding the Addon Products Specifications by Kymation. This add-on uses [] in the url for filtering products on specifications ... (Might be I modified it myself .. do not know anymore) ... But USU5 uses the function usu_cleanse (to be found in ultimate_seo_urls5/includes/usu_general_functions) in many instances  to clean GET valuepairs .. So the function cleanes out the [] which breaks the filtering to work correctly .... So I added the [] to the preg_replace regex in function usu_cleanse() in about line 162

// return preg_replace( '@[^a-z0-9_]@i', '', $value );
   return preg_replace( '@[^a-z[]0-9_]@i', '', $value ); // ADDED [] 

Took me a long time to find and test this solution so I thougt would be nice to share ... Might be usefull for others in different situations (I was thinking about the attributes part.not properly redirecting to product_info.php from shopping_cart.php ... Next on the list!) ...... And if any of the experts have thoughts on this feebback would be appriciated!

 

Tnx

Share this post


Link to post
Share on other sites

For anyone wanting to use USU5 on Edge (and only use mysql to store the cache), these are instructions for installing it after downloading the app from here

It works fine with PHP7 by the way.

installation_v2.3.4BS.htm


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

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

×