Closed zaigham closed 9 years ago
Have you pulled down the latest version of Repoman from github? If not, which version are you using?
I am using latest, from github. Kindly see my pull request. #32
Ah, namespaces. I've merged your pull request. Thank you for contributing! Does that fix this problem?
Apparently the initial problem is resolved, but I noticed that I get multiple slashes in the path, eg.
[2015-05-30 01:23:54] (INFO @ repoman) Created static element at /opt/bitnami/apps/modx/htdocs/packages/gss_my/elements/tvs///ContentChunk.php
See double slash before ContentChunk.php
I should probably pull in the Flysystem package for better filesystem traversing... I've spotted those double slashes here and there too...
And I am getting this warning in TV file:, see properties
<?php
return array(
'type' => 'listbox',
'name' => 'ContentChunk',
'caption' => '',
'description' => '',
'editor_type' => 0,
'display' => 'default',
'default_text' => 'empty',
'properties' => '[2015-05-30 01:42:36] (WARN @ /opt/bitnami/apps/modx/htdocs/packages/repoman/views/tv.php : 16) PHP notice: Array to string conversion
Array',
'input_properties' => 'a:7:{s:10:"allowBlank";s:4:"true";s:9:"listWidth";s:0:"";s:5:"title";s:38:"Please choose the chunk for this page.";s:9:"typeAhead";s:5:"false";s:14:"typeAheadDelay";s:3:"250";s:14:"forceSelection";s:5:"false";s:13:"listEmptyText";s:0:"";}', // serialized
'output_properties' => 'a:0:{}', // serialized
);
?>
The source is here: https://github.com/craftsmancoding/repoman/blob/master/views/tv.php#L16
Probably that needs to be either serialized or json_encoded (I can't remember which is used for that field), so conceivably, it could follow the input and output properties?
'properties' => '<?php print serialize($array['properties']); ?>'
I quickly looked into database table, and I see a:0:{}
as data in properties
field. So this means it is serialized?
Just need to confirm because I am no php programmer :stuck_out_tongue:
Haha -- you fooled me. You've already found 3 bugs that a programmer (me) missed ;)
Yes, if you see a:0:{}
that means the data is serialized. JSON encoded data would be something like {}
or {"key":"value"}
.
Oh, no intentions of fooling, I just don't consider myself php programmer ;) ... (underestimating? :P)
I have added a new PR, so it will resolve it.
Thanks for nice software! Hopefully it will make life lot easier with MODX Addons/Packages.
I am using the following command:
php repoman export ../gss_my --classname=modTemplateVar --target=dev
The output of this command is:But I only get 1 TV exported in the target folder. I have checked the php error log, and I found this in it:
PHP Fatal error: Class 'Repoman\Parser\modX' not found in /opt/bitnami/apps/modx/htdocs/packages/repoman/model/repoman/Parser/modtemplatevar.php on line 57
Kindly assist.
BTW I tried to export Templates, and they were exported as expected, even I could see some errors.