Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

hi

remembre me ???

 

today I setup a brand new osc and install the 2.1d

and have still the same problem...:-((

any idea?

 

Nope looks like something on your server as no one else has it.

Link to comment
Share on other sites

I'm using "Ultimate Seo Urls v2.5 FullPackage" and have one question. Why there is a

url = preg_replace('/&/','&',$url);

line at the end of the script, after last curly bracket?

 

It generates notices and does seem to be in good place. What $url variable does it change? Certainly not the one that is defined inside seo class.

Link to comment
Share on other sites

Nope looks like something on your server as no one else has it.

 

 

I don't think so, because I'm using a commercial server shared with many others...

but you never know....

 

Howerver:

I installed seo_redirect.php 1.2

and put in the admin Enable automatic redirects = false

 

and anything works perfect >>no more errors with the drop down menu

EXCEPT

the changes/edit in Products SEO URL: / Category SEO URL:

are not working anymore

 

any idea

Link to comment
Share on other sites

Hello,

this contrib works with IE but doesnt work with my mozilla explorer...:(

Do you know reasons?

 

 

Many thanks for contributors !!!

 

 

ERROR

The requested URL could not be retrieved

 

While trying to retrieve the URL: www . z-tuning . fr

 

The following error was encountered:

 

* Connection to xxx.yyy.33.4 Failed

 

The system returned:

 

(110) Connection timed out

 

The remote host or network may be down. Please try the request again.

 

Your cache administrator is webmaster.

 

My website : www . z-tuning . fr

Edited by Jan Zonjee
Link to comment
Share on other sites

Hello,

I have SEO URL's installed on numerous websites running as virtual hosts on apache. My product urls work great but my category ones do not. I need a little help please.

 

My category URL's look like this

 

http://www.XXXXX.com/-c-4.html?osCsid=412c...0218a8b90be3cf4

 

I need these to be like

 

http://www.XXXXX.com/bluecogs-c-4.html?osC...0218a8b90be3cf4

 

Or what ever it normally would appear as.

 

Thanks in advance

Link to comment
Share on other sites

Can I just make clear here .. I support version 2.1d ORIGINAL updated as uploaded by me. Anything else I'm not interested in so please post the version when posting here.

 

As per usual new versions have gone up and "shock" everyone has problems whereas noone had problems before.

 

Use the version I mentioned.

Edited by FWR Media
Link to comment
Share on other sites

FWR Media:

I've switched to your version and want to suggest some minor fixes:

 

NOTICES generated in few places:

1) add $_sid = null; at the beggining of function add_sid. There are cases where code that sets $_sid not always executes and so the notice.

2) add $container = array(); somewhere in the begging of function short_name. Same case as above.

 

BROKEN code:

1) generate_categories_cache function does not generate categories cache because sql query is broken. Some of the uploaded versions had this fixed but not your revision. You will see the problem by looking in database or removing error supressing (@) sign from mysql_query function in "Query" funciton.

I have changed query in generate_categories_cache function to this (not sure it's 100% correct in all cases but works for me):

		  $sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName
			  FROM ".TABLE_CATEGORIES." c
			  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON c.categories_id = cd.categories_id
			  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 ON c.parent_id=cd2.categories_id
			  AND cd2.language_id='".(int)$this->languages_id."'
			  WHERE c.categories_id=cd.categories_id
			  AND cd.language_id='".(int)$this->languages_id."'";

2) after header("Location: $url"); in function "do_redirect" add "exit;" call. Not sure it's that important for google but for sure will make redirect a bit faster.

 

USE OF NON EXISTING function:

1) search for $this->keep_in_memory and remove this method call. This method is used but not defined anywhere. I think original versions by Chemo had this problem too.

 

Consider adding Validatename function that exists in some of the versions. It looks to be very usefull in some situations. For example:

1) Google finds link /my-pink-bunny-p-10.html in shop.

2) You decide to change name of this product so that new link becomes /my-black-bunny-p-10.html

3) Cache expires after a month and now product listing contains link /my-black-bunny-p-10.html

3) Google finds new link but also "remembers" old link which still works so now it has two same pages with different links. I guess this is bad for google.

 

With Validatename function, when google checks first link, it gets pointed to new link by permanent redirect and so now it has this page only once in its database.

Edited by fszone
Link to comment
Share on other sites

FWR Media:

I've switched to your version and want to suggest some minor fixes:

 

