[Solved] Error updating language in translation interface

Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Wed, 2009-11-04 18:30

Hi all,

since several days I have a problem with the translation interface. When trying to update the language the progress bar appears and then fails with (gallery is latest git):

Aufgabe Übersetzungen aktualisieren gestartet (ID 217)
exception 'ErrorException' with message 'unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 65528 of 65535 bytes' in /var/www/gallery3/modules/gallery/models/task.php:22
Stack trace:
#0 [internal function]: gallery_error_Core::error_handler('a:5:{s:4:"mode"...')
#1 /var/www/gallery3/modules/gallery/models/task.php(22): unserialize('dirs')
#2 /var/www/gallery3/modules/gallery/helpers/gallery_task.php(123): Task_Model->get(Object(Task_Model))
#3 [internal function]: gallery_task_Core::update_l10n('gallery_task::u...', Array)
#4 /var/www/gallery3/modules/gallery/helpers/task.php(81): call_user_func_array('217')
#5 /var/www/gallery3/modules/gallery/controllers/admin_maintenance.php(185): task_Core::run('217')
#6 [internal function]: Admin_Maintenance_Controller->run(Array, Array)
#7 /var/www/gallery3/modules/gallery/controllers/admin.php(50): call_user_func_array('maintenance', Array)
#8 [internal function]: Admin_Controller->__call(Object(Admin_Controller), Array)
#9 /var/www/gallery3/system/core/Kohana.php(291): ReflectionMethod->invokeArgs()
#10 [internal function]: Kohana::instance(Array)
#11 /var/www/gallery3/system/core/Event.php(209): call_user_func('system.execute')
#12 /var/www/gallery3/system/core/Bootstrap.php(55): Event::run()
#13 /var/www/gallery3/index.php(86): require('/var/www/galler...')
#14 {main}
unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 65528 of 65535 bytes

 
matthieu

Joined: 2009-11-03
Posts: 11
Posted: Wed, 2009-11-04 20:46

Same problem here :

La tâche Mettre à jour les traductions a débuté(identifiant de cette tâche 25)
exception 'ErrorException' with message 'unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 65514 of 65535 bytes' in /data/gallery3/modules/gallery/models/task.php:22
Stack trace:
#0 [internal function]: gallery_error_Core::error_handler('a:5:{s:4:"mode"...')
#1 /data/gallery3/modules/gallery/models/task.php(22): unserialize('dirs')
#2 /data/gallery3/modules/gallery/helpers/gallery_task.php(123): Task_Model->get(Object(Task_Model))
#3 [internal function]: gallery_task_Core::update_l10n('gallery_task::u...', Array)
#4 /data/gallery3/modules/gallery/helpers/task.php(81): call_user_func_array('25')
#5 /data/gallery3/modules/gallery/controllers/admin_maintenance.php(185): task_Core::run('25')
#6 [internal function]: Admin_Maintenance_Controller->run(Array, Array)
#7 /data/gallery3/modules/gallery/controllers/admin.php(50): call_user_func_array('maintenance', Array)
#8 [internal function]: Admin_Controller->__call(Object(Admin_Controller), Array)
#9 /data/gallery3/system/core/Kohana.php(291): ReflectionMethod->invokeArgs()
#10 [internal function]: Kohana::instance(Array)
#11 /data/gallery3/system/core/Event.php(209): call_user_func('system.execute')
#12 /data/gallery3/system/core/Bootstrap.php(55): Event::run()
#13 /data/gallery3/index.php(86): require('/data/gallery3/...')
#14 {main}
unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 65514 of 65535 bytes

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Wed, 2009-11-04 21:02

I'm not able to duplicate this using a current git from just a few moments ago. Which language(s) are you guys trying to update?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Wed, 2009-11-04 21:21

German

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Wed, 2009-11-04 21:52

Works for me :) Using the latest git.

Try setting your language to English, then removing the German language (or all languages for that matter) then re-installing those you want.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Thu, 2009-11-05 21:31

Didn´t work. I uninstalled everything except English (via the web interface). The error stays.

 
cj82

Joined: 2009-09-15
Posts: 8
Posted: Thu, 2009-11-05 22:17

I think to have the same problem but I have another message:

2009-11-05 23:13:36 +01:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Data too long for column 'context' at row 1 - UPDATE `tasks` SET `state` = 'error', `status` = 'There was an SQL error: Data too long for column \'context\' at row 1 - UPDATE `tasks` SET `state` = \'running\', `status` = \'Scansione file: analizzati 34 file\', `percent_complete` = 13, `context` = \'a:5:{s:4:\\\"mode\\\";s:10:\\\"scan_files\\\";s:5:\\\"files\\\";a:694:', `percent_complete` = 13, `context` = .........
 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Sun, 2009-11-15 00:25

