Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Hello,

 

Trying to install this contribution but I've fallen at the first hurdle!

 

Instructions say:

 

2) catalog/index.php

 

Find ( this is within a block of code ) ...

tep_draw_form('filter', FILENAME_DEFAULT, 'get')

Replace with ...

tep_draw_form('filter', tep_href_link( FILENAME_DEFAULT ), 'get')

 

But this line of code doesn't exist in my index.php!

 

I'm running osCommerce Online Merchant v2.3.1

 

It hasn't been modified at all.

 

Does this matter? Should I abandon the installation and restore to previous?

Share this post


Link to post
Share on other sites

 

Hi Robert,

 

I have been using this mod for awhile and now for pci compliance I need to update to php 4.

The mod specifically states PHP 5.2/5.3 ( PHP 4 will NOT work )

 

My host attempted upgrade to php4 and told me this:

It seems there is some incompatibilities between the php version 5.4 and php sqlite module and seems your code is using the same. So we are getting a 500 Internal Server Error  while accessing your site

 

My question is can I use MySQL for the cache and run on php4 or are there other incompatibilities?

 

Tim

Share this post


Link to post
Share on other sites

Hi there,

 

I have come across with some errors in my website and I contacted my hosting provider and they said that it's not a web server issue. This is the response by my hosting provider.

 

Here is the error:

 

[18-Oct-2013 04:55:53] PHP Catchable fatal error: Argument 1 passed to aPage_Modules::link Text() must be an array, null given, called in /hsphere/local/home/intellig/xxxxxxxxx.com.au/catalog/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 170 and defined in /hsphere/local/home/intellig/xxxxxxxxx.com.au/catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 338

 

The issue will be related to the mod_rewrite rules in the .htaccess, or the settings in the ultimate_seo_urls5 plugin.”

 

Anyone can help me figure out what should be done to correct this problem?

 

Regards,

 

Oliver

Share this post


Link to post
Share on other sites

I use ULTIMATE Seo Urls 5 PRO as well as Custom HTTP Error Page

 

I like the http error page as it logs the http errors so I can correct/manage them, but SEO Urls has it own 404 page so I made a simple change in includes/modules/ultimate_seo_urls5/includes/notfound_404.php

 

If you use the same set up, just copy the code below and paste over your existing file.

 

<?php
 /**
 *
 * ULTIMATE Seo Urls 5 PRO ( version 1.1 )
 *
 *
 * @package USU5_PRO
 * @[member='licensed2kill'] http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
 * @[member='Link'] http://www.fwrmedia.co.uk
 * @[member='copyright'] Copyright 2008-2009 FWR Media
 * @[member='copyright'] Portions Copyright 2005 ( rewrite uri concept ) Bobby Easland
 * @[member='author'] Robert Fisher, FWR Media, http://www.fwrmedia.co.uk
 * @lastdev $Author:: Rob											  $:  Author of last commit
 * @lastmod $Date:: 2010-12-21 22:45:02 +0000 (Tue, 21 Dec 2010)	   $:  Date of last commit
 * @version $Rev:: 196												 $:  Revision of last commit
 * @Id $Id:: notfound_404.php 196 2010-12-21 22:45:02Z Rob			 $:  Full Details  
 */

 /**
 * Page not found html with 404 header
 * @package USU5_PRO
 *
 * @var array $text - array of text strings to be used in the html
 */	  
 header( "HTTP/1.0 404 Not Found" );
 header('Location: http_error.php?error_id=404&FWR-URL='. $_SERVER['REQUEST_URI']); ?>

 

It will still log the proper 404 header as well as inform you the requested url in your log/txt file.

 

 

Also, I found a hidden gem, though I have not tried it yet:

includes/modules/ultimate_seo_urls5/includes/uri_redirects_array.php


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

Also, I found a hidden gem, though I have not tried it yet:

includes/modules/ultimate_seo_urls5/includes/uri_redirects_array.php

 

Good catch! Is it work?


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

I dont know. I have just transferred an osc installation to a new set up, but had already written a ton of redirects into the htaccess file, so I'll have to wait for one I missed to see.


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

@@cruisecontrol2010

 

Yes you can config at URL SEO 5 admin.

 

Choose how your product link text is made up

Product link text can be made up of:

p = product name

c = category name

b = manufacturer (brand)

m = model

e.g. bp (brand/product)


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Choose the uri format path_rewrite


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

