Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Hi, I am experiencing a weird bug. I am translating version 7.1 to Russian. Encoding is set to 'windows-1251' in generic.php file (this is a standard encoding for Russian language). The problem is with the following:

Language file: portal_islands.php
Key: ADVANCED_BUTTON
String: Аdvanced

When I translate the string into Russian (that is change it to Сложный ), the button stops working frown When it is pressed, it says "No search words!" while it is supposed to take you to the advanced search screen. In other words it acts like "Go" button. If I change the name of the button back to English, it works fine. But should I put a single Russian letter in the name of the button, it refuses to function properly.

Last edited by Rick; 04/02/2007 12:05 PM.
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Myself I'd try with UTF-8 as it'll be more compatible "out of the box" for future versions (not to mention, other users)

As for the error, did you just translate the button text, or the value text as well? (I'm not sure if the value text for the search items is included in the language strings)


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Vast majority of the Russian language sites use 'windows-1251' encoding. It is standard. Changing it to unicode is likely to cause problems for the users. Currently I use Ubbthreads 6.5.2 and it works perfectly in Russian with 'windows-1251' encoding.

Quote
As for the error, did you just translate the button text, or the value text as well? (I'm not sure if the value text for the search items is included in the language strings)

I used built-in language editor, which is the 'official' way to translate the board and this is how I translated version 6.5.2. It allows you to change the string. I replaced 'Advanced' with 'Сложный' - this is exactly what I did.

Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Here are specific steps for recreating the problem in ubbthreads 7.1:

1)Start with default English language. Search island should be enabled in left or right column.
2)With language editor go to generic.php file and change encoding to 'windows-1251'
3)With language editor go to file portal_islands.php, find ADVANCED_BUTTON key, and change string 'Advanced' to any other string containing Russian letters, for example to Сложный. Without Russian keyboard layout one can use copy and paste to enter new string.
4)Try to use Advanced button in search island. For me it started malfunctioning after steps 1,2, and 3.

Step 2 may be omitted with the same result.

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I tested this at my site, set advanced to:
Сложный

and it works fine, I'm using the character set UTF-8.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Did you test it with other encodings?

I repeated steps 1 to 4 with the exception that I changed encoding to utf-8 in step 2 and still got the same error.

Besides, the whole database became unreadable after changing the encoding to utf-8.

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I only use UTF-8 as it encompasses several languages (including an extended ASCII characterset)

The only thing I changed was the language string, with the ascii codes you supplied and it allowed me to use the advanced search without any problems.
Code
Сложный


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Gizmo, as far as I understood you, you recommended to use UTF-8 encoding. I followed this recommendation and it didn't solve the problem. The bug is still there. I don't know, maybe it has to do with PHP version. In fact, it created even more problems because the database that I have is in windows-1251 encoding and it is not readable under UTF-8 encoding. Not to mention that users are expecting standard windows-1251 encoding.

Originally Posted by Gizmo
Code
Сложный

Yes, that's what I used to post Russian characters on this board. I also tried to enter the string in question like this code in language editor. The other way to enter the string was just to type the string in using Russian keybord layout. Neither way solved the problem.

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Well, what I was saying is that I can get it running without issues using the ascii text provided in the quote; I believe the issue is something other than the UBB being bonkers in this case as it works fine for me on 2 separate servers in which I have access to.

I'm hoping that Rick can mozy on by and provide some insight when he has a moment.

All that I did to test this was enter the language editor, use the "Search for String" option on the second tab, searched for "advanced", and edited the string (ADVANCED_BUTTON in portal_islands.php) and droped in the ascii text bove, then submitted the page.

After this I visited my forums and saw the Russian characters replacing "advanced", I then typed in a string to search for (on my forums at UGN I did "playstation") and clicked advanced, the search completed and data showed as expected.

I'd like to encourage others to do this quick update to see if they get a "working" or "Dead in the Water" result to see if it's a ubb issue or server issue.

The only real change that I have on my forums vs what any other UBB would have is that I'm running UTF-8, so I'd like to see if it's a characterset issue or a script issue, or even a server related issue.

I left this change on my home test forum if you'd like to try it out, I'm using the standard character set that the UBB ships with there (iso-8859-1).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Originally Posted by Gizmo
After this I visited my forums and saw the Russian characters replacing "advanced", I then typed in a string to search for (on my forums at UGN I did "playstation") and clicked advanced, the search completed and data showed as expected.
I can do it too. That is not the problem. The problem is when you leave the search field blank and press the 'advanced' button. This action is supposed to take you to the advanced search screen, like it does for this forum. After replacing the string in question with Russian characters, the 'Advanced' button gives you an error instead of taking you to the advanced search screen with search field left blank.

Basically 'Advanced' button starts to act like 'Go' button for some mysterious reason.

Thanks.

P.S. I just realized that you did recreate the bug. The thing is that when you click the 'Advanced' button, no search should be performed. Clicking this button is supposed to take you to the search screen. The fact that clicking the button did the search for you shows that it started to act like 'Go' button, which is not right and that is what I am talking about.

Last edited by Roman2007; 03/28/2007 9:25 AM.
Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Originally Posted by Gizmo
I left this change on my home test forum if you'd like to try it out, I'm using the standard character set that the UBB ships with there (iso-8859-1).

I registered an account in your test forum (without registering the search island is not seen). The problem is reproducing perfectly on the test forum.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
I think this ends up being some type of comparison problem when it checks what button is being pushed. I'll need to look at this and see what needs to be done.

Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
Originally Posted by Rick
I think this ends up being some type of comparison problem when it checks what button is being pushed. I'll need to look at this and see what needs to be done.

Thanks, Rick!

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Ahh, I was completely misunderstanding then lol, I thought it wasn't working period, didn't figure leaving it blank and clicking...



I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Try this and see if it works for you. Line 49 of scripts/dosearch.inc.php looks like this:

"textsearch" => array("textsearch","post","alpha"),

Change that, to this:

"textsearch" => array("textsearch","post",""),

I think the process to make sure it only contains alphanumeric characters is breaking it.

Joined: Jan 2007
Posts: 22
R
newbie
newbie
R Offline
Joined: Jan 2007
Posts: 22
That worked.
Thanks again!

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Go figure it's something like that... I'm curious if this could be related to the "non standard characters pm issue" that I have (that changing my forum to UTF-8 fixed) perhaps?


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Gizmo), 343 guests, and 134 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)