NOTICES generated in few places:

1) add $_sid = null; at the beggining of function add_sid. There are cases where code that sets $_sid not always executes and so the notice.

2) add $container = array(); somewhere in the begging of function short_name. Same case as above.

 

BROKEN code:

1) generate_categories_cache function does not generate categories cache because sql query is broken. Some of the uploaded versions had this fixed but not your revision. You will see the problem by looking in database or removing error supressing (@) sign from mysql_query function in "Query" funciton.

I have changed query in generate_categories_cache function to this (not sure it's 100% correct in all cases but works for me):

		  $sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName
			  FROM ".TABLE_CATEGORIES." c
			  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON c.categories_id = cd.categories_id
			  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 ON c.parent_id=cd2.categories_id
			  AND cd2.language_id='".(int)$this->languages_id."'
			  WHERE c.categories_id=cd.categories_id
			  AND cd.language_id='".(int)$this->languages_id."'";

2) after header("Location: $url"); in function "do_redirect" add "exit;" call. Not sure it's that important for google but for sure will make redirect a bit faster.

 

USE OF NON EXISTING function:

1) search for $this->keep_in_memory and remove this method call. This method is used but not defined anywhere. I think original versions by Chemo had this problem too.

 

Consider adding Validatename function that exists in some of the versions. It looks to be very usefull in some situations. For example:

1) Google finds link /my-pink-bunny-p-10.html in shop.

2) You decide to change name of this product so that new link becomes /my-black-bunny-p-10.html

3) Cache expires after a month and now product listing contains link /my-black-bunny-p-10.html

3) Google finds new link but also "remembers" old link which still works so now it has two same pages with different links. I guess this is bad for google.

 

With Validatename function, when google checks first link, it gets pointed to new link by permanent redirect and so now it has this page only once in its database.

 

Yup all known at my end .. I run all of my sites/dev error_reporting(E_ALL | E_STRICT) but to be honest it is pretty pointless here as users don't even want to validate basic (quirks) html and the core osc throws tons of notice errors if you run E_ALL.

 

Sooo .. haven't bothered moving my "corrected" files over.

 

Glad to see someone else cares though :)

Edited by FWR Media
Link to comment
Share on other sites

Dear FWR Media:

 

Before I post on oscommerce forums, I tried to do all I possibly can to figure out the problem, including re-installing contribution to see if that fix it.

 

My Problem is:

 

Old URLs are not being redirecting to new ones.

 

I first installed version 2.5 and didn't work so I went step by step and changed to your 2.1d ORIGINAL updated.

 

Here is the link to a product:

http://www.yogicchai.com/catalog/yogicchai...2ea0bb87efbbfb4

 

and here is the non functional link indexed by Google:

http://www.yogicchai.com/catalog/yogicchai...;products_id=37

 

Here is my .htaccess:

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /catalog/yogicchai/

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

Any suggestion will be greatly appreciated

 

Thanks in advance

 

Ricardo

Link to comment
Share on other sites

Just to add to my previous post...

 

If I set in Admin "Enable automatic redirects? to False" all my links work, including the ones indexed by Google but not redirecting to new url.

 

I tried installing the Validation contribution and I get a message from Firefox saying "REDIRECT LOOP"

 

Would love some help!

 

Ricardo

Link to comment
Share on other sites

Just to add to my previous post...

 

If I set in Admin "Enable automatic redirects? to False" all my links work, including the ones indexed by Google but not redirecting to new url.

 

I tried installing the Validation contribution and I get a message from Firefox saying "REDIRECT LOOP"

 

Would love some help!

 

Ricardo

 

Your site exibits the index.php?catalog= behaviour which I have seen before.

 

Try the following: -

 

Find ..

 

$this->path_info = is_numeric(strpos(ltrim(getenv('PATH_INFO'), '/') , '/')) ? ltrim(getenv('PATH_INFO'), '/') : NULL;

 

Change to ..

 

$this->path_info = false;

 

Basically USU uses getenv('PATH_INFO') when attempting to ascertain if the broken osc "experimental" search friendly urls is enabled. getenv('PATH_INFO') is unreliable and can return different info on different servers.

Link to comment
Share on other sites

Your site exibits the index.php?catalog= behaviour which I have seen before.

 

Try the following: -

 

Find ..

 

