Jump to content
Sign in to follow this  
FWR Media

[Contribution] Independent SEO URL Validation

Recommended Posts

ok let's say with your workaround :)

 

For example I may have been wrong.

 

The fix could well be

 

catalog/shopping_cart.php

 

find . .

 

tep_array_to_string($navigation->path[$back]['get'], array('action'))

 

Change to ..

 

tep_array_to_string($navigation->path[$back]['get'], array('action', 'products_id'))

 

Actually this makes more sense as our problem stemmed from the shopping cart.

Edited by Babygurgles

Share this post


Link to post
Share on other sites

Nope lol

 

The first one is more likely as products_listing adds a products_id itself.

 

Go with the first (potential fix).

Share this post


Link to post
Share on other sites
Nope lol

 

The first one is more likely as products_listing adds a products_id itself.

 

Go with the first (potential fix).

 

both are working for me, i dont have products_id into continue button url after the second one !

 

my french forum post has been updated with both !

Edited by spcs

Share this post


Link to post
Share on other sites
both are working for me, i dont have products_id into continue button url after the second one !

 

 

Ok but I have a feeling the first was the correct one.

Share this post


Link to post
Share on other sites
I think I've located the problem

 

catalog/includes/modules/products_listing.php

 

Line 133(ish)

 

tep_get_all_get_params(array('action'))

 

Should be ..

 

tep_get_all_get_params(array('action', 'products_id'))

 

This fixed the problem for me. Although, I'm not sure it was a problem in my case. I did notice that all products in the category listing had the products_id of the one added to the cart like mentioned, but it didn't seem to affect adding the correct product to the cart. Not sure if it matters, but I used this fix for the continue shopping button:

 

http://addons.oscommerce.com/info/2891

 

Not the original, but the one listed by Matt Peace. It takes the customer back to the category the product belongs to instead of back to the product they just added, which makes no sense. There are situations where it doesn't work exactly like that, but for the most part it does.

Share this post


Link to post
Share on other sites
This fixed the problem for me. Although, I'm not sure it was a problem in my case.

 

No I can understand that. I loaded a vanilla RC2a to test and it worked just fine.

 

However .. it only worked because the "good" products_id=x came last in the querystring.

 

So the vanilla installation reads the correct $HTTP_GET_VARS['products_id'] in application_top.php at the buy_now action.

 

With some ULTIMATE SEO URLs installs the correct $HTTP_GET_VARS['products_id'] doesn't come first and you end up adding exactly the same product to cart again no matter which one you click on.

 

 

IN FACT I would like to say that if your oscommerce is not reacting badly to this then leave it alone! I simply pointed out a potential bug that is affecting some people. Harald/team will confirm IF it is a bug and the correct solution.

Edited by Babygurgles

Share this post


Link to post
Share on other sites

Am in the process of reworking an old storefront; mirrored existing database then updated, installed fresh testbed of RC2 so I can afford to screw around without hurting the currently "real" store.

 

