Jump to content
spidometrs

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

Recommended Posts

Hi Jack,

 

I have just installed v2-2.2d-4 and once installed, got a blank page.

 

I have played around to see if there are any mistakes I have made in the intallation, bit in application_top and html_output, it doesn't seem to like

$seo_urls = new SEO_URL($languages_id);

but if I replace it with

$seo_urls = $languages_id;

it works fine.

 

With that changed, I then have a problem with the tep_href_link function.

If I comment out

return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

then there are no errors and the page loads, but once uncommented, the page is blank again.

 

Is this because I have changed the code for $seo_urls earlier in the function.

 

Thanks in advance for your help!

Share this post


Link to post
Share on other sites
I have just installed v2-2.2d-4 and once installed, got a blank page.

 

 

Is this because I have changed the code for $seo_urls earlier in the function.

If you have installed some other version, you must removed any changes that version made that mine does not. If that is done, then there is some other mistake in the installation and you will need to review the instructions.

 

Jack

Share this post


Link to post
Share on other sites
If you have installed some other version, you must removed any changes that version made that mine does not. If that is done, then there is some other mistake in the installation and you will need to review the instructions.

 

Jack

 

 

No other SEO installation has been made.

The only other mod is STS.

Share this post


Link to post
Share on other sites
No other SEO installation has been made.

The only other mod is STS.

If you install the contribution and goto the home page and a whilte page appears, then you've made a mistake in the installation since no redirection is being done at that point.

 

Jack

Share this post


Link to post
Share on other sites

I guess that will be the problem ofsettingup .htaccess file after my many many checking. When I open my product page, the page turns to be 404 error. Jack, Can you show me a correct .htaccess setting? If you can show me an example of .htaccess, that will be very nice. Thanks very much.

 

For your referce,I will show you my .htaccess files in the next coming minutes.

 

This problem had confused me, and I really need your help.

Share this post


Link to post
Share on other sites

Hi,

 

First of all, I'm not a PHP expert, but I do know enough things to install contributions, solve a few problems and customize OSC to my needs.

 

A couple of days ago I came across this annoying error. It happens when I add to cart a product from the store which has product options. The error is absent on option-less products and generally it does not appear but only in this situation.

 

I have an online bookstore, modded, register_globals are off and server runs PHP5 as cgi (also referred to as PHP_SuExec). Only recently I needed to add options to some of the books and encountered this error. I suspect its due to something related to the Ultimate SEO URLs html rewriting.

 

Specifically: when I add a product to cart and the product has price options (ex. +$10 if hardcover), I get this:

 

Warning: preg_match() expects parameter 2 to be string, array given in /home/***/public_html/includes/functions/sessions.php on line 75

 

Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/includes/functions/sessions.php:75) in /home/***/public_html/includes/functions/general.php on line 30

 

 

First thing one would do is to check the sessions.php file, which I did. It reads:

 

63 function tep_session_start() {

64 global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;

65

66 $sane_session_id = true;

67

68 if (isset($HTTP_GET_VARS[tep_session_name()])) {

69 if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) {

70 unset($HTTP_GET_VARS[tep_session_name()]);

71

72 $sane_session_id = false;

73 }

74 } elseif (isset($HTTP_POST_VARS[tep_session_name()])) {

75 if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_POST_VARS[tep_session_name()]) == false) {

76 unset($HTTP_POST_VARS[tep_session_name()]);

77

78 $sane_session_id = false;

79 }

80 } elseif (isset($HTTP_COOKIE_VARS[tep_session_name()])) {

81 if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_COOKIE_VARS[tep_session_name()]) == false) {

82 $session_data = session_get_cookie_params();

83

84 setcookie(tep_session_name(), '', time()-42000, $session_data['path'], $session_data['domain']);

85

86 $sane_session_id = false;

87 }

88 }

89

90 if ($sane_session_id == false) {

91 tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));

92 }

93

94 return session_start();

95 }

 

 

I'm at witts' end, for the past few days I searched high and lo, on OSC forum and other places, thought and tried different approaches, but to no avail. I just cannot pinpoint exactly where the problem is, let alone solve it.

 

Someone advised me to ask here, as this might be related to the SEO URLs contrib.

 

Here's two example links:

 

Product without options, works great: http://www.ideeaeuropeana.ro/sculptorul-p-1.html

 

Product with options, displays error: http://www.ideeaeuropeana.ro/noaptea-strainului-p-8.html

 

 

This could be an older problem which I never came across since I never needed product options before. But the store is not that heavily modded.

 

Option values are passed in the URL as a string, but that's decoded and turned into an array. I never changed anything about options, as I never used them before.

 

The situation I have only appears on one occasion: where a product has options (example: +$3 option). Adding that product to cart generates the error.

 

If I comment out the lines in sessions.php, the error disappears, product can be added to cart with no problems, cart is displayed as it should, but I get a 'blank' session called "Array" in the database and cart is no longer unique session-based. It creates a session called "Array", accessible by anyone browsing the shop. For some reason, instead of putting a correct sesskey, something like "09bf230aba9a108b3a93ea77d0baeca3", it always adds to a sesskey called "Array".

 

