Quote from: OpenGeek at Feb 14, 2010, 12:48 PM
This tool probably needs an update; sounds like the Language needs to be added to the transport before the topics/entries.
The files in the package simply return arrays - how can any information possibly be added earlier?
I debugged the whole package installation progress when adding my language pack, and found out that in xPDOObject::fromArray() the language name ($val) is not assigned to the "name" key ($key) because $setPrimaryKeys is set to false. xPDOObject::fromArray() is called by xPDOObject::fromJSON(), which is called by xPDOObjectVehicle::get(). Above the line
$object->fromJSON($element['object'], '', $setKeys, true);
the third parameter is defined by
$setKeys = (boolean) $options[xPDOTransport::PRESERVE_KEYS];
So I changed the line that defines this value in /core/components/languagebuilder/processors/build.php
xPDOTransport::PRESERVE_KEYS => false,
(line 88) to
xPDOTransport::PRESERVE_KEYS => true,
and now it works for me. But as I’m quite new to MODx, I’m not totally sure if this can cause any other problems. Could you take a look at my solution and tell me if there are any side effects?
Thanks in advance!
Cheers,
Jan