Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

I decide to go with 2.0 with caching and it's workng

 

BUT

 

in admin I get a black page. In order to determine what code was breaking it.. and if I remove from

 

admin/includes/functions/general.php

 

 

// Ultimate SEO URLs - by Chemo

// Funtion to reset SEO URLs database cache entries

function tep_reset_cache_data_seo_urls($action){

switch ($action){

case 'reset':

tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'");

tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'");

break;

default:

break;

}

# The return value is used to set the value upon viewing

# It's NOT returining a false to indicate failure!!

return 'false';

}

 

 

the admin pages load properly.

 

I've placed this before the closing ?> and have even moved it upwards in the file all the way to the top with the same results.

 

Suggestions?

My Contributions

 

Henry Smith

Link to comment
Share on other sites

I am having a problem and I noticed that others were having the same problem but didn't post a fix in the thread.

 

Installed this contrib and when it is turned on in admin, I get 404 errors for the categories pages. Turned off and everything works fine. I did notice when turned on that the url appears as:

 

www.site.com/catalog/name.html

 

after being clicked it goes to:

 

site.com/catalog/name.html

 

I did make changes to the htaccess file and this is what mine shows.

 

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

 

 

Anyone have any ideas what could be causing this?

Link to comment
Share on other sites

I found this posted in the contributions section by "bchecketts"

 

the '&' character is valid when it is displayed on a page because the browser intreprets it correctly. However when it is used in a redirect, the browser doesn't intrepret the '&' into just '&', so it shows up incorrectly in the url

Added these two lines to includes/classes/seo.class.php line #1890

 

# BC Redirects shouldn't have '&'s in them

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

 

I also found the reference to the "&" sign modification for Ultimate SEO. I entered the two sugessted lines (although it wasn't clear to me exactly where it's supposed to go but I did it like this

 

} # end foreach( $params as $var => $value )

$params = ( sizeof($params) > 1 ? implode('&', $params) : $params[0] );

$url = $this->href_link($this->uri_parsed['path'], $params, 'NONSSL', false);

if ( $this->attributes['USE_SEO_REDIRECT'] == 'true' ){

# BC Redirects shouldn't have '&'s in them

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

header("HTTP/1.0 301 Moved Permanently");

header("Location: $url"); // redirect...bye bye

}

} # end function do_redirect

 

But redirects for more information still do not work when Ultimate SEO is turned on. Did I put the lines in the wrong place? Thanks in advance!

Link to comment
Share on other sites

@cpennington, heres my code, this is line 1890

 

$params = ( sizeof($params) > 1 ? implode('&', $params) : $params[0] );

$url = $this->href_link($this->uri_parsed['path'], $params, 'NONSSL', false);

# BC Redirects shouldn't have '&'s in them *line 1890*

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

if ( $this->attributes['USE_SEO_REDIRECT'] == 'true' ){

header("HTTP/1.0 301 Moved Permanently");

header("Location: $url"); // redirect...bye bye

}

} # end function do_redirect

 

Im a out of date ASP scripter, but im beginning to think that the redirect function does not work in some pages, i have been trying to put the above code in lots of different lines, and nothing happens.

 