There's one huge elephant somewhere, I just can't see where it is.

 

If there's anyone who has any idea why this is happening, or someone who encountered this thing before, please, your help is much appreciated.

 

Thanks!

Share this post


Link to post
Share on other sites

Hi Jack, I still need your help for my installation of Ultimate URL SEO. It still can not work. Below I will quoted my .htaccess file for your reference.

Options +FollowSymLinks

RewriteEngine On

RewriteBase /store/

 

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_ST RING}

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

 

Please kinldy help me what is wrong with my .htaccess file so that I can handle it.

Share this post


Link to post
Share on other sites

As stated several times in this thread, the contribution works on the url using the .htaccess file. Listing one without the other is useless in most cases.

 

Jack

Share this post


Link to post
Share on other sites
Please kinldy help me what is wrong with my .htaccess file so that I can handle it.

 

Hello vincent, just double check the location of the store and you can also see below my own .htaccess, it's slightly different than yours though.

 

Options -Indexes

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-([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}

 

Good luck!

 

 

On another hand, does anyone have any idea about my issue (see my post above)?

Edited by Inferos

Share this post


Link to post
Share on other sites

I just rechecked and apparently my issue in not related to the Ultimate SEO URLs.

 

However, one small bug still remains: products with options do not have SEO URLs when you click on them from the shopping cart. Not that it would matter, since a shopping cart is a user-based page, and it does not affect your Google SERPs.

Share this post


Link to post
Share on other sites

Hello,

 

i have installed the newest Version 2-2.2d-4.

I have problems with Google.

 

Google scan some Products and make this URL: http://www.mysite.de/onlineshop/catalog/ab...-c-55_0_21.html

This is a Categorie. When i click the Google Link, i become a Site with spaces in the Categorie-Box.

 

The right Link is: http://www.mysite.de/onlineshop/catalog/ab...eumer-c-21.html

 

Some Sites are found by Google with: http://www.mysite.de/onlineshop/catalog/-c-55_0_55.html

This Link display all Categories in the Mainpage and spaces in the Categorie-Box too :-(

 

Please HELP me :-(

 

Andreas from Germany

Share this post


Link to post
Share on other sites

Hello,

 

i have installed the newest Version 2-2.2d-4.

I have problems with Google.

 

Google scan some Products and make this URL: www.mysite.de/onlineshop/catalog/abschaumer-c-55_0_21.html

This is a Categorie. When i click the Google Link, i become a Site with spaces in the Categorie-Box.

 

The right Link is: www.mysite.de/onlineshop/catalog/abschaumer-c-21.html

 

Some Sites are found by Google with: www.mysite.de/onlineshop/catalog/-c-55_0_55.html

This Link display all Categories in the Mainpage and spaces in the Categorie-Box too :-(

 

Please HELP me :-(

 

Andreas from Germany

Edited by kn-medien

Share this post


Link to post
Share on other sites
I just rechecked and apparently my issue in not related to the Ultimate SEO URLs.

 

However, one small bug still remains: products with options do not have SEO URLs when you click on them from the shopping cart. Not that it would matter, since a shopping cart is a user-based page, and it does not affect your Google SERPs.

 

Eugen your problem may relate to a newer version of PHP that is running on your host. Recent versions of PHP are intolerant of dodgy function calls with empty/wrong type parameters. You need to put a test around the second parm of that call and put "" ie. a blank string in there if it was null, or returning something other than a PHP string. Do this just before line 75. The second error message will go away when you sort out the first problem.

 

Unfortunately, you may start seeing quite a few of these messages if your PHP version has changed as OSC is full of untested empty parm calls. If this is all gobbledygook to you, learn some basic programming/coding as it will hold you in good stead (from your question, I'd say your knowledge of PHP is at the level of 'I can edit a file' - that's the elephant in the room lol).

 

Re the options - this is not a bug. Options are not part of the SEO address because they are unknown when the product is being clicked from a category list.

 

Pete

Edited by p2409

OSC User Definitions

"I can add modules to OSC" = I can search, cut and paste. But not well, or I wouldn't be here.

"I start my posting with 'works like a charm' = I'm letting you down gently, nothing works and I have no idea why

"I finish postings with "plzzzz....hlp" = My installation is buggered and I know I'm going to have to pay someone, but I really, really don't want to.

Share this post


Link to post
Share on other sites
Hello,

 

i have installed the newest Version 2-2.2d-4.

I have problems with Google.

 

Google scan some Products and make this URL: www.mysite.de/onlineshop/catalog/abschaumer-c-55_0_21.html

This is a Categorie. When i click the Google Link, i become a Site with spaces in the Categorie-Box.

 

The right Link is: www.mysite.de/onlineshop/catalog/abschaumer-c-21.html

 

Some Sites are found by Google with: www.mysite.de/onlineshop/catalog/-c-55_0_55.html

This Link display all Categories in the Mainpage and spaces in the Categorie-Box too :-(

 

Please HELP me :-(

 

Andreas from Germany

Have you changed your categories around since google indexed them? If abschaumer-c-55 is invalid and it is now abschaumer-c-21 you're out of luck until google re-indexes (you can submit a site map to try to get this happening faster).


OSC User Definitions

"I can add modules to OSC" = I can search, cut and paste. But not well, or I wouldn't be here.

"I start my posting with 'works like a charm' = I'm letting you down gently, nothing works and I have no idea why

"I finish postings with "plzzzz....hlp" = My installation is buggered and I know I'm going to have to pay someone, but I really, really don't want to.

Share this post


Link to post
Share on other sites
I guess that will be the problem ofsettingup .htaccess file after my many many checking. When I open my product page, the page turns to be 404 error. Jack, Can you show me a correct .htaccess setting? If you can show me an example of .htaccess, that will be very nice. Thanks very much.

 

For your referce,I will show you my .htaccess files in the next coming minutes.

 

This problem had confused me, and I really need your help.

 

Confirm you actually have mod_rewrite active. If you're .htaccess file is OK, and you made the code mods correctly, this is something to check.


OSC User Definitions

"I can add modules to OSC" = I can search, cut and paste. But not well, or I wouldn't be here.

"I start my posting with 'works like a charm' = I'm letting you down gently, nothing works and I have no idea why

"I finish postings with "plzzzz....hlp" = My installation is buggered and I know I'm going to have to pay someone, but I really, really don't want to.

Share this post


Link to post
Share on other sites

Hello Pete,

 

no, i never change the Categories.

 

This... www.mysite.de/onlineshop/catalog/-c-55_0_55.html is not a Website, but Google scans it and if i click the Link, i come to my Site with all Categories (NAMES) with Categories Gifs in the Frontpage and new Items under it.

 

www.mysite.de/onlineshop/catalog/abschaumer-c-55_0_21.html is not correct. The -c-55_0_ is not right.

 

MfG

Andreas

Share this post


Link to post
Share on other sites

Hello every one

 

I am having a problem

after installing this pacakge iand properly doing all somthing i missed out and now i am unable to find it, and repair it

so could any suggestion help me out

 

 

Fatal error: Class 'productListingOSCBox' not found in /home/demo/includes/modules/product_listing.php on line 404

 

And also the products are being going here and there .

 

Please Help me

Thanks

Edited by gcreation

Share this post


Link to post
Share on other sites
I am having a problem

after installing this pacakge iand properly doing all somthing i missed out and now i am unable to find it, and repair it

so could any suggestion help me out

That error doesn't have anything to do wtih this contribution. You need to ask in the support thread for whatever contribution added that code to your shop.

 

Jack

Share this post


Link to post
Share on other sites

deleted. wrong post to answer to.

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

seem this board going out of control? why i got two posts?

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Hi,

 

I installed Ultimate SEO by following the intructions.

Unfortunately its not working like it should be. After the installation the links are all messed up.

 

The catalog folder (/n/) is being replaced by 'dir_ws_admin'?

 

So this is the link i get when installing SEO:

http://www.vizeo-design.nldir_ws_adminproduct_info.php/?cPath=24&products_id=146

 

This is how it should be:

http://www.vizeo-design.nl/n/product_info....products_id=146

 

Can somebody please tell me what i am doing wrong?

Thanks in advance!

 

Sjost.

Share this post


Link to post
Share on other sites
So this is the link i get when installing SEO:

http://www.vizeo-design.nldir_ws_adminproduct_info.php/?cPath=24&products_id=146

 

This is how it should be:

http://www.vizeo-design.nl/n/product_info....products_id=146

 

Can somebody please tell me what i am doing wrong?

You've got a problem with your configure file, I think, since this contribution doesn't even mention dir_ws_admin (assuming you are using one of my versions - I don't know about the others).

 

Jack

Share this post


Link to post
Share on other sites
You've got a problem with your configure file, I think, since this contribution doesn't even mention dir_ws_admin (assuming you are using one of my versions - I don't know about the others).

 

Jack

 

 

Hi Jack,

 

Thanks for your reply!

It thought the same, i searched for DIR_WS_ADMIN in all the files i edited, and uploaded, for the installation, but couldn't find it.

Like you said, the DIR_WS_ADMIN is in the config file, but with the same config files and SEO not installed it works fine.

 

DIR_WS_ADMIN is located in the admin config, thats why i think its strange that its now in the links on the front-end on the webshop.

Below the line in the admin config where DIR_WS_ADMIN is specified:

 

define('DIR_WS_ADMIN', '/n/admin/');

 

I installed Ultimate SEO 2-2.2d-4

 

Thanks for your help!

Share this post


Link to post
Share on other sites
Hi Jack,

It thought the same, i searched for DIR_WS_ADMIN in all the files i edited, and uploaded, for the installation, but couldn't find it.

Like you said, the DIR_WS_ADMIN is in the config file, but with the same config files and SEO not installed it works fine.

This is the support thread for Ultimate SEO and that isn't a problem with Ultimate SEO so you will need to post in the general forums for help. You may also want to look here.

 

Jack

Edited by Jack_mcs

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

×