Japanese captions unreadable after moving to a new server!
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello, I have just moved my Gallery to a new server. I have a two language site, English and Japanese. Not only have all my Japanese captions turned into question marks but the admin and navigation Japanese is haywire too! Don’t know where to even start... Could anyone point me in the right direction. I could not find a forum related to languages/localization... Hmmm. Looking forward to any suggestions!
|
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
what mysql version did you have on the old server? |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Well, that is a very good question that I am afraid I cannot answer easily... I will have to contact my old hosting company to find out as I have no record... I checked some recent postings of mine but I did not include that info... In the meantime I have found that the the Admin navigation/links etc are actually working... I just reloaded and they became OK... But for the captions, it is still no go. Even if I try to delete the unreadable captions and redo them in Japanese, once saved, they revert to question marks... Hoping something can be done! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
This is most probably a character encoding issue. G2.1.2 uses UTF-8 as storage, if the storage supports it. So the questions are: You can sure fix it. But we need to know the current state before we start changing anything. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Thanks for the fast response! Well, I have sent an email off to my previous host and am waiting for their reply... As for your other questions... 2. I exported the mysql database as from the old server a .gz file then imported it to the new one. 3. I just checked phpMyAdmin and in the main window (home) I see MySQL charset: UTF-8 Unicode (utf8) Thank you very much in advance! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
@3. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello! I think you are on to something here... Using phpMyAdmin I found and checked the Item table. I am not totally sure what I am looking for but this is what I found for g_description: Type: TEXT When I clicked on the popup menu for Collation I found utf8_unicode.ci at the very bottom... I didn’t change anything as I don’t want to mess anything up, but I guess this is what I need to be using... If this is so, do I manually change the title, summary and description to that? Also my old hosting company got back to me and said the mysql version was 4.1. I hope this helps. Anyway, I await your instructions! Thanks for your time on helping me with this! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
since you have backups, we can risk a few things. i suggest you upgrade to the next nightly snapshot of g2.2 (not to the current one since there was a small issue). if your tables are already utf8 but your columns not, we'll have to change some code slightly and then run an admin task. the current development version of g2.2 is pretty stable, so there shouldn't be much harm in upgrading. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Thanks Valiant... I just went to the nightly snapshot page and saw that the current one appears to be Nov. 3rd and your post was Nov. 4th... So I will wait till the Nov. 4th post is released, right? I am in Japan so there is always a bit of confusion with such matters... Anyway, once again, thank you very much! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
get the nightly build from: |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello again, Have just installed 2.2 over the old version... Started the upgrade process but am getting a few errors above the main graphic area of the upgrader... and not only that, if I select English as the language in the pre first step (Welcome) in the Step One I get Japanese! The first error I get when going from Welcome to Step One: Notice: Constant GALLERY_FORM_VARIABLE_PREFIX already defined in /home/globalpe/public_html/cambodiakids/Gallery2/bootstrap.inc on line 29 (Now all the menu’s are in Japanese... I put in my password and then I get the same message as above plus this: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/globalpe/public_html/cambodiakids/Gallery2/bootstrap.inc:29) in /home/globalpe/public_html/cambodiakids/Gallery2/lib/support/GallerySetupUtilities.class on line 74 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/globalpe/public_html/cambodiakids/Gallery2/bootstrap.inc:29) in /home/globalpe/public_html/cambodiakids/Gallery2/lib/support/GallerySetupUtilities.class on line 74 When I click on go to Step 2 I get returned to the pre-welcome window. Hope you can get me up to speed on this. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
yeah, yet another bug from today's nightly. the fix is easy. open your gallery2/bootstrap.inc file and replace define('GALLERY_FORM_VARIABLE_PREFIX', 'g2_'); with if (!defined('GALLERY_FORM_VARIABLE_PREFIX')) { define('GALLERY_FORM_VARIABLE_PREFIX', 'g2_'); } |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Thanks for that response... Glad I could get the upgrade done so other views would not see the upgrader etc... The upgrade went well. I noticed it changing the database to UTF-8... very interesting... I did some testing and I can now write in Japanese in the Title/Summary etc., and the Japanese is retained but all previous text and comments, etc., still have question marks... I guess that I now have to re-upload the database? Anyway, I once again, await your instructions on how to proceed. Thanks! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
- please post here the CREATE TABLE statement from your backup of one of the tables, e.g. g2_Item table. - you said the tables were already UTF-8 on the new server, just the columns were not. right? |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello, not sure where or how to find that CREATE TABLE statement... Had a look in phpMyAdmin and could not see anything obvious. As for the database file itself, I don’t know how to open it. I tried Excel but no go... In Row Statistics for g2_Item I see: Does that help? If it does not, could you be a little more specific as to what I need to do? Thanks... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
you have a backup of your database, right? in that backup file, you'll find the create table statements. or how else did you move the db from the old host to the new host. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Yes, didn’t realize that that file was just a text document. Tried opening it with Excel (as it is a database) but no go... Anyway, opened it with a text editor and this is what I got. CREATE TABLE g2_AccessMap ( Sorry to have created the extra bother for you! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
ok, i'd expected a DEFAULT CHARSET=utf8; at the end. so there are 3 cases: b) your old db was in utf8 but your new db didn't have the right collation set. c) the convert to utf8 task during the upgrade didn't do anything because the tables were already utf8 but the columns not. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Thank you! Tried your first fix (a) but no go, so am now about to try (b)... As I am not sure of the terminology, so could you please confirm what I am about to do. So this Create Table Statement: DROP TABLE IF EXISTS g2_AccessMap; should end up like this: DROP TABLE IF EXISTS g2_AccessMap; I do the same for all the other Create Table Statements within the database, then delete the current database on the server and upload this new modified one... Thanks again... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
correct, do that for all create table statements in your backup file. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello again... When importing the modified database, I got the following error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=InnoDB DEFAULT CHARSET=latin1' at line 1 What should I do? Thanks.... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
sorry, 2 mistakes: so it should be: ) ENGINE=InnoDB /*!40100 DEFAULT CHARACTER SET utf8 */; and not ) TYPE=MyISAM; ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Well, thanks to your help, we are getting there, but we are not quite there yet! This time the import went well without any errors... I could then see the opening page of my gallery in English AND Japanese, yay! However, when clicking on 6 of the 8 the albums I get a Database Error: An error has occurred while interacting with the database. For the two that function, if I click on any of the pictures within the albums I get the same error message... ouch! So close yet so far... Well, I await your learned suggestions! Thanks! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
did you clear the cache after the import? if the problem persists, enable buffered debugging and add a link to your site such that we can see the problem. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Well, I hadn’t cleaned the caches, so I did that... Then when I went to my gallery I was taken to the 2.2 upgrader. I started the upgrade process and when it came to the Upgrade Plugins, I got the errors below (There were several pages of debug output, I only included the first few lines....) So I restarted the upgrade, this time skipping the modules upgrade. I can ‘complete’ the upgrade process but then it takes me back to the beginning of the upgrade process... It is now an endless upgrade loop. The gallery is located here: < http://www.cambodiakids.org/Gallery2/main.php> Not sure what to do now! I tried setting the debug mode but then I just got a blank page when I went to the gallery... Thanks again... ************************ * in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 205 (gallerycoreapi::error) Debug Output: [1162908555] can't guarantee 300 -- extending! (mysqlt): SET NAMES "utf8" (mysqlt): SHOW TABLES getParameter id.adminGroup for core plugin (mysqlt): ********************* |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
> Then when I went to my gallery I was taken to the 2.2 upgrader that doesn't make sense, does it? didn't you upgrade to 2.2 after importing the database again? |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Here is an overview of what happened. I had successfully upgraded to version 2.2 after your suggesting I change the bootstrap.inc file. But I could still not see Japanese correctly. I then made the Create Table changes you had suggested: Immediately, without cleaning any caches or upgrading I went to my gallery and could finally see Japanese correctly but as I said earlier, when clicking on most of the albums, I got the ‘Database Error: An error has occurred while interacting with the database.‘ So then I cleared the cache. I had a look at my gallery and it took me to the updater! So I followed the updater steps, but the updater just goes in a loop... Looking forward to any ideas you might have. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
this order does not make sense. 1. drop the database |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Thanks. I have dropped the database and am right now about to delete the cache... I went to my gallery and added: lib/support/index.php... I got to a page that gives me the following choices... Cached HTML pages I don’t see anything about cache/derivative... So I will wait for your instructions before I proceed... Previously I had checked everything except Thumbnails and resizes... Am I in the right place? What should I check? Thanks... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
forget about the derivative cache (it's thumbs + resizes). just delete all but the derivative cache. once you did that, please use your ftp client and verify that g2data/cache/ has no files in it anymore. g2data/derivative should still be there. all other things in g2data/cache should be empty (they can have subfolders, but no files). |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Cleaned the cache, checked that all the folders (entity, module, theme) were empty (derivative contained data). I then imported the modified database and ran the updater. Same problem, just sends me in a loop. It tells me the core module is up to date, then in the next step (update plugins) I get error messages (several pages long, see below) if I choose upgrade selected modules. So I have to start over. If I don’t update the plugins, it goes smoothly, but once the upgrade is finished, it takes me back to the first step! As usual, I await your comments.... ******** Error (ERROR_STORAGE_FAILURE) [1162954051] can't guarantee 300 -- extending! (mysqlt): SET NAMES "utf8" (mysqlt): SHOW TABLES getParameter id.adminGroup for core plugin (mysqlt): Etc. Etc. Etc. ******** |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
please enable buffered debug mode, we need to see the actual mysql error. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hi, In configure.php I replaced $gallery->setDebug(false); with $gallery->setDebug('buffered'); Uploaded it and then went to my gallery. Got taken to the updater again, with exactly the same situation. As If I select update the plugins I get several pages of debug messages and I cannot continue. If I don’t update the plugins I can go through all the steps but finally, get taken back to the first step of the updater. Below is the last section of the debug message which had some red text. Here is the full debug message: <http://www.cambodiakids.org/galleryerror/pluginerror.rtf>: getParameter _callbacks for replica plugin (mysqlt): SELECT g2_User.g_userName, g2_User.g_fullName, 1054: Unknown column 'g2_User.g_locked' in 'field list' adodb_mysqlt._execute(SELECT |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
so you successfully completed the upgrade core module step? it's an unexpected issue... > 1054: Unknown column 'g2_User.g_locked' in 'field list' please check your database, "describe g2_User;". |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Yes, the core upgrade was successful... I am really not sure what I should be checking... The mySQL database name is cambodia_Gallery Should I replace g2_User with cambodia_danny in all instances in the database? I am not sure what to check or do about g2_Schema... Thanks again... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
no, please use phpmyadmin or whatever you use to administer and manage the database. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
I am using phpMyAdmin. In phpMyAdmin I selected the database and then clicked on Querry. In the ‘SQL query on database cambodia_Gallery2:’ window I type in describe g2_User; and then press Submit Querry. I then get an error message saying: You have to choose at least one column to display What column do I need to diplay? I don’t have any experience with this part of phpMyAdmin... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
ok, in phpmyadmin, just click on the user table, then on "structure" and copy what you see or create a screenshot. i either expect this: Field Type Collation Attributes Null Default Extra Action g_id int(11) No Browse distinct values Change Drop Primary Unique Index Fulltext g_userName varchar(32) utf8_general_ci No Browse distinct values Change Drop Primary Unique Index Fulltext g_fullName varchar(128) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_hashedPassword varchar(128) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_email varchar(255) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_language varchar(128) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_locked int(1) Yes 0 Browse distinct values Change Drop Primary Unique Index Fulltext or this: Field Type Collation Attributes Null Default Extra Action g_id int(11) No Browse distinct values Change Drop Primary Unique Index Fulltext g_userName varchar(32) utf8_general_ci No Browse distinct values Change Drop Primary Unique Index Fulltext g_fullName varchar(128) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_hashedPassword varchar(128) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_email varchar(255) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext g_language varchar(128) utf8_general_ci Yes NULL Browse distinct values Change Drop Primary Unique Index Fulltext |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello, Followed your instructions and have included a screen shot as an attachment. Hope it helps sort this out! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
thanks. please manually add the g_locked column to the user table. 1. in phpmyadmin, go the User table done |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Thank you Valiant, but we are still not there yet... Carried out the above and this time things went a little better to a point. Just one of the modules could not be upgraded this time... Here is the message: Unable to upgrade the Thumbnail Manager module Unable to upgrade the Core module Part of the debug menu is below. Anyway, so I restarted the Updater and skipped updating the plugins. When I got taken to the gallery the debug window was there with several pages of info (see GALLERY DEBUG WINDOW ERRORS below... I am not seeming to have too much luck with this! I tried cleaning the cache several times, but to no avail. Anyway, I hope something can be done... Thank you for your patience! ********************* Error (ERROR_STORAGE_FAILURE) ********************** GALLERY DEBUG WINDOW ERRORS: Database Error Back to the Gallery Error Detail + file_exists(/home/globalpe/CCHomePhotos/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) ETC ETC... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
> Unable to upgrade the Core module that is very bad. the core module should be upgraded in the "Upgrade core module step", there should be no attempt to upgrade it in the "Upgrade other modules" step since it should already have been upgraded. > Error (ERROR_BAD_PLUGIN) : Unknown module version 1.1.20 when you look at modules/core/module.inc, what does it say in function CoreModule() { ... $this->setVersion ? |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
This is what I get for CoreModule in module.inc: $this->setId('core'); In Version.dat I see: 1.1.20 Thank you! |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
is your gallery online? what's the url? i'd like to inspect your module.inc and CoreModuleExtras.inc files. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
I didn’t read your post correctly. Attached are the files you would like to inspect. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
Thanks, actually I can see the files through your website (no need to attach the zip). I'm puzzled. So versions.dat and module.inc as well as CoreModuleExtras.inc are for v 1.1.20. |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello again, Well, I am not completely sure how to carry out your instructions... First I went to g2_PluginParamaeterMap. I noticed an ‘error’ message: UNIQUE and INDEX keys should not both be set for column `g_pluginType` Looking in the database I was not sure where to find what you want. If I have not included what you need, could you explain how to find it in more detail or perhaps I could send you a copy of the database... Browsing on g_parameterValue I get the following: Full Texts For g_pluginId I get: 38 core For g_paramatername I don’t see anything related to _version: Full Texts |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
Hello again! I have gone through your instructions. This time I tried a different way... Here is what I did... Please correct me as need be, if you don’t mind. 1. I go to phpMyAdmin and in the database, click on g2_PluginParameterMap. 2. Within that window, I put a check marks next to g_parameterValue, g_pluginId and g_parameterName and click Browse. Here is what I get: Full Texts g_pluginId g_parameterName g_parameterValue |
|
DamienA
![]()
Joined: 2003-05-25
Posts: 203 |
![]() |
I have not had a reply so I wonder if anyone else help me out with this problem. The gallery related to this particular problem has been down for several weeks now... It is a site I am building as a volunteer to support homeless children in Cambodia... Any assistance would be greatly appreciated. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
please execute this SQL query... SELECT * FROM g2_PluginParameterMap WHERE g_pluginId = 'core' and g_parameterName = '_version'; |
|