I have been looking for solution for about a week. I really want to use this contribution, so i have spent all this time looking for answers. Posted alot of detailed questions in all sorts of forum and also Google alot. I tried reaching bchecketts and also i have been trying to reach Bobby(Chemo), seems hard, sinse his banned here. No luck, no feedback:(

 

So what can i say, im REALLY stuck:(

 

I cant understand this, there is alot of people using this contribution, dont they have this problem?. Im pretty shure i have done everything right, i have installed close to 90 contributions and had no problems until now. I have readed that one person claims that it's a bug, if thats true, can anyone please confirm this?

 

There must be sombody here that can help us out or point us in the right directions?

 

Best regards

Jan S, Norway

Link to comment
Share on other sites

@seiern

 

i thinking absolutly the same. chemo is needed or someone else.

 

my problems are not the redirect i thinking but i am not sure.

i dont got 404pages by redirect, all listed links in google are working

the complete url i have not controlled

 

but with the session id

with the last version from 12.02.06 my yahoo link goes up and down

sometimes a few thousand and 2 hours later only 150 backlinks

with each spider i found session id, therefore i install SID-KILLER, last saturday, now all of my pages got PR0 !

before sid-killer over 70 pages in my store with PR2 and many products with PR1

 

also i got problems with chemos started "google sitemap"

brings only errors in combination with seo url.

 

i am searching the complete month for a fix.

so please, someone help.

 

in google i have lost so many links and i dont know why

i also i have searched for a another contributio with nearly the same features but i found nothing.

 

if someone wants to check my side,

send a PM

 

i think this one of best contribution,

but i want use all, not only a part.

 

 

bg

Michael

Link to comment
Share on other sites

@seiern

 

i thinking absolutly the same. chemo is needed or someone else.

 

my problems are not the redirect i thinking but i am not sure.

i dont got 404pages by redirect, all listed links in google are working

the complete url i have not controlled

 

but with the session id

with the last version from 12.02.06 my yahoo link goes up and down

sometimes a few thousand and 2 hours later only 150 backlinks

with each spider i found session id, therefore i install SID-KILLER, last saturday, now all of my pages got PR0 !

before sid-killer over 70 pages in my store with PR2 and many products with PR1

 

also i got problems with chemos started "google sitemap"

brings only errors in combination with seo url.

 

i am searching the complete month for a fix.

so please, someone help.

 

in google i have lost so many links and i dont know why

i also i have searched for a another contributio with nearly the same features but i found nothing.

 

if someone wants to check my side,

send a PM

 

i think this one of best contribution,

but i want use all, not only a part.

bg

Michael

 

 

Ive installed this contribution and it appears to be working ok, but when I open my admin page and go to the SEO URLs section, this appears directly above my middle column :

"Warning: call_user_func(tep_reset_cache_data_seo_urls): First argument is expected to be a valid callback in /home/toptiara/public_html/admin/includes/functions/general.php on line 1195"

 

This line's code is : return call_user_function($function, $parameter);

 

Anyone have any ideas whats wrong please?

Thanks

Hand made jewellery and tiaras on our website

 

Please bear with me. Im an osC noobie!

Link to comment
Share on other sites

Found the solution to the problem regarding: amp;

 

This was posted by: lybrary

A big THX to him:)

Ok, after some more poking here is why this fails and how to correct it. I think this is a real bug. Comments appreciated. The function that causes the problem is function stock_href_link()

The last line is: return htmlspecialchars(utf8_encode($link));

Why is there a htmlspecialchars() function? This function turns every & into an &
I replaced it with:

return str_replace('"','"',str_replace('>','>',str_replace('<','<',utf8_encode($link))));

This does the same as htmlspecialchars except leaves the & unchanged, because these are the parameter separators.

It would be great to hear from the contribution author if my fix is ok or could cause other problems later on. Any other solution would be appreciated, too.

 

Hopes this helps all the others that have this problem!

 

Best Regards

Jan S

Edited by seiern
Link to comment
Share on other sites

@cpennington, heres my code, this is line 1890

 

Thank you Seiern for the clarification. I moved the code to the lines you clearly specified.

 

Perhaps my issue doesn't relate to the "&" sign at all. There is a line beneath each product description that reads something like; "For more information on this product view this webpage." Well the hyperlink attached to webpage works just fine when Ultimate SEO is turned off, but does NOT work when Ulimate SEO is turned on.

 

It's kind of puzzling to me. I think the contribution is great in every other respect.

 

Any thoughts to make this bad boy work as expected would certainly be appreciated.

Link to comment
Share on other sites

Perhaps my issue doesn't relate to the "&" sign at all. There is a line beneath each product description that reads something like; "For more information on this product view this webpage." Well the hyperlink attached to webpage works just fine when Ultimate SEO is turned off, but does NOT work when Ulimate SEO is turned on.

 

Hey - I figured it out and it appears to work! There is a setting in Configuration> Use Search-Engine Safe URLs (still in development); I changed the setting to false and the redirect for more information seems to work just fine now, and the URL's still look search engine friendly. I'll try spidering my site and see if it's working as expected.

Link to comment
Share on other sites

Thanks in Advanced for your Help!

 

I installed this contribution and it works great except for 1 small snag.

When I click the reviews button for 1 product it gives me the error 404 Not Found.

Every thing else works fine. This is the 1 product I wrote test reviews which were deleted prior to this installation.

 

 

 

ps - Thank you Chemo for this and all your Contributions where ever you are. I hope to see you here again soon!

Link to comment
Share on other sites

Hello! :)

