Latest News: (loading..)
spidometrs

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

7,326 posts in this topic

ok, I understand the reset option, but the uninstall option gives the error as previously quoted, even though the configuration values are removed from the database. why I don't know?

What is the purpose of the uninstall option, as when the shop is reloaded the addon is installed again?

Uninstall therefore includes two steps, 1) use the uninstall to remove DB values 2) remove the code from the site.  I assume my assumption is correct?

As the code seems to work ok (and yes, this is a brilliant addon) I'll just use it on my live shop and forget about the uninstall option, as I probably won't be using it.

Regards

Mike

Share this post


Link to post
Share on other sites

The uninstall only removes the database changes for this addon. The files are not touched. When you use the uninstall option. there will still be an entry in admin->Configuration for SEO  URL's until you refresh the page since the uninstall doesn't force a reset of admin. On the shop side, the database changes are only made if something has changed, not including cache. It is possible for parts of databases to become corrupt. So if you suspect that, using the uninstall option will remove everything so you can try again.

 

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks for that great contribution!

I have a little issue in working with BS 2.3.4 edge.

Looks like option "Enter special character conversions" doesn't work with polish letters.
I've tested and it works well on 2.2MS, but in this old revision file admin/includes/languages/polish.php specifies charset as iso-8859-2. If I set it to UTF-8 (as it is on BS 2.3.4) it stops to convert characters too.

I'm trying to set BS admin's language file into iso-8859-2, but then I can't even save my characters to convert (it saves as clear).

I've tried also to use unicodes instead of polish signs directly. For example U+017C=>z or c5 bc=>z or ż=>z instead of just ż=>z, but it didn't work.

