Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Username special characters (Icelandic) in bridge to phpbb3 disappear  (Read 14952 times)

0 Members and 1 Guest are viewing this topic.

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64

This might be a bug or something in phpbb3 bridge

Icelandic special characters are okay in CPG.  User created in CPG as "Árni"  shows up as "Árni"  Works even in test gallery without Icelandic.

After bridging to phpbb3 the icelandic characters are still okay except in usernames.

I can create a user in phpbb3 with special characters but when I go over to CPG they disappear.  Show [�rni] |    Should be [Árni]

It feels like that when CPG is getting the username from phpbb3 user table it does not understand Icelandic characters

This letter "Á" comes after A and before B in our alphabet.  Photos made for user Árni before bridging are transferred to owner BirgirAri after bridging.

I can make an album for �rni and it shows up.  But an album made for " Árni " before bridging goes to another user.

Same behaviour in test gallery.

Hope this makes some sense and gives some ideas where to look for the problem.

Coppermine install: http://siglingar.net/cpg/
Bridging app install: http://siglingar.net/
Coppermine version: cpg1.5.8
Bridging app version: Phpbb3  for CPG 1.5.9

BridgeManager settings:
Bridge app URL:  http://siglingar.net      
Relative path to your bridge app's config file:  ../
Cookie name or prefix:  phpbb3_p32g5

Test user account: Árni / testing  

Clean install test gallery: No theme and no Icelandic

Coppermine install: http://siglingar.net/cpg15x/
Bridging app install: http://siglingar.net
Coppermine version: cpg1.5.7
Bridging app version: Phpbb3 for CPG 1.5.7

Test user account: Árni / testing

Thanks in advance, Jon

                  
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #1 on: August 23, 2010, 12:02:38 pm »

Wonder if there is no solution to this or if I should be looking for a solution somewhere else?
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #2 on: August 24, 2010, 12:35:05 am »

Well, this might have nothing to do with the bridge to phpbb3.

See this user profile viewing.

http://siglingar.net/cpg/profile.php?uid=112

There was a similar problem with albummgr.php that has already been fixed.

Best regards,  Jon
Logged

grzesio

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #3 on: August 26, 2010, 08:47:03 pm »

I have same problem with polish chars.

Proper user name: Ludmiła
Is shown as: Ludmi?a

Here is link to user profile: http://www.silesianfoto.pl/galeria/profile.php?uid=62

I'm using Coppermine 1.5.8 bridged with PhpBB 3.0.7-PL1.

Any ideas? I haven't found any information about simmilar problem with albummgr.php on forum
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #4 on: August 26, 2010, 09:56:37 pm »

I would not be surprised that this is a problem with all languages that use special characters and when bridging.

It is only when it is bridged.  And in all browsers.

Here is the thread about the problem with the albmgr.php http://forum.coppermine-gallery.net/index.php/topic,65094.msg323276.html#msg323276

That problem was was fixed quickly.

Hope there will be a solution soon.

Best regards,  Jon
Logged

Nibbler

  • Guest
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #5 on: August 26, 2010, 10:28:24 pm »

Please see if this code change makes any difference.

Edit bridge/phpbb3.inc.php find

Code: [Select]
            // Connect to db
            $this->connect();

After it, add this new code

Code: [Select]
            if ($this->link_id) {
                mysql_query("SET NAMES 'utf8'", $this->link_id);
            }
Logged

grzesio

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Logged

Nibbler

  • Guest
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #7 on: August 26, 2010, 10:49:01 pm »

Try this instead

Code: [Select]
            global $CONFIG;
           
            if ($CONFIG['charset'] == 'utf-8') {
                mysql_query("SET NAMES 'utf8'", $this->link_id);
            }
Logged

grzesio

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #8 on: August 26, 2010, 11:01:05 pm »

Nothing. I've tried those ways, even without checking anything - just forcing coppermine to use utf-8 when connecting with DB.

I've checked one more time DB settings. MySQL is set everywhere on UTF-8. Problem appears only in usernames. Comments and Photos are all right. There's no problem with polish characters in phpBB3. I'm still also trying to find some solution on my own, but I'm running out of ideas :/

PS. Thanks for so fast response :)
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #9 on: August 27, 2010, 09:23:13 am »

As can be seen in the attachment it only affects user names.  All icelandic characters show up in all other places.

The charachters in usernames are okay in phpbb3 and in unbridged CPG.

When bridged CPG fetches users in table from phpbb3 (same database, another table, phpbb3_users instead of cpg15x_users) it looks like CPG looses the characters in username and does not understand them as utf-8.  I do not know the difference betwenn utf-8 and utf-8 *(BOM)  but sometimes that makes a difference.

Best regards,  Jon

Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #10 on: August 27, 2010, 11:19:17 am »

In a clean install of CPG 1.5.8 the username "Ásdís# is registered in the table cpg15x_users as "Ásdís".  But it displays okay in the testgallery as "Ásdís".

This is when I take a look at the database with phpmyadmin

In phpbb3_users the name is registered as "Ásdís", not as  "Ásdís" as in CPG.

Hope this helps somewhat.

Best regards,  Jon
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #11 on: August 28, 2010, 04:06:06 pm »

I have solved this for me.  Hope it helps others.

My problem was that default collation of database was latin1_unicode_ci and CPG uses that.  On the other hand phpbb3 uses collation utf8 (does so when installing).

This resulted in a conflict.  So I set my database to collation utf8.

Installed a fresh CPG install and the CPG tables got the utf8 collation.

Then I added in bridge/phpbb3.inc.php the following

Find:      (line 116 and 117 in CPG 1.5.8)

Code: [Select]
        // Connect to db
            $this->connect();

After it, add this new code

Code: [Select]
         cpg_db_query("SET NAMES 'utf8'", $this->link_id);
Logged

grzesio

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #12 on: August 28, 2010, 04:16:47 pm »

Great - it works!!

Thanks jonket
Logged

grzesio

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #13 on: August 28, 2010, 04:20:12 pm »

Works, but.... Every other regional character which is stored in DB is messed up. If you enter them again - everything is ok.
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #14 on: August 28, 2010, 04:21:17 pm »

You are welcome.

Well, it works.

But now the "User Gallery Alphabetic Tabbing" is not working.  Something simple, probably related.
Logged

jonket

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 64
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #15 on: August 28, 2010, 04:25:25 pm »

Works, but.... Every other regional character which is stored in DB is messed up. If you enter them again - everything is ok.

I expected that, that is why I did a fresh install.  Not so much work for me since it is still in setup phase. and not much data.
Logged

xiaqinghua1989

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Username special characters (Icelandic) in bridge to phpbb3 disappear
« Reply #16 on: August 30, 2010, 10:10:46 am »

Welcome one and all to R/F.com, our little cyber-hovel of a web-faire! I am Deadbishop, your friendly neighborhood Administrator. The forum you see around you is but a shadow of it's former self, but I am working to make this new forum live up to the standards of the original.  With everyone's help, I know we can make this happen.
As for me, I work and wander my home faire, which would be the Minnesota Renaissance Festival. You will also find me loitering about here on the forums and in many nights. Ask me a question, I'll give you an answer. (whether or not it makes any sense is entirely up to chance...)     But seriously, any questions about the site whatsoever, just let me know, and I'll do me best to answer them.
ugg boots
Logged
Pages: [1]   Go Up
 

Page created in 0.051 seconds with 21 queries.