Installed Ultimate Seo Urls 2.2.2E Fixed RELOAD to testbed, then installed Independent SEO URL Validation 1.0.2 as per instructions (including "If you use this with 2-2.2e..." - checked that twice to make sure I didn't miss rem-ing any validate lines).

 

Categories immediately went to heck-in-a-handbasket; they were being reported as "http://<<site>>/catalog/-c-NN.html" (N=number) which redirected as 404 to the index.

 

Fix was to remove modified 2.2.2E seo.class.php and replace with 2.1d seo.class.php - everything fine, categories now properly reporting "http://<<site>>/catalog/<<cat-name>>-c-NN.html" and properly redirecting if given /-c-NN.html.

 

Dunno if it means anything, but figured I should report it.

Share this post


Link to post
Share on other sites
Am in the process of reworking an old storefront; mirrored existing database then updated, installed fresh testbed of RC2 so I can afford to screw around without hurting the currently "real" store.

 

Installed Ultimate Seo Urls 2.2.2E Fixed RELOAD to testbed, then installed Independent SEO URL Validation 1.0.2 as per instructions (including "If you use this with 2-2.2e..." - checked that twice to make sure I didn't miss rem-ing any validate lines).

 

Categories immediately went to heck-in-a-handbasket; they were being reported as "http://<<site>>/catalog/-c-NN.html" (N=number) which redirected as 404 to the index.

 

Fix was to remove modified 2.2.2E seo.class.php and replace with 2.1d seo.class.php - everything fine, categories now properly reporting "http://<<site>>/catalog/<<cat-name>>-c-NN.html" and properly redirecting if given /-c-NN.html.

 

Dunno if it means anything, but figured I should report it.

 

Yeah thanks Charlie it compounds my recommendation to use the first uploaded seo.class.php of 2.1d (uploaded by Yesudo) not any of the buggy 2-2.2e versions.

Share this post


Link to post
Share on other sites
Yeah thanks Charlie it compounds my recommendation to use the first uploaded seo.class.php of 2.1d (uploaded by Yesudo) not any of the buggy 2-2.2e versions.

 

I have added Ultimate SE no problems that I am aware of it renames products and categories for me fine but then I read about the independant validation process and have added that once I eventually understood how to run the verification_installation.php. Now I have a problem if validation is set at false then new url's for categories and products appear, eg:-

 

Now as soon as I turn independent validation to true then I get this in browser bar for Lavender Emu Oil, as an example:-

and a Cannot display web page message.

 

So I have turned validation off until somebody can help me otherwise nobody can access and purchase products on site.


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites
Does it work with W3C OFF?

 

Makes no difference.

Share this post


Link to post
Share on other sites
I have added Ultimate SE no problems that I am aware of it renames products and categories for me fine but then I read about the independant validation process and have added that once I eventually understood how to run the verification_installation.php. Now I have a problem if validation is set at false then new url's for categories and products appear, eg:-

Now as soon as I turn independent validation to true then I get this in browser bar for Lavender Emu Oil, as an example:-

and a Cannot display web page message.

 

So I have turned validation off until somebody can help me otherwise nobody can access and purchase products on site.

 

Is seo urls on right now?

Share this post


Link to post
Share on other sites
Is seo urls on right now?

 

Validation fasle Ultimate URL on.

Enable SEO URLs? true

Add cPath to product URLs? false

Add category parent to begining of URLs? false

Filter Short Words 1

Output W3C valid URLs (parameter string)? true

Enable SEO cache to save queries? true

Enable product cache? true

Enable categories cache? true

Enable manufacturers cache? true

Enable articles cache? true

Enable topics cache? true

Enable information cache? true

Enable link directory cache? true

Enable automatic redirects? true

Choose URL Rewrite Type Rewrite

Enter special character conversions

Remove all non-alphanumeric characters? false

Reset SEO URLs Cache false

 

settings as above

Edited by Measha06

Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites
Validation fasle Ultimate URL on.

 

Ok you have a problem outside of ULTIMATE SEO URLs and outside of this validation contribution.

 

When I load your front page and hover over a product the url shown at the bottom of my screen is, for example

 

www.mysite.com/product_info.php?products_id=x - THIS IS WRONG

 

If I hover over your categories menu I see links like index.php?cPath=30 - THIS iS WRONG

 

If however I click on a menu item I then go to an SEO URL

 

Example .. Emu Oil Bath & Shower

 

Category link = index.php?cPath=24

 

Click on it I go to emu-oil-bath-shower-c-24.html

 

You don't have a problem with this validation script you have a problem with your site coding and how it works with ULTIMATE SEO URLs. I suggest you leave validation OFF for now and take your issue to the support forum for ULTIMATE SEO URLs.

Share this post


Link to post
Share on other sites
Ok you have a problem outside of ULTIMATE SEO URLs and outside of this validation contribution.

 

When I load your front page and hover over a product the url shown at the bottom of my screen is, for example

 

www.mysite.com/product_info.php?products_id=x - THIS IS WRONG

 

If I hover over your categories menu I see links like index.php?cPath=30 - THIS iS WRONG

 

If however I click on a menu item I then go to an SEO URL

 

Example .. Emu Oil Bath & Shower

 

Category link = index.php?cPath=24

 

Click on it I go to emu-oil-bath-shower-c-24.html

 

You don't have a problem with this validation script you have a problem with your site coding and how it works with ULTIMATE SEO URLs. I suggest you leave validation OFF for now and take your issue to the support forum for ULTIMATE SEO URLs.

 

Robert

 

Thank you for all your help I will follow your advice and will let you know how I get on. Help like your is much appreciated to a coding illiterate like me!


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites
You don't have a problem with this validation script you have a problem with your site coding and how it works with ULTIMATE SEO URLs. I suggest you leave validation OFF for now and take your issue to the support forum for ULTIMATE SEO URLs.

 

Thanks very much for all your help. You are a dream to novices. You were exactly right there was no problem with the validation coding at all. There was some coding missing from one of the files when I uploaded the Ultimate SEO, thanks for suggesting that. Once I had replaced the missing code EUREKA it all worked spot on.

 

Thanks again for a brilliant addition and first class help.


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites

Hi,

Thanks for the brilliant contribution.

 

I have installed Ultimate Seo Urls 2.1d and then installed Independent SEO URL Validation 1.0.2 according to the instructions.

My Categories are reported as http://site/catalog/-c-nn.html" (n=number); and selecting any category redirects me to the index; exactly as reported by Charlie. However, Charlie's fix is not working for me as I’m already using "2.1d seo.class.php”.

 

I'm using osCommerce-2.2rc1 and MySQL5.

A note from the installation instructions mentioned this: “(Needs a few tweaks for strict MySQL5 and short_open_tag off)”….

Would this be my problem? I don’t have any idea what to tweak or how to set ‘short_open_tag off”

 

Please help

 

Many thanks

Share this post


Link to post
Share on other sites
Hi,

Thanks for the brilliant contribution.

 

I have installed Ultimate Seo Urls 2.1d and then installed Independent SEO URL Validation 1.0.2 according to the instructions.

My Categories are reported as http://site/catalog/-c-nn.html" (n=number); and selecting any category redirects me to the index; exactly as reported by Charlie. However, Charlie's fix is not working for me as I’m already using "2.1d seo.class.php”.

 

I'm using osCommerce-2.2rc1 and MySQL5.

A note from the installation instructions mentioned this: “(Needs a few tweaks for strict MySQL5 and short_open_tag off)”….

Would this be my problem? I don’t have any idea what to tweak or how to set ‘short_open_tag off”

 

Please help

 

Many thanks

 

Hmmm .. I've "doctored" a catalog/includes/classes/seo.class.php attached below .. please feed back.

Share this post


Link to post
Share on other sites
Hmmm .. I've "doctored" a catalog/includes/classes/seo.class.php attached below .. please feed back.

 

 

It works :D ; thanks very much for the great addition and all the help.

 

 

I'm experiencing a problem when I add a product as a customer from the main site (i.e. using the "Customer Add Product" contribution). When I press insert button, the status bar at the bottom hangs forever with the message “waiting for http://site/account_add.php?osCsid=2.......” and eventually timeouts, displaying IE warning “page can not be displayed”; but the product is added to the catalogue and i'm able to add products from the admin panel.

 

I’m not sure whether its anything to do with the Independent SEO URL Validation 1.0.2 AND/ Seo Urls 2.1d.

 

 

Thanks again

Share this post


Link to post
Share on other sites
It works :D ; thanks very much for the great addition and all the help.

I'm experiencing a problem when I add a product as a customer from the main site (i.e. using the "Customer Add Product" contribution). When I press insert button, the status bar at the bottom hangs forever with the message “waiting for http://site/account_add.php?osCsid=2.......” and eventually timeouts, displaying IE warning “page can not be displayed”; but the product is added to the catalogue and i'm able to add products from the admin panel.

 

I’m not sure whether its anything to do with the Independent SEO URL Validation 1.0.2 AND/ Seo Urls 2.1d.

Thanks again

 

I'm not familiar with the contribution so can't really comment.

Share this post


Link to post
Share on other sites
I'm not familiar with the contribution so can't really comment.

hi if i want to update to 1.0.2 (FULL PACKAGE) do i need to update the database file or just the code?

 

Thanks

Share this post


Link to post
Share on other sites
hi if i want to update to 1.0.2 (FULL PACKAGE) do i need to update the database file or just the code?

 

Thanks

 

If you have admin On/Off then just the code.

Share this post


Link to post
Share on other sites

I have a question about the on-existant category/page that should return a 404 and then redirect to index.php

http://mysite.com//my-great-product-c-99999.html

When I check the headers of this URL I am getting a HTTP/1.1 302 Found and then redirected to index page with a HTTP/1.1 200 OK

302 = My page has moved to a temporary location - it will then be indexed as where it is pointed to i.e. my index page - this would lead to duplication of my home page.

For some reason my site is returning a found status for this rubbish url when there is a redirect to the index page.

In includes/functions/general.php when I uncomment this line - header("Location: $dohome"); // .. 404 redirect to index.php .. and never come back!!!

I get the correct 404 status code albeit with a blank page.

Do you have any deas why this is happening as it appears incorrect.

Thanks,

Chris

Share this post


Link to post
Share on other sites
I have a question about the on-existant category/page that should return a 404 and then redirect to index.php

http://mysite.com//my-great-product-c-99999.html

when I uncomment this line - header("Location: $dohome"); // .. 404 redirect to index.php .. and never come back!!!

I get the correct 404 status code albeit with a blank page.

 

when you uncomment it?

 

Which version of seo.class.php are you using? if it is 2-2.2e have you commented out the validation lines?

Share this post


Link to post
Share on other sites

BTW when you have been 404'd to index.php and are viewing the header, you are viewing the successful header of the redirected page.

 

And ofc index.php is 200 ok.

 

The 404 header is issued prior to the redirect .. so to see the 404 header you would have to ..

 

Find ..

 

header("HTTP/1.0 404 Not Found"); // Set header 404 Not Found

 

add below it ..

 

die('Show me the 404 big boy!!');

 

Then go to an seo url and cause a 404. When you see the source it will correctly show a 404 header.

 

Hope that helps

 

Rob

Share this post


Link to post
Share on other sites

Ultimate SEO Version 2.1.

I do get the 404 when I put the code - die('Show me the 404 big boy!!'); ... :-)

When I just leave the General.php file with the contribution code in that re-directs to index.php I am getting a 302 first ( not a 404) and then 200 (see below) -

#1 Server Response: http://www.xxxxx.net/my-great-product-c-99999.html HTTP/1.1 302 Found

#2 Server Response: http://www.xxxxx.net/ HTTP/1.1 200 OK

Strange,but true.Can't figure why it should do that though.

Thanks,

Chris

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
Sign in to follow this  

×