$this->path_info = is_numeric(strpos(ltrim(getenv('PATH_INFO'), '/') , '/')) ? ltrim(getenv('PATH_INFO'), '/') : NULL;

 

Change to ..

 

$this->path_info = false;

 

Basically USU uses getenv('PATH_INFO') when attempting to ascertain if the broken osc "experimental" search friendly urls is enabled. getenv('PATH_INFO') is unreliable and can return different info on different servers.

 

FANTASTIC Robert!

 

That did the trick!

 

All my links are working now, which means my contribution is being installed successfully, right?

 

One last thing...

 

Now that Ultimate SEO is working, if I go and enable "Seo URL validation" on ADMIN then I get this response from firefox on all my links:

"Redirect Loop- Firefox has detected that the server is redirecting the request for this address in a way that will never complete"

 

Any thoughts on that one?

 

I appreciate your help Robert

 

Ricardo

Link to comment
Share on other sites

I am running 2.1d your upload but I need my category text to populate. Any help please

 

 

 

Hello,

I have SEO URL's installed on numerous websites running as virtual hosts on apache. My product urls work great but my category ones do not. I need a little help please.

 

My category URL's look like this

 

http://www.XXXXX.com/-c-4.html?osCsid=412c...0218a8b90be3cf4

 

I need these to be like

 

http://www.XXXXX.com/bluecogs-c-4.html?osC...0218a8b90be3cf4

 

Or what ever it normally would appear as.

 

Thanks in advance

Link to comment
Share on other sites

I am running 2.1d your upload but I need my category text to populate. Any help please

 

 

the category text not populating is caused by the old version of 2.1d not having MySQL5 compatible queries.

 

This should not happen with 2.1d ORIGINAL updated.

 

1) Are you sure you have the seo.class.php file from my download (re upload it anyway)

 

2) Make certain you reset SEO URLs cache or you will be using old urls.

Link to comment
Share on other sites

Thanks a ton that was the fix I did not have the updated version....

 

 

 

the category text not populating is caused by the old version of 2.1d not having MySQL5 compatible queries.

 

This should not happen with 2.1d ORIGINAL updated.

 

1) Are you sure you have the seo.class.php file from my download (re upload it anyway)

 

2) Make certain you reset SEO URLs cache or you will be using old urls.

Link to comment
Share on other sites

Thanks a ton that was the fix I did not have the updated version....

 

Donald

 

Would you mind testing a small bit of code for me please. I want to upload an update to the contribution but I can't replicate what your server is doing.

Link to comment
Share on other sites

I'm getting this error message:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/research/public_html/bekleen/store/includes/classes/seo.class.php on line 626

 

Can anyone help?

Link to comment
Share on other sites

I'm getting this error message:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/research/public_html/bekleen/store/includes/classes/seo.class.php on line 626

 

Can anyone help?

 

Looks like a bad version, what version is it?

 

Download 2.1d ORIGINAL updated (last uploaded by me)

Link to comment
Share on other sites

Looks like a bad version, what version is it?

 

Download 2.1d ORIGINAL updated (last uploaded by me)

 

 

I've done that and now it is creating the urls, but giving me:

 

Not Found

The requested URL /directory/product_info.php was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Any clues?

 

Whoops - also getting this message in the store:

 

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in /home/research/public_html/bekleen/store/admin/includes/functions/general.php on line 1195

Edited by bluewaves
Link to comment
Share on other sites

I've done that and now it is creating the urls, but giving me:

 

Not Found

The requested URL /directory/product_info.php was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Any clues?

 

Whoops - also getting this message in the store:

 

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in /home/research/public_html/bekleen/store/admin/includes/functions/general.php on line 1195

 

sherry are you on a WinDoze server? as this won't work with that.

 

If linux, 2.1d does not have such errors, go back over the install instructions one by one replacing the existing code.

 

Ensure that rewriteBase is correct in .htaccess too.

Link to comment
Share on other sites

sherry are you on a WinDoze server? as this won't work with that.

 

If linux, 2.1d does not have such errors, go back over the install instructions one by one replacing the existing code.

 

Ensure that rewriteBase is correct in .htaccess too.

 

- Linux - I was able to get the program to rewrite the URLs ...it just gave me 404 messages and

when I went to the admin panel - tools - define language - it gave me error messages saying that the permissions

weren't allowing it to write. Are there specific permissions I need to set on any files?

 

Should I just try to reinstall again...

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...