Any news? I would really like to continue doing translations for gallery, but I cannot. The problem remains even with the latest GIT Version. At the moment I have just the english language selected. Is there a way to manually reset the language files?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Mon, 2009-11-16 17:19

Can you guys post links to phpinfo?
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Mon, 2009-11-16 19:22

phpinfo() renamed to txt attached

AttachmentSize
info.txt70.96 KB
 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 549
Posted: Mon, 2009-11-16 20:37

CJ82: Could you please post the full message?
Seems to be the same issue yeah.

Dog Photos | Gallery2 Themes Demo

 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Mon, 2009-11-16 21:17

@Twilek: could you please open a ticket. The problem is that the maximum length of the context field in the task table is 64K. For some reason, your g3 wrote more than that, which MySQL graciously truncated for you and now that you are trying to retrieve it, PHP says i can't because the serialized data is shorter than what php thinks it should be.

http://www.timalmdal.com

 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Mon, 2009-11-16 21:29
 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Mon, 2009-11-16 21:38
 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Mon, 2009-11-16 22:28

@Twilek, cj82: Can you please do a pull from git, I've just pushed a possible fix. thanks

Tim
http://www.timalmdal.com

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Mon, 2009-11-16 22:52

Seems to have worked, I have just updated the translations successfully and switched to German

Thanks a lot

Henning

Update:
I did some translations and uploaded them successfully, so that works,too.

 
cj82

Joined: 2009-09-15
Posts: 8
Posted: Tue, 2009-11-17 13:08

yeahh, with the last update there'snt problem

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Sun, 2009-11-29 09:09

Hi all,

I reopened the topic because I again cannot update my languages... This time the error looks like this

Quote:
Aufgabe Übersetzungen aktualisieren gestartet (ID 231)
exception 'ErrorException' with message 'Division by zero' in /var/www/gallery3/modules/gallery/helpers/gallery_task.php:182
Stack trace:
#0 /var/www/gallery3/modules/gallery/helpers/gallery_task.php(182): gallery_error_Core::error_handler(Object(Task_Model))
#1 [internal function]: gallery_task_Core::update_l10n('gallery_task::u...', Array)
#2 /var/www/gallery3/modules/gallery/helpers/task.php(81): call_user_func_array('231')
#3 /var/www/gallery3/modules/gallery/controllers/admin_maintenance.php(185): task_Core::run('231')
#4 [internal function]: Admin_Maintenance_Controller->run(Array, Array)
#5 /var/www/gallery3/modules/gallery/controllers/admin.php(50): call_user_func_array('maintenance', Array)
#6 [internal function]: Admin_Controller->__call(Object(Admin_Controller), Array)
#7 /var/www/gallery3/system/core/Kohana.php(291): ReflectionMethod->invokeArgs()
#8 [internal function]: Kohana::instance(Array)
#9 /var/www/gallery3/system/core/Event.php(209): call_user_func('system.execute')
#10 /var/www/gallery3/system/core/Bootstrap.php(55): Event::run()
#11 /var/www/gallery3/index.php(90): require('/var/www/galler...')
#12 {main}
Division by zero

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Sun, 2009-11-29 16:45

When did you last update to the latest code? Try updating the code and report back. I can't duplicate this under a fresh git pull from a few minutes ago.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Sun, 2009-11-29 20:44

I just did a GIT pull, but the problem remained

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Sun, 2009-12-06 12:46

I am sorry, I know it´s considered bad form to bump a topic, but I still get the division by zero Error with the latest GIT Version when I try to update my translations. I have noticed that when trying to update gallery says "Examining files 0" (actually it´s the German equivalent to that). It used to count up to one hundred and something from there, but it doesn´t anymore. I guess that´s where the zero comes from. Anyone else with the same problem or better with a fix? I would really like to continue translating but right now I can´t

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Tue, 2009-12-08 17:51

Twilek,

I'm not ignoring you. I've just been crunched for time and this is a more difficult problem :) I'm trying to figure out what to try and I haven't had time to jump on #gallery in IRC to ask for help from the devs. Feel free to try that. I'm not able to reproduce this problem so it's really hard for me to troubleshoot.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Tue, 2009-12-08 23:41

No problem, I know only too well what too little time means..
if I can give more debug information please tell me what you need. I am not quite sure but I noticed the problem for the first time after I migrated my Debian installation to a virtual machine in Virtualbox. I don´t know wether these two things just coincide or are connected, as everything else just works as before.

 
Twilek
Twilek's picture

Joined: 2003-05-30
Posts: 71
Posted: Wed, 2009-12-30 14:23

Because of another error I had to do a clean gallery install. I copied back my "var" folder and things worked again. It seems the translation update bug fixed itself while doing so....

Thanks for the support.... Case closed...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Wed, 2009-12-30 14:39

There must've been some file that had been modified that git pull wasn't updating. Either way I'm glad it's fixed and working.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here