BuzzWorkers wrote:
...
if you try to translate comprofiler_fields_values.xml
there is no titles to translate, but stil i can hit the checkbox and click translate to get to this famously old error message :
Fatal error: Call to a member function getTable() on a non-object in .../com_joomfish/models/ContentObject.php on line 574
Trying to solve this problem I have discovered interesting thing. You see, in the file “comprofiler_fields_values.xml” we are working with the table named “comprofiler_field_values”. So, I have looked into that table, and see that it is empty. So, CB does not store our fields values in that table. Furthermore if you takes close look to that table's structure, you will see, that storing field values in it, with that structure, is technically impossible (if we store fields values in separate table we need two references: reference to the field, to which it belongs, and reference to the user, to which belong that field). So our fields values is stored in the table named “_comprofiler” (jos_comprofiler by default) together with all other users information.
Let me explain: when we create new field we enter “name” for it, it is name in database. Let the name be “cb_ourfield”. CB adds new record to the table “_comprofiler_fields” (there are information about field's type, size etc.) and adds new field (column) to the table “_comprofiler” (so it appears in every users record near the information like: user_id, firstname, hits).
After that I do not see the realization that would work with dynamically add fields. But there is a solution that can partially help. We can create xml file which allows us to translate users information (works with table “_comprofiler”) and translate information about our fields (for example xml that works only with our new field cb_ourfield), but if we adds new field we would have to edit this xml.
I have one question without an answer “wherefore we need table “comprofiler_field_values””?! Maybe, CB team can answer It…
Post edited by: vladl, at: 2009/11/09 23:27
Post edited by: vladl, at: 2009/11/11 14:05