I have just installed this great contribution... I think it works just fine... but I need your opinion... please, check My Webpage If you find any errors, warnings, blank pages or something like this, please let me know... I 've tested it and it works very well... so far...

 

Thank you for your time, patience and support!!

 

Thank you, Bobby for this great contribution!! :thumbsup:

 

Simone

Link to comment
Share on other sites

Hello! :)

I have just installed this great contribution... I think it works just fine... but I need your opinion... please, check My Webpage If you find any errors, warnings, blank pages or something like this, please let me know... I 've tested it and it works very well... so far...

 

Thank you for your time, patience and support!!

 

Thank you, Bobby for this great contribution!! :thumbsup:

 

Simone

On my site the ?osCsid=40f8500e441cdc0f46847b7011feeb79 goes away after I click on a category or product. Other than that It looks good!

Link to comment
Share on other sites

I use this sid killer:

http://www.oscommerce.com/community/contri...,all/search,SEO

 

Use this site to check sessions id:

 

http://www.webconfs.com/search-engine-spider-simulator.php

 

I rand this check before i added the script, then i rand it after i was finnish, you would se if you have done right if you do it that way.

 

Regards

Jan

Link to comment
Share on other sites

Hi,

 

I've installed and have been using the ultimate seo contribution for a while now but today I ran into a problem and was wondering if anyone can help.

 

Here is the situation:

 

A couple months ago I had a product that got indexed but I slightly changed the name or the product and now the url has changed but google still has the old file in its index. This is not a problem however google applies duplicate content penalties to urls that have the same content but different page names.

 

Here is an example:

I had a product named "product a" and the url became http://www.mysite.com/product-a-p-1.html and google indexed it this way. After the indexing I changed the name to "product b" which changed the url to http://www.mysite.com/product-b-p-1.html. The problem is both pages have identical content after a spider crawls both pages again and both pages still work but what I want to happen is http://www.mysite.com/product-a-p-1.html redirects permanently to http://www.mysite.com/product-b-p-1.html. The way it is configured right now both pages get indexed and remain in the index because they are considered 2 pages but with identical content. Please let me know if anyone has any suggestions on what can be done to correct this.

 

Thanks Jay

Link to comment
Share on other sites

Trouble with "ultimate SEO urls" and Kelkoo

 

Kelkoo:

http://www.oscommerce.com/community/contri...l/search,kelkoo

 

ultimate SEO urls:

http://www.oscommerce.com/community/contributions,2823

--------------------------------------------------------------------------------------

 

The output file shows links like this:

http://www.myshop/catalog/index.php?products_id=41

 

and it should look like this:

http://www.myshop.no/catalog/love-swing-p-41.html

 

The problem seems to accure sinse all kelkoo scripts are installed in the admin directory, how can i make ultimate seo urls work with the kelkoo contributions?

 

Any clues how to fix this problem?

 

 

 

Regards

Jan S

Link to comment
Share on other sites

Hopefully someone can shed some light on this for me.

 

I've been using rewrite's for quite some time now, so mod rewrite isn't the issue here.

 

When I install 2.1(a, b, c, d,... doesn't matter)

 

I get the following (see photo below). This is before I even get to my .htaccess; which I thought would fix it since it's the last step in the install though updating the .htaccess file doesn't correct the problem either.

 

Everytime I instll SEO URL's I get this

 

seoprob.gif

 

That's all I get.. solid text

 

 

Henry,

 

I was having the same problem over the last day after installing version 2.1d of the contribution.

 

I'm new to osCommerce and php so it took me a while to track down, but there are actually two potential fixes for this problem, that I can see anyway.

 

1) Modify the seo.class.php file in includes/classes so that the very first line of the file contains "<?php" instead of "<?".

 

