Thursday, 23 August 2012< ^ >
arjan has set the subject to: Zotonic - the Erlang CMS
Room Configuration

[00:26:36] Marc Worrell leaves the room: Disconnected: session closed
[00:50:11] Marc Worrell joins the room
[09:40:47] Ilya Rezvov joins the room
[09:49:43] <Ilya Rezvov> i update zotonic
[09:49:53] <Ilya Rezvov> and take error
[09:50:05] <Ilya Rezvov> 1:49:10.146 [error] webmachine error: path="/": [{filename,do_flatten,[<<"/">>,[]]},{filename,extension,1},{mimetypes,path_to_mimes,2},{z_media_identify,guess_mime,1},{z_webmachine_error_handler,error_handler,5},{webmachine_decision_core,error_response,4},{webmachine_decision_core,handle_request,2},{webmachine_mochiweb,loop,2}]
11:49:10.147 [info] DEBUG: webmachine_mochiweb:123 {error,[{filename,do_flatten,[<<"/">>,[]]},{filename,extension,1},{mimetypes,path_to_mimes,2},{z_media_identify,guess_mime,1},{z_webmachine_error_handler,error_handler,5},{webmachine_decision_core,error_response,4},{webmachine_mochiweb,loop,2},{mochiweb_http,headers,5}]}
[09:50:18] <Ilya Rezvov> on any request
[09:50:29] <Marc Worrell> which Erlang release do you have?
[09:51:13] <Marc Worrell> I did fix that problem yesterday - when did you update?
[09:51:48] <Ilya Rezvov> 5 minutes ago
[09:52:08] <Ilya Rezvov> and i don't make backup :)
[09:55:23] <Marc Worrell> it as this fix: https://github.com/zotonic/zotonic/commit/6bd13b6b2382eeb6a910af94ff0dd6318ee1b1d4
[09:55:44] <Marc Worrell> was
[09:56:55] <Marc Worrell> can you check src/support/z_media_identify.erl line 239?
[09:57:24] <Ilya Rezvov> -spec extension(string()|binary()) -> string().
extension(Mime) ->
case mimetypes:extensions(z_convert:to_binary(Mime)) of
[09:57:50] <Marc Worrell> hmm, that is ok. let me check guess_mime/1
[09:57:53] <Ilya Rezvov> Recompile: src/support/z_media_preview
Recompile: src/support/z_media_identify
Recompile: src/support/z_media_archive
[09:58:02] <Ilya Rezvov> and i recompile it
[09:58:43] <Marc Worrell> guess_mime also looks ok
[09:58:44] <Marc Worrell> -spec guess_mime(string() | binary()) -> string().
guess_mime(File) ->
case mimetypes:filename(z_convert:to_binary(File)) of
[09:59:02] <Marc Worrell> do you have R14?
[10:02:12] Ilya Rezvov leaves the room: Replaced by new connection
[10:02:13] Ilya Rezvov joins the room
[10:04:25] <Marc Worrell> how is it going now?
[10:06:00] <Ilya Rezvov> i dont change it now
[10:06:20] <Marc Worrell> which erlang version are you running? maybe there is a diff
[10:06:33] <Marc Worrell> or a problem with the mimetypes app
[10:07:23] <Marc Worrell> we are running the master in production now (let's call it beta :) )
[10:07:50] <Ilya Rezvov> i lost connect
[10:07:57] <Ilya Rezvov> get me a minute please :)
[10:08:28] <Ilya Rezvov> i use Erlang R14A on VPS
[10:08:33] <Ilya Rezvov> and it work correct
[10:09:08] <Ilya Rezvov> worked
[10:09:39] <Marc Worrell> we are on R14B04
[10:09:51] <Marc Worrell> might be the reason - the A version is a test version
[10:10:30] <Marc Worrell> and I think that somewhere the filename module has been changed to also accept binaries, not just strings
[10:10:51] <Marc Worrell> (i am not sure about that, just was surprised it could take binaries now)
[10:10:51] <Ilya Rezvov> are u add new app for mimetypes?
[10:11:01] <Marc Worrell> yes - the mimetypes app
[10:11:18] <Marc Worrell> it is externally maintained and is more complete
[10:11:38] <Ilya Rezvov> hm
[10:12:00] <Ilya Rezvov> i try it on R15B
[10:12:09] <Ilya Rezvov> and it work correct
[10:12:42] <Marc Worrell> then i think it is a change in the filename module
[10:12:46] <Ilya Rezvov> ok, i'll try update erlang vm
[10:13:01] <Ilya Rezvov> big thx for help
[10:13:02] <Marc Worrell> try R14B04 - i am not sure about iconv on R15
[10:13:21] <Marc Worrell> Maas is still integrating his new R15 compatible version
[10:13:27] <Ilya Rezvov> zotonic has very rapid support :)
[10:13:40] <Marc Worrell> thanks, sometimes we are online :)
[10:15:06] <Marc Worrell> oh, stay clear from R14B02 - that has some nasty issues in it
[10:17:40] <Ilya Rezvov> i try to compile r15b now
[10:17:58] <Ilya Rezvov> checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
configure: error: /bin/bash '/root/otp_src_R15B/erts/configure' failed for erts
[10:17:59] <Ilya Rezvov> hmm
[10:19:15] <Marc Worrell> check R14B-latest - it is very stable for us
[10:25:24] <Ilya Rezvov> checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
configure: error: /bin/bash '/root/otp_src_R14B04/erts/configure' failed for erts
[10:25:54] <Marc Worrell> yeah - it needs a kind of curses
[10:26:49] <Marc Worrell> apt-get install libncurses5
apt-get install libncurses5-dev
[10:29:07] <Ilya Rezvov> it work now, thx
[10:29:24] <Marc Worrell> good to hear that :)
[10:31:13] <Ilya Rezvov> i mean it start compiling :)
[10:31:29] <Ilya Rezvov> but i think it would be worked fine
[10:42:09] <Ilya Rezvov> cd deps/iconv && ./rebar compile Uncaught error in rebar_core: {'EXIT',
[10:42:31] <Ilya Rezvov> iconv breaked on r14b04 too
[10:52:31] <Marc Worrell> hmm, is crypto a separate install?
[10:53:28] <Marc Worrell> http://stackoverflow.com/questions/4742184/rebar-newbie-question
[10:53:57] <Marc Worrell> do you have openssl installed?
[10:54:14] <Ilya Rezvov> yes
[10:55:53] <Ilya Rezvov> i have separated openssl
[10:57:12] <Marc Worrell> https://wiki.basho.com/Installing-Erlang.html
[10:57:18] <Marc Worrell> sudo apt-get install build-essential libncurses5-dev openssl libssl-dev
[10:57:28] <Marc Worrell> maybe you need libssl-dev
[11:00:23] <Ilya Rezvov> it dosnt work
[11:00:39] <Ilya Rezvov> sad
[11:00:48] <Marc Worrell> so strange
[11:01:04] <Marc Worrell> it is a problem more people seem to have
[11:01:18] <Ilya Rezvov> i try reboot vps :)
[11:01:45] <Marc Worrell> https://github.com/basho/riak_wiki/issues/45
[11:03:20] <Ilya Rezvov> maybe configure erlang with —with-ssl key
[11:03:35] <Marc Worrell> yes, try
[11:03:46] <Marc Worrell> must be something simple
[11:03:58] <Marc Worrell> (as always - it is so easy when you know how)
[11:06:40] <Ilya Rezvov> it help me
[11:06:50] <Ilya Rezvov> and make started
[11:08:03] <Ilya Rezvov> yeeaaah!
[11:08:09] <Ilya Rezvov> it works!
[11:08:11] <Ilya Rezvov> :)
[11:08:18] <Ilya Rezvov> thx for spended time
[11:08:25] <Marc Worrell> :) you are welcome
[11:09:01] <Ilya Rezvov> may be add note about —wtih-ssl on zotonic install page?
[11:12:12] <Marc Worrell> done :-) http://zotonic.com/install
[11:14:54] <Ilya Rezvov> thx, i hope it be usefull for somebody :)
[11:18:25] <Ilya Rezvov> btw, i use r15b on dev machine and i have no problem
[11:19:04] <Marc Worrell> the smtp receive can use iconv - when it receives messages in something else than utf-8
[11:19:28] <Marc Worrell> i know that Maas is using at more places, so he is the right man to fix it :)
[11:19:59] <Ilya Rezvov> thx for tip, i have to work with it in near time
[13:40:07] <Ilya Rezvov> i have problem described in this issue https://github.com/zotonic/zotonic/issues/382
[13:40:42] <Ilya Rezvov> if i logged as admin and checked "remember me" checkbox
[13:40:51] <Ilya Rezvov> i can't logoff
[13:41:02] <Ilya Rezvov> only from admin interface
[13:42:04] <Ilya Rezvov> when i press on my button
[13:42:13] <Ilya Rezvov> <a id="logout" class="b-link" href="/logout">{_ Выйти _}</a>
{% wire id="logout" action={logoff} %}
[13:42:36] <Ilya Rezvov> i logoff, but then i press on logon action
[13:42:51] <Ilya Rezvov> it login me automatic
[13:55:25] <Marc Worrell> Shouldn't be that "/logoff" ?
[13:55:48] <Marc Worrell> oh wait, you add an action
[13:56:00] <Marc Worrell> I think it has to do with the action using websockets.
[13:56:54] <Marc Worrell> then it can't reset the cookies
[13:57:05] <Marc Worrell> the admin uses: action={redirect dispatch=`logoff`}
[13:58:49] <Marc Worrell> another option is to set the class "setcookie" on your link (=trigger)
[13:58:50] <Marc Worrell> if ( z_ws
&& z_ws.readyState == 1
&& triggerID != "logon_form"
&& (triggerID == '' || !$('#'+triggerID).hasClass("setcookie")))
z_ajax(triggerID, params);
[14:02:20] <Ilya Rezvov> <a id="logout" class="b-link setcookie" href="#/logout">Выйти</a>
{% wire id="logout" action={logoff} %}
[14:02:34] <Ilya Rezvov> i add class, but it dosnt work
[14:05:11] <Ilya Rezvov> i think this commit resolve the problem
[14:18:42] <Marc Worrell> can you check if the 'setcookie' class does pass through the z_ajax() function?
[14:18:51] <Marc Worrell> if you understand my broken sentence? :p
[14:38:00] <Ilya Rezvov> i understand u
[14:38:07] <Ilya Rezvov> code fall in else branch
[14:39:03] <Ilya Rezvov> and it call z_ajax
[14:46:25] <Marc Worrell> then it should be able to do the cookie reset
[14:50:12] <Ilya Rezvov> z_logon cookie didnt reset
[14:51:09] <Ilya Rezvov> it not work on other site too
[14:51:44] <Ilya Rezvov> but it work there before update from 0.6 to 0.8
[15:15:06] <Marc Worrell> then we have to check that, can you file the issue in github? including the html+wire you use
[15:16:05] <Ilya Rezvov> no problem
[16:02:03] Ilya Rezvov leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!