Hi!
I have moved my i18n datasource from Xliff to Mysql and i have started to
have problems.
After i have added the database tables (see
http://trac.symfony-project.org/ticket/8254 ) i have tried to run
symfony i18n:extract --auto-save
and i got following error several times each time the task was ran.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in
$project_root/lib/vendor/symfony/lib/i18n/sfMessageSource_MySQL.class.php on
line 281

After a little bit of inspection of the file i have noticed that the mysql
connection link was lost somewhere in the extract process. I have altered
the sfMessageSource_MySQL.class.php file to use all over the place
"$this->connection()" instead of "$this->db".
After that i have tried to var_dump the $this->db variable in order to see
the result type. I have seen that several times when the above error occured
the mysql link was "unknown" ... so i have patched the "connection" function
like this:


public function connection()
{
   if ('mysql link' != get_resource_type($this->db))
   {
     $this->db = $this->connect();
   }
   return $this->db;
}

Also, i had several small typo problems about the fact that in the
trans_unit Table is not a field called "id", so i have replaced inside the
queries with msg_id.

Please advice about this problem (if you think that i have implemented
right), so i could open a ticket and add the patch that would be able to fix
those problems.

i just know several tickets that might be related:

http://trac.symfony-project.org/ticket/3277
http://trac.symfony-project.org/ticket/3426
http://trac.symfony-project.org/ticket/2499
http://trac.symfony-project.org/ticket/1855 (closed but not fixed)

I am using Symfony 1.4.2 Dev and Doctrine Version 1.2.1, php 5.2.6 on a
Ubuntu powered machine.

Thanks!
Alecs


-- 
Have a nice day!
Alecs

As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0722 621 280

-- 
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en.

Reply via email to