2) Modify your php.ini so that short_open_tag = On

 

Hope this helps.

 

Ken

Link to comment
Share on other sites

Hi everyone. I newly installed osComm, then installed Header Tags. On my first try of SEO my admin panel vanished. I copied my backup over and tried again. Admin panel is back and as far as I know (I don't know much) I don't see any errors on the catalog index page. Only issue I'm having is that SEO Urls isn't showing up in my admin. I've double checked everything I could and I think I got it write. Only thing I'm not sure about is the .htacces file. At the moment my cart is in the catalog folder and can be found here: http://www.acmewheels.com/catalog/index.php

 

I've done pretty much nothing to the site so don't be suprised. I've pasted my .htacces below this:

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /catalog/

 

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

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

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

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

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

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

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

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

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

 

Any ideas? Thanks for the help.

Link to comment
Share on other sites

Hi

 

I have installed the Ultimate SEO URL's by Chemo ( v2.1c ) and all is working fine , if all contributions are this easy to install and follow great!

 

The URL is working just as it says on the box the only problem I have is when I click through to either product URL's or manufacturer's URL which are on external sites I cannot get through.

 

The message I get is as follows:

 

Sorry about this there is a problem with the page you requested.? http://www.ispyabargain.com/catalog/adidas...929874ece6c0c1? 213.162.106.45? /catalog/redirect.php/action/url/goto/www.adidas.com? www.ispyabargain.com? 404

 

I believe the problem is with the .htaccess file and I need to generate a Rewrite rule for this particular type of URL.

 

Does this seem right? Hopefully someone will be able to give me a push in the right direction. If so what do I need to focus on, presumably I need to work around something like

 

ReWriteRule? ^(.*)action/url/goto/(.*)? $2

 

I just need a pointer in the right direction.

 

Many Thanks

Link to comment
Share on other sites

Just like to say I fixed this. Turns out 3rd time is a charm for uninstall re-install. Thanks!

 

 

Hi everyone. I newly installed osComm, then installed Header Tags. On my first try of SEO my admin panel vanished. I copied my backup over and tried again. Admin panel is back and as far as I know (I don't know much) I don't see any errors on the catalog index page. Only issue I'm having is that SEO Urls isn't showing up in my admin. I've double checked everything I could and I think I got it write. Only thing I'm not sure about is the .htacces file. At the moment my cart is in the catalog folder and can be found here: http://www.acmewheels.com/catalog/index.php

 

I've done pretty much nothing to the site so don't be suprised. I've pasted my .htacces below this:

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /catalog/

 

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

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

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

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

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

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

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

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

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

 

Any ideas? Thanks for the help.

Link to comment
Share on other sites

I hope I'm posting this in the right place. I've tried twice to install the ultimate seo urls 2.1d contribution but can't seem to do it without error. I have all the requirements. I went through each step very carefully. When I load my site at www.mywebsite.com/shop - I get the following message on the page:

 

Fatal error: Call to undefined function: utf8_encode() in /htdocs/www/shop/includes/classes/seo.class.php on line 642

 

The error message links to:

http://www.mysite.com/shop/<br

 

It looks like a broken html tag...? A few issues I can think of that may be causing this:

 

1. I am using custom templates that I bought.

2. I have other contributions I'm using. This would be the 4th. I'm also using:

a. easy populate 2.79

b. image magic

c. header tags 2.5.6

*d. ultimate seo urls 2.1d

 

Can anyone help?

Link to comment
Share on other sites

Fatal error: Call to undefined function: utf8_encode() in /htdocs/www/shop/includes/classes/seo.class.php on line 642

...

Can anyone help?

In the cofiguration settings for SEO URLs there is an option called Output W3C valid URLs (parameter string)? which should be set to false. There is a small bug which was corrected on the improved (but not released) versions of Ultimate SEO URLs.

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