I have seen this problem mentioned a few times before in this thread. But there is no fix given, so far. I have thoroughly read the installation instructions, several times, and have been working on this for four and a half hours, now. I am getting two errors:

 

On the Admin page, Configuration > SEO 5

 

 

Warning: call_user_func() expects parameter 1 to be a valid callback, function 'tep_reset_cache_data_usu5' not found or invalid function name in /home/dreaming/www/shop/admin/includes/functions/general.php on line 1247

 

 

I have checked all the installation files, even copied the "general.php" file to be sure. There is no reference to any "tep_reset_cache_data_usu5" in general.php nor in any included files that I can find.

 

What is the fix for this, please? It is causing the add-on not to work. :(

 

 

Also, I am getting a second error, on Admin page, header_tags_test.php

 

 

Warning: mysql_num_fields() expects parameter 1 to be resource, object given in /home/dreaming/www/shop/admin/header_tags_test.php on line 303

 

 

In this case it appears to be getting an object, rather than useful data, out of the mysql_get_fields call.

 

 

Help, please. This is driving me crazy. lol

Share this post


Link to post
Share on other sites

Ok after several more hours I think I have figured out what is going on. Here is the problem: There are so many "SEO" addons, and revisions of the same (without making clear WHICH version they are revisions of). I -THINK- I have somehow installed two entirely different SEO add-ons into my shopping cart... or else the first one was a modification of the second, and it was trying to call to functions that I had not yet installed. LOL. Here are the two SEOs I currently have installed:

 

HeaderTags_SEO_V_3.3.0

Ultimate_Seo_Urls_5_PRO_r205

 

I no longer know if these are revisions of each other or completely different add-ons. I am so overwhelmed by this mess. And now comes the fun part: I must disentangle these two, by keeping the second... and deleting all the bits of code and files from the first that #2 does not need.

 

Orrrrrrrr maybe just say "screw it" and do a completely fresh install, and just reinstall all my other add-ons over again. :-/

Share this post


Link to post
Share on other sites

To get rid of this error you just need to install it properly as per the instructions.

 

The error means that you have somehow added the usu5_base_filename() function twice.

 

Hi, I've found this post and done a search in files for any reference to the usu5_base_filename() function to find out where else I've added it and here is what my search came up with:

 

C:\Users\Hey\Documents\Webpages\www\catalog\includes\application_top.php (2 hits)

Line 51: function usu5_base_filename() {

Line 75: $PHP_SELF = usu5_base_filename();

 

I tried commenting out Line 75 and got the white screen.

 

So if I don't have it twice and I followed the directions for install and I'm still getting the errors on my error logs, what now? Thanks.


Jennifer

Share this post


Link to post
Share on other sites

Hi, Sorry for brief above post. I Googled my error message and ended up here on this thread. So to further clarify in the hopes of getting help here are my specifics:

  • I installed this using the instructions in July 2013 on a new copy of OSC 2.3.3
  • I went over the instructions again today to verify I didn't do anything wrong

My specific error message is:

 

[Mon Nov 11 11:50:22 2013] [warn] [client 71.59.138.80] mod_fcgid: stderr: PHP Fatal error: Cannot redeclare usu5_base_filename() (previously declared in /var/www/vhosts/blackopstoys.com/httpdocs/catalog/includes/application_top.php:53) in /var/www/vhosts/blackopstoys.com/httpdocs/catalog/includes/application_top.php on line 73, referer: http://www.blackopstoys.com/catalog/index.php

 

I am also able to generate an error message on the Advance Search results page:

 

[Mon Nov 11 11:50:50 2013] [warn] [client 71.59.138.80] mod_fcgid: stderr: PHP Fatal error: Cannot redeclare usu5_base_filename() (previously declared in /var/www/vhosts/blackopstoys.com/httpdocs/catalog/includes/application_top.php:53) in /var/www/vhosts/blackopstoys.com/httpdocs/catalog/includes/application_top.php on line 73, referer: http://www.blackopstoys.com/catalog/advanced_search_result.php?keywords=batman&search=

 

As you suggested to someone else, that they had the usu5_base_filename() function installed twice, I did a search and here is what came up:

 

C:\Users\Hey\Documents\Webpages\www\catalog\includes\application_top.php (2 hits)

Line 51: function usu5_base_filename() {

Line 75: $PHP_SELF = usu5_base_filename();

 

When I look at my appliction_top.php page, here is the section of code corresponding:

 

/**
 * ULTIMATE Seo Urls 5 PRO by FWR Media
 * 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';
   }
   // Return the standard RC3 code
   return ( ( ( strlen( ini_get( 'cgi.fix_pathinfo' ) ) > 0) && ( (bool)ini_get( 'cgi.fix_pathinfo' ) == false ) ) || !isset( $_SERVER['SCRIPT_NAME'] ) ) ? basename( $_SERVER['PHP_SELF'] ) : basename( $_SERVER['SCRIPT_NAME'] );
 } // End function
// set php_self in the local scope
 $PHP_SELF = usu5_base_filename();

 

The lines of code directly correspond.

 

Finally, as I previously mentioned, I commented out line 75:

$PHP_SELF = usu5_base_filename();

 

And I got the white screen of death.

 

Can you please let me know what is going on and how to fix it?

 

Thanks.


Jennifer

Share this post


Link to post
Share on other sites

i'm having a problem which is partly down to my setup which i accept but i thought i'd give the support forum a go just in case there was a solution.

ok so my initial problem was that having the small word filter set to 1 my part numbers within the url where getting a bit screwed up when a part number was like this for example 12-3-4567-8 which would end up as 12-4567. So i changed the configuration setting from 1 to 0, problem solved, my part numbers work perfectly now.

However i've now come across another problem as a result of that (although technically the problem could still occur where the marker is "pri" or any of the other markers over 1 character). I have a category called "vectra c (2002-2008)" which results in the url being "vectra-c-2002-2008-c-2777.html" which then throws a 404 error as i assume the code is including the c-2002-2008 part of the url as the category path?

 

Any suggestions for fixing this other than changing my category name?

 

would it be possible to split the url up a little more so that its /vectra-c-2002-2008/c-2777.html instead (so rather than have the category name and the path together they get separated by a "/")? I did have a quick go at trying to get that to work but my 1st attempt didn't work and i dont want to mess with the code too much so thought i'd ask the question first.


Scott

Share this post


Link to post
Share on other sites

i'm having a problem which is partly down to my setup which i accept but i thought i'd give the support forum a go just in case there was a solution.

ok so my initial problem was that having the small word filter set to 1 my part numbers within the url where getting a bit screwed up when a part number was like this for example 12-3-4567-8 which would end up as 12-4567. So i changed the configuration setting from 1 to 0, problem solved, my part numbers work perfectly now.

However i've now come across another problem as a result of that (although technically the problem could still occur where the marker is "pri" or any of the other markers over 1 character). I have a category called "vectra c (2002-2008)" which results in the url being "vectra-c-2002-2008-c-2777.html" which then throws a 404 error as i assume the code is including the c-2002-2008 part of the url as the category path?

 

Any suggestions for fixing this other than changing my category name?

 

would it be possible to split the url up a little more so that its /vectra-c-2002-2008/c-2777.html instead (so rather than have the category name and the path together they get separated by a "/")? I did have a quick go at trying to get that to work but my 1st attempt didn't work and i dont want to mess with the code too much so thought i'd ask the question first.

 

I played around with the code some more and managed to split the marker section of the url with a "/" by doing the following.

 

i changed .htaccess from

RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]

to

RewriteRule ^([a-z0-9/-]+)/c-([0-9_]+).html$ index.php [NC,L,QSA]

 

*I did that for all markers not just the category one*

 

and then changed page_modules/index.php

protected $dependencies = array( 'cPath'		    => array( 'marker'	 => '-c-',

to

protected $dependencies = array( 'cPath'		    => array( 'marker'	 => '/c-',

 

* again i did this for all markers in page_modules*

 

can anyone see any potential problems with what i have done?


Scott

Share this post


Link to post
Share on other sites

can anyone see any potential problems with what i have done?

 

Realised there is an issue with it in that any url that has been indexed with -c- as the marker now produces a 404 so need to figure out how to get it to redirect to the new marker


Scott

Share this post


Link to post
Share on other sites

Realised there is an issue with it in that any url that has been indexed with -c- as the marker now produces a 404 so need to figure out how to get it to redirect to the new marker

 

fixed (i hope) by adding the following to htaccess

RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ "http://mydomain.com/catalog/$1/c-$2.html" [R=301]

 

again, thoughts on what i've done? Any more potential problems? Could it be improved at all?


Scott

Share this post


Link to post
Share on other sites

fixed (i hope) by adding the following to htaccess

RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ "http://mydomain.com/catalog/$1/c-$2.html" [R=301]

 

again, thoughts on what i've done? Any more potential problems? Could it be improved at all?

 

complete path wasn't required

edit:

RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ $1/c-$2.html [R=301]


Scott

Share this post


Link to post
Share on other sites

i'm having another problem, this time with invalid characters. A lot of my products have been added using easypopulate and some invisible characters have been added to product names from excel which is resulting in things like %1D being included in the url which then causes the url to return a 404 page not found. Is there a way to remove these from the url as part of the sanitizing process?


Scott

Share this post


Link to post
Share on other sites

Hi,

 

Been searching for an hour or so to find a solution to this, but no luck so far.

 

Trying to install this on my 2.3.3.4 site and in the instructions it says:

Find ...

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

Add immediately ABOVE ...

/**

* ULTIMATE Seo Urls 5 PRO by FWR Media

*/

Usu_Main::i()->setVar( 'languages_id', $languages_id )

->setVar( 'request_type', $request_type )

->setVar( 'session_started', $session_started )

->setVar( 'sid', $SID )

->setVar( 'language', $language )

->setVar( 'filename', $PHP_SELF )

->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id, $language );

 

However, in 2.3.3.4 the Find code is actually:

// include the language translations
 $_system_locale_numeric = setlocale(LC_NUMERIC, 0);
 require(DIR_WS_LANGUAGES . $language . '.php');
 setlocale(LC_NUMERIC, $_system_locale_numeric); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)

The LC_NUMERIC function was added at 2.3.3.4 update.

 

If I add the code from the mod above this block then I get a white page on page load.

 

Has anyone found a solution to this on 2.3.3.4?

 

Many Thanks


Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Share this post


Link to post
Share on other sites

Hi fwrmedia.co.uk

I am installing the German character conversion from your post/download.

 

This Character conversion looks more like Danish than German so I changed the characters.

So the error message I get once I installed the german version (which I modified to the German Characters;)

 

<?php

 

$char_convert = array ('ä' => 'a', 'Ä' => 'A', 'é' => 'e', 'É' => 'E', 'ë' => 'e', 'ö' => 'o', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E','Ü' => 'U', 'ü' => 'u', 'ß'=> 's', '€' => 'Euros')

?>

 

I get this error:

 

Warning: Cannot modify header information - headers already sent by (output started at /homez.714/xnecobbc/www/catalog/includes/modules/ultimate_seo_urls5/includes/character_conversion/german.php:2) in /homez.714/xnecobbc/www/catalog/includes/modules/ultimate_seo_urls5/main/validator.php on line 178

 

I can not see why it isn't working on the pages with german special characters... for example on page http://xnecobbc.cluster015.ovh.net/catalog/index.php/de/einweg-baumwolle-baby-feuchtt%C3%83%C2%BCc-c-38

 

Thanks for any advice

Kind regards

Len

 

Below is the original german 'version' that I changed.

 

<?php

/**

*

* ULTIMATE Seo Urls 5

*

*

* @package Ultimate Seo Urls 5

* @@licensed2kill http://www.opensource.org/licenses/gpl-2.0.php GNU Public License

* @@Link http://www.fwrmedia.co.uk

* @@copyright Copyright 2008-2009 FWR Media

* @@copyright Portions Copyright 2005 Bobby Easland

* @@author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk

* @lastdev $Author:: Rob $: Author of last commit

* @lastmod $Date:: 2010-12-15 07:33:22 +0000 (Wed, 15 Dec 2010) $: Date of last commit

* @version $Rev:: 192 $: Revision of last commit

* @Id $Id:: german.php 192 2010-12-15 07:33:22Z Rob $: Full Details

*/

 

// German

// Credit to Tim from Germany, thanks Tim

$char_convert = array( 'ä' => 'ae', 'å' => 'a', 'æ' => 'ae',

'ð' => 'd', 'ë' => 'e', 'ö' => 'oe',

'ø' => '', 'ß' => 'ss', 'þ' => 'p',

'ü' => 'ue', 'ÿ' => 'y', 'Ä' => 'AE',

'Å' => 'A', 'Æ' => 'AE', 'Ð' => 'D',

'Ë' => 'E', 'Ö' => 'OE', 'Ø' => '',

'Þ' => '', 'Ü' => 'UE' );

Share this post


Link to post
Share on other sites

Hi,

I'm getting 404 not found page when changing uri format

standard and path_standard are working fine

BUR when change to rewrite OR path_rewrite I'm getting 404 error

 

tries 777 to .htaccess

 

osc is installed in folder

osc latest version v2.3.3

 

regards

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

×