Can you help me with that? :( It's important for me to get it work because i'm moving from old osC where it has worked and I want to keep old links as they were before.

Edited by jampjamp

Share this post


Link to post
Share on other sites

I just tried it in a new BS shop and it worked as expected. The shop only has English installed but that uses UTF for the charset so it shouldn't make a difference. The only thing I can think it may be is the php version your shop is running. The test site here is using 5.6.

jampjamp likes this

Share this post


Link to post
Share on other sites

@jampjamp,

Do you have these problems with old polnish language files and your old imported/converted 2.2MS database??

 

If yes:

1. convert all your old language files to utf-8 encoding. How to do it depends on your text editor.

2. Convert all your database (product and category tables are important) to utf-8 encoding. This can be easy done in Admin-Tools-Database Tables

Hope this helps

rgds

Rainer

jampjamp likes this

Share this post


Link to post
Share on other sites

Thanks for your answers!

16 hours ago, Jack_mcs said:

I just tried it in a new BS shop and it worked as expected. The shop only has English installed but that uses UTF for the charset so it shouldn't make a difference. The only thing I can think it may be is the php version your shop is running. The test site here is using 5.6.

 

@Jack_mcs Yes, this option works, just it doesn't with polish letters (except ó=>o which works well).

12 hours ago, raiwa said:

@jampjamp,

Do you have these problems with old polnish language files and your old imported/converted 2.2MS database??

 

If yes:

1. convert all your old language files to utf-8 encoding. How to do it depends on your text editor.

2. Convert all your database (product and category tables are important) to utf-8 encoding. This can be easy done in Admin-Tools-Database Tables

Hope this helps

rgds

Rainer

@raiwa No, old polish language files doesn't work correctly with bootstrap edition. My /polish/ is actually a copy of english language with some changes (not fully done, only part of front-end), so charset is set to be as default utf-8 (in includes/languages/polish.php and in admin/.. too).

Imported 2.2MS database tables were already converted to utf8_unicode_ci.

Do you have any other suggestions, please?

Share this post


Link to post
Share on other sites
4 minutes ago, jampjamp said:

 

@raiwa No, old polish language files doesn't work correctly with bootstrap edition. My /polish/ is actually a copy of english language with some changes (not fully done, only part of front-end), so charset is set to be as default utf-8 (in includes/languages/polish.php and in admin/.. too).

Imported 2.2MS database tables were already converted to utf8_unicode_ci.

Do you have any other suggestions, please?

 

The setting:

// charset for web pages and emails
define('CHARSET', 'utf-8');

just tells the browser to render or decode your texts as utf-8. Another thing is that your texts (language files) are correct utf-8 encoded.

The old polnish language files are for sure encoded in old ISO-xxxxx, not utf-8.

You need first to make sure that your text editor uses utf-8, ( or by default or by changing the configuration setting) and then find a way to change the encoding, preserving that the special characters still show correct. To give more specific advice you need to tell us which text editor you are using.

 

Another subject is the database encoding and the correct rendering of the category and product names in the SEO URLs which are extracted from the database, not from the language files.

If you have converted the database tables to utf-8 encoding, check in PHP My Admin if the Category and Product names show correct the special characters in the correspondent tables.

Sometimes if you did some conversions in your old 2.2MS database to use utf-8 encoding in your shop, the encoding may get corrupted.

You must see in PHP my Admin all texts with special characters correct showing up.

rgds

Rainer

jampjamp likes this

Share this post


Link to post
Share on other sites

Thanks for your interesting of my problem!

I'm not sure if I understood you right, but I'm not using old polish language files. They are not working good with bootstrap edition.

At first I was just using original english language with some changes like european date showing, but i didn't change anything like charset, because everything has been shown as it should.

As earlier I supposed that non-standard character conversion doesn't work with polish letters on english language, I've duplicated it with few changes to being recognised by oscommerce as polish, but it didn't help.

I'm using notepad++ and it shows that my lng files are coded in UTF-8 (without BOM).

Also, in PHPMyAdmin every letter is shown as it should be.

Please, look at my screen. Those are all polish letters. I've changed products_name directly in the database. As you can see, only ó=>o is working well. http://i.imgur.com/A16VoRH.jpg

Share this post


Link to post
Share on other sites
48 minutes ago, jampjamp said:

As earlier I supposed that non-standard character conversion doesn't work with polish letters on english language, I've duplicated it with few changes to being recognised by oscommerce as polish, but it didn't help.

Sorry, I do not understand what exact you wants to say here.

Otherwise, as far as I understand, all seems correct with your store and I can't see a reason that the SEO URL character conversion shouldn't work.

 

Maybe it would be helpful to have a look on your store if it's public available. If you do not wish to public it here, you can send me a private message.

 

rgds

Rainer

jampjamp likes this

Share this post


Link to post
Share on other sites

@raiwa What I wanted to say there was that I thought the reason of problem could happen because i'm doing this at original english language, so SEO URLs addon doesn't handle another letters than eng standard. So I made polish language folder (based on english) to be used by osCommerce. Of course it didn't work.

My shop is not yet available by public, i'm testing it at localhost.
If you have any other idea what should I check, I'm determined to test it :)

@Jack_mcs Please, have a look-see at my screenshots too, maybe you would have any idea why could it happen: http://i.imgur.com/A16VoRH.jpg

Share this post


Link to post
Share on other sites

Posted (edited)

8 minutes ago, jampjamp said:

@raiwa What I wanted to say there was that I thought the reason of problem could happen because i'm doing this at original english language, so SEO URLs addon doesn't handle another letters than eng standard. So I made polish language folder (based on english) to be used by osCommerce. Of course it didn't work.

all language support in 2.3.4 BS is utf-8 based and all languages including english (files and database) should support all special characters.

8 minutes ago, jampjamp said:

My shop is not yet available by public, i'm testing it at localhost.

Date localization has known issues (doesn't work) on local test installations under windows, but the SEO URL stuff should work.

There must be something wrong in the setup, but without having a look on your store it is difficult to give further advice.

Maybe @Jack_mcshas an idea.

Edited by raiwa
jampjamp likes this

Share this post


Link to post
Share on other sites

Posted (edited)

@jampjamp,

 

just to be sure: did you reset the SEO URL cache after adding the special characters to the configuration list

Edited by raiwa
jampjamp likes this

Share this post


Link to post
Share on other sites

Yes, I'm resetting this all the time when i'm testing anything. Any other option to check?

Share this post


Link to post
Share on other sites

@jampjamp,

As stated, without a look on your store, I have no more ideas what to check. Maybe it would be helpful to post a screenshot of an example product with special characters in the name and the produced URL.

jampjamp likes this

Share this post


Link to post
Share on other sites
1 hour ago, jampjamp said:

@Jack_mcs Please, have a look-see at my screenshots too, maybe you would have any idea why could it happen: http://i.imgur.com/A16VoRH.jpg

I don't understand what your image is showing. I see the characters in the setting and they look to be correct but what is the list of characters below it? And, just to be clear, the rewrite is for the url, not text on the page.

I don't know if it was mentioned anywhere in this thread but if you have the English language installed, does the rewrite work with it?

jampjamp likes this

Share this post


Link to post
Share on other sites

Posted (edited)

@Jack_mcs the list of characters below is a name of product compound only with typical Polish letters. 

In the bottom you can see a link generated by SEO URLs. It avoids most of Polish letters, except ó=>o. Do you have any idea why? 

 

/// conversion works as it should if I would put character like e=>u then in link I will have 'u'  instead of 'e'. The problem affects only specific Polish letters shown above 

Edited by jampjamp

Share this post


Link to post
Share on other sites

I'm still not clear on the distinctions you are making but I don't have any answers for you. I suggest you install a blank shop, install the addon and see if it works for English. If it fails right from the start with English, then something on the server is causing the problem. Otherwise, install the Polish language and try it. If it works, then convert your database and see if that works. Somewhere along the way you should be able to discover the problem.

Share this post


Link to post
Share on other sites
On 13.6.2017 at 8:04 PM, jampjamp said:

Thanks for that great contribution!

I have a little issue in working with BS 2.3.4 edge.

Looks like option "Enter special character conversions" doesn't work with polish letters.
I've tested and it works well on 2.2MS, but in this old revision file admin/includes/languages/polish.php specifies charset as iso-8859-2. If I set it to UTF-8 (as it is on BS 2.3.4) it stops to convert characters too.

I'm trying to set BS admin's language file into iso-8859-2, but then I can't even save my characters to convert (it saves as clear).

I've tried also to use unicodes instead of polish signs directly. For example U+017C=>z or c5 bc=>z or ż=>z instead of just ż=>z, but it didn't work.

Can you help me with that? :( It's important for me to get it work because i'm moving from old osC where it has worked and I want to keep old links as they were before.

Recommand read this:

 

Share this post


Link to post
Share on other sites

Posted (edited)

@mcmannehan,

ULTIMATE SEO URLS5 is a different SEO URL add-on and character conversion pairs can be defined there in the external file you mention.

This possibility is not implemented in the version of thread: Ultimate SEO URLs v2.1 - by Chemo

 

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwa

Thanks for the info. I didn't saw that this is a different add-on. Sometimes can't see the trees, about the forest:cool:

Share this post


Link to post
Share on other sites

 

On 15.06.2017 at 3:33 AM, Jack_mcs said:

I'm still not clear on the distinctions you are making but I don't have any answers for you. I suggest you install a blank shop, install the addon and see if it works for English. If it fails right from the start with English, then something on the server is causing the problem. Otherwise, install the Polish language and try it. If it works, then convert your database and see if that works. Somewhere along the way you should be able to discover the problem.

@Jack_mcs I've tried to install the addon on blank shop, but it didn't work. I've also tried to use another localhost server.

However, I installed addon mentioned by @mcmannehan and it looks like everything is as it should be. I didn't even use "file based character conversions" (as it's recommended in admin panel too) - works correctly without it.

So thank you guys, and Jack - please look at it in your addon.

Share this post


Link to post
Share on other sites

I tried it as you typed it and it failed for me too. But then I changed the name to use lower case and it worked:

nirosoft-explorer-p-818.html

It missed the middle word but I suspect it is also a case issue. Is there a case for €?

Share this post


Link to post
Share on other sites

Posted (edited)

@Jack_mcs, @jampjamp,

Here the fix:

In: includes/classes/seo_class.php:

line 77 change:

        function ConnectDB(){
			    $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db);
	    if (!$this->link_id) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
		    . mysqli_connect_error());
}
        } # end function

to:

        function ConnectDB(){
			    $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db);
			    mysqli_set_charset($this->link_id, 'utf8');
	    if (!$this->link_id) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
		    . mysqli_connect_error());
}
        } # end function

line 1859 remove this:

                if (CHARSET == 'utf-8') {
                   $string =  iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);
                }

 

Example product title: Ñiçrosoft €βČčûæĂŠŤ Explorer

Result URL:nicrosoft-essccuaeast-explorer-p-26.html

replacement pairs: Ñ=>n,Ç=>c,ñ=>n,ç=>c,€=>e,β=>ss,Č=>c,č=>c,û=>u,æ=>ae,Ă=>a,Š=>s,Ť=>t

 

This will only work for OsCommerce versions since 2.3.3.4, full utf-8 support.

 

This may work for all versions (using sqli):

        function ConnectDB(){
			    $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db);
          if (CHARSET == 'utf-8') mysqli_set_charset($this->link_id, 'utf8');
	    if (!$this->link_id) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
		    . mysqli_connect_error());
}
        } # end function
                if (CHARSET != 'utf-8') {
                   $string =  iconv(CHARSET, "UTF-8//TRANSLIT", $string);
                }

rgds

Rainer

Edited by raiwa
jampjamp likes this

Share this post


Link to post
Share on other sites

whats the pros and cons of this addon vs the Ultimate SEO Urls for bootstrap version of oscommerce?

 

Share this post


Link to post
Share on other sites

I'm not familiar enough with SEO 5, which I assume is what you mean, so I can't say much about it. Raiwa Is probably better to answer in detail. But as long as you run SEO 5 in rewrite mode there's not a big difference, in my opinion. Running it in other modes is a mistake, as far as I'm concerned. This addon has problems on sites with very large number of products or categories if the caching option is used. SEO 5 will crash if cache gets too large. Or it used to - maybe that has been fixed. I think the code in this one is cleaner and less of a problem overall. If you turn this one off, it is totally turned off. But if you turn off SEO 5, it is only partially turned off.  

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