processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 140 forks source link

set_vcard\set_nickname\get_vcard not working #203

Closed geneemelyanov closed 7 years ago

geneemelyanov commented 7 years ago

I can't get set_vcard\set_nickname\get_vcard working on my server (ejabberd 16.12). The result after set_vcard\set_nickname is 0, but nothing gets added to the vcard table (I use MySQL), and get_vcard returns an error (see the output below). From ejabberd.yml:

  mod_admin_extra: {}
  mod_vcard:
    search: true 

$ ejabberdctl set_nickname 91 hostname.com test
$ echo $?
0
$ ejabberdctl get_vcard 91 hostname.com NICKNAME
Problem 'error function_clause' occurred executing the command.
Stacktrace: [{fxml,get_subtag,
                   [[{xmlel,<<"vCard">>,
                            [{<<"xmlns">>,<<"vcard-temp">>}],
                            [{xmlel,<<"NICKNAME">>,[],
                                    [{xmlcdata,<<"test">>}]}]}],
                    <<"NICKNAME">>],
                   [{file,"src/fxml.erl"},{line,172}]},
             {mod_admin_extra,get_subtag,2,
                              [{file,"src/mod_admin_extra.erl"},{line,1127}]},
             {mod_admin_extra,get_vcard_content,3,
                              [{file,"src/mod_admin_extra.erl"},{line,1102}]},
             {mod_admin_extra,get_vcard,3,
                              [{file,"src/mod_admin_extra.erl"},{line,1079}]},
             {ejabberd_ctl,call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,329}]},
             {ejabberd_ctl,try_call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,298}]},
             {ejabberd_ctl,process2,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,247}]},
             {ejabberd_ctl,process,2,
                           [{file,"src/ejabberd_ctl.erl"},{line,225}]}]
$ ejabberdctl set_vcard 91 hostname.com NICKNAME test
$ echo $?
0
$ ejabberdctl get_vcard 91 hostname.com NICKNAME
Problem 'error function_clause' occurred executing the command.
Stacktrace: [{fxml,get_subtag,
                   [[{xmlel,<<"vCard">>,
                            [{<<"xmlns">>,<<"vcard-temp">>}],
                            [{xmlel,<<"NICKNAME">>,[],
                                    [{xmlcdata,<<"test">>}]}]}],
                    <<"NICKNAME">>],
                   [{file,"src/fxml.erl"},{line,172}]},
             {mod_admin_extra,get_subtag,2,
                              [{file,"src/mod_admin_extra.erl"},{line,1127}]},
             {mod_admin_extra,get_vcard_content,3,
                              [{file,"src/mod_admin_extra.erl"},{line,1102}]},
             {mod_admin_extra,get_vcard,3,
                              [{file,"src/mod_admin_extra.erl"},{line,1079}]},
             {ejabberd_ctl,call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,329}]},
             {ejabberd_ctl,try_call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,298}]},
             {ejabberd_ctl,process2,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,247}]},
             {ejabberd_ctl,process,2,
                           [{file,"src/ejabberd_ctl.erl"},{line,225}]}]
badlop commented 7 years ago

It seems a duplicate of processone/ejabberd#1447