Zotonic
Zotonic
zotonic@conference.zotonic.com
Thursday, 2 August 2012< ^ >
arjan has set the subject to: Zotonic - the Erlang CMS
Room Configuration

GMT+2
[07:54:35] arjan joins the room
[09:15:52] kaos joins the room
[09:26:50] <Marc Worrell> probably also need a shop soon, what is missing?
[09:46:59] <Ilya Rezvov> i need export from csv
[09:47:16] <Ilya Rezvov> shopping cart
[09:47:22] <Ilya Rezvov> and order status
[09:47:42] <Ilya Rezvov> i find shopping cart in arjan's mod_shop
[09:47:52] <Ilya Rezvov> i making export now
[09:48:07] <Ilya Rezvov> import
[09:48:34] <Ilya Rezvov> i miss in word :)
[09:51:35] <arjan> nice
[09:52:15] <arjan> Marc Worrell: mod_shop is basicaly a shopping cart (in session) plus a "product" category
[09:52:33] <arjan> products have variants, e.g. for different sizes / colors
[09:52:47] <arjan> payment provider is decoupled
[09:52:52] <Ilya Rezvov> and also i need search by product properies
[09:52:56] <arjan> through z_notifier
[09:53:08] <arjan> I created a mod_adyen as payment provider example.
[09:53:35] <Marc Worrell> didn't somebody add paypal as well?
[09:53:50] <Ilya Rezvov> in my task all payments in offline
[09:54:09] <Marc Worrell> do you also have number of items available?
[09:54:13] <arjan> paypal is not integrated in mod_shop as a payment provider
[09:54:17] <arjan> Marc Worrell: you mean stock?
[09:54:19] <Marc Worrell> yep
[09:54:30] <arjan> I think variants have stock
[09:54:38] <arjan> variant is also just a rsc
[09:55:17] <Marc Worrell> maybe good to put the stock count into a separate table, easier administration and reporting
[09:55:35] <Marc Worrell> will have a look, i also have an old shop module lingering around
[09:56:28] <arjan> can also just use a custom pivot table for that
[09:57:45] <Ilya Rezvov> i think to be usefull add to mod_search possibility search by custompivot properies
[09:58:29] <Ilya Rezvov> m.search[{query custompivot="mysite" cusromprop={"number", q.number} }]
[09:58:33] <Ilya Rezvov> for example
[09:58:49] <Ilya Rezvov> it solves many problems with search
[09:59:00] <Ilya Rezvov> products
[10:01:10] <arjan> I agree
[10:01:37] <arjan> never got around to do that :-/
[10:01:53] <arjan> should also have support for other operators like >, < etc
[10:02:09] <Ilya Rezvov> yes
[10:02:19] <Ilya Rezvov> it second iteration in my plan :)
[10:02:52] <Ilya Rezvov> i need "in" operator in near future
[10:02:58] <arjan> :)
[10:20:53] <Marc Worrell> anyone up to answering the questions of ボリスくん <boris.muehmer@gmail.com> on zotonic-users? I think he wants something that doesn't fit zotonic
[10:21:35] arjan leaves the room
[10:22:54] arjan joins the room
[10:24:47] <Ilya Rezvov> what mean mod_schema directive?
[10:29:02] <arjan> that is a way to migrate data between code versions
[10:32:26] <Ilya Rezvov> how it workes?
[10:34:25] maas.maarten.zeeman joins the room
[10:52:39] maas.maarten.zeeman leaves the room
[11:55:12] arjan leaves the room
[11:56:17] arjan joins the room
[12:37:49] <kaos> Marc Worrell: https://github.com/AlainODea/mod_paypal
[12:38:07] <Marc Worrell> oh yes, it was alain's
[12:38:11] <Marc Worrell> thanks!
[12:38:18] <kaos> :)
[13:03:03] <Ilya Rezvov> after copy site to remote machine i get this error 14:54:46.586 [error] webmachine error: path="/"
{error,{error,function_clause,[{proplists,get_value,[seo_noindex,<<"x013….4616a">>,undefined]},{z_depcache,get,3},{m_rsc,p_cached,3},{resource_page,html,1},{resource_page,to_html,2},{webmachine_resource,resource_call,3},{webmachine_resource,do,3},{webmachine_decision_core,decision,3}]}}
[13:03:09] <Ilya Rezvov> i need clear cache?
[13:03:33] <Ilya Rezvov> i dump base and copy it
[13:27:52] <Marc Worrell> strange, looks as if the props were not deserialized from your database.
[13:28:34] <Marc Worrell> can you do a m_rsc:get(Id, z:c(xxx)).?
[13:28:45] <Marc Worrell> where Id is the id you want to see and xxx is your site name
[13:48:31] <Ilya Rezvov> m_rsc:get(333, z:c(detalkupi)).
[{category_id,106},
{created,{{2012,7,22},{21,49,25}}},
{creator_id,1},
{id,333},
{is_authoritative,true},
{is_featured,false},
{is_protected,false},
{is_published,true},
{modified,{{2012,7,24},{12,35,8}}},
{modifier_id,1},
{name,undefined},
{page_path,<<"/partners">>},
{pivot_geocode,undefined},
{publication_end,{{9999,8,17},{12,0,0}}},
{publication_start,{{2012,7,22},{21,49,0}}},
{slug,<<"nashi-druz-ya">>},
{uri,undefined},
{version,2},
{visible_for,0}|
<<"x01326a3a836c0000001d680264000574697"...>>]
[13:50:05] <Ilya Rezvov> problems with db encoding?
[13:52:30] <Marc Worrell> looks like it
[13:52:56] <Marc Worrell> The "| …" at the end should have been the deserialized proplists
[13:53:04] <Marc Worrell> from the props property
[13:53:15] <Marc Worrell> i have seen it mentioned one time before by arjan
[13:53:41] <Marc Worrell> and then we couldn't reproduce the problem.
[13:54:00] <arjan> I have no clue
[13:54:06] <arjan> does not ring a bell actually
[13:54:09] <Ilya Rezvov> i reproduce it
[13:54:13] <Ilya Rezvov> on another site
[13:54:32] <Ilya Rezvov> i backup DB with Navicate Premium
[13:54:37] <Ilya Rezvov> drop all tables
[13:54:42] <Ilya Rezvov> and restore backup
[13:54:49] <Marc Worrell> I blob can have a binary prefix: -define(TERM_MAGIC_NUMBER, 16#01326A3A:1/big-unsigned-unit:32).
[13:55:08] <Marc Worrell> but your value looks as if it is a binary value transformed to a hex string
[13:55:21] <Marc Worrell> did you import/export a db?
[13:56:01] <Ilya Rezvov> i did it with Navicate
[13:56:11] <Marc Worrell> the binary prefix is there, but the whole thing is a hex-representation of the original binary value
[13:56:11] <Ilya Rezvov> i make db snapshot
[13:56:27] <Marc Worrell> maybe it didn't understand binary blobs?
[13:56:41] <Ilya Rezvov> i can give all access
[13:56:52] <Ilya Rezvov> to my vps and db
[13:57:02] <Marc Worrell> maybe try:
[13:57:28] <Marc Worrell> z_db:q("select * from rsc where id = 333", z:c(detalkupi)).
[13:58:05] <Marc Worrell> and the same for id 1
[13:58:16] <Ilya Rezvov> z_db:q("select * from rsc where id = 333", z:c(detalkupi)).
[{333,undefined,undefined,<<"/partners">>,true,true,false,
false,
{{2012,7,22},{21,49,0}},
{{9999,8,17},{12,0,0}},
1,1,2,106,0,<<"nashi-druz-ya">>,
<<"x01326a3a836c0000001d68026400057469746c65680"...>>,
{{2012,7,22},{21,49,25}},
{{2012,7,24},{12,35,8}},
6,<<"'/partners':9C 'articl':11C "...>>,
<<"'zpc104':2 'zpc106':1">>,undefined,undefined,undefined,
undefined,undefined,undefined,...}]
[13:58:41] <Ilya Rezvov> (zotonic001@47053.local)2> z_db:q("select * from rsc where id = 1", z:c(detalkupi)).
[{1,undefined,<<"administrator">>,undefined,true,true,false,
true,
{{2012,7,22},{12,54,34}},
{{9999,8,17},{12,0,0}},
1,1,3,102,0,<<>>,
<<"x01326a3a836c0000000268026400057469746c656d0"...>>,
{{2012,7,22},{12,54,34}},
{{2012,7,22},{21,48,8}},
8,<<"'administr':2A,4C,5C 'person"...>>,<<"'zpc102':1">>,
undefined,undefined,undefined,undefined,undefined,
undefined,...}]
[13:59:00] arjan leaves the room
[14:00:04] <Marc Worrell> I get something like: [{1,undefined,<<"administrator">>,undefined,true,true,false,
true,
{{2012,3,15},{15,56,0}},
{{9999,8,17},{12,0,0}},
1,1,137,102,0,<<"administrator">>,
[{title,{trans,[{en,<<"Administrato"...>>}]}},
{pref_language,en},
{blocks,[]},
{address_street_2,<<>>},
{chapeau,{trans,[{en,...}]}},
{subtitle,{trans,[{...}]}},
{summary,{trans,[...]}},
{short_title,{trans,...}},
{body,{...}},
{language,...},
{...}|...],
{{2012,3,15},{14,56,28}},
{{2012,6,19},{18,24,51}},
16,<<"'+31646032111':217C '1181':2"...>>,<<"'zpc102':1">>,<<>>,
<<"admin">>,undefined,undefined,undefined,undefined,...}]
[14:01:30] arjan joins the room
[14:01:36] <Ilya Rezvov> i understand what it not deserialize but i don't understand why
[14:03:23] <arjan> different erlang versions, different postgres versions? no clue...
[14:03:40] <Marc Worrell> I think there was a conversion from the binary representation to a text representation of the value.
[14:04:06] <Marc Worrell> (from bytea to text)
[14:04:47] <Ilya Rezvov> arjan: i backup db, update zotonic and restore backup
[14:04:54] <Ilya Rezvov> i don't update erlang
[14:04:58] arjan leaves the room
[14:05:00] <Ilya Rezvov> for 1 site
[14:05:08] <Marc Worrell> then there must have been a conversion during the backup/restore
[14:06:44] <Marc Worrell> can you check: z_db:columns(rsc, z:c(detalkupi)).
[14:06:59] <Marc Worrell> should have:
[14:07:00] <Marc Worrell> {column_def,props,"bytea",undefined,true,undefined,
undefined},
[14:07:20] arjan joins the room
[14:08:05] <Ilya Rezvov> {column_def,props,"bytea",undefined,true,undefined,
undefined},
[14:09:04] <Ilya Rezvov> i rerestore backup and it has errors
[14:09:05] <Ilya Rezvov> ERROR: access method "gin" does not support ASC/DESC options
ERROR: access method "gin" does not support ASC/DESC options
[Msg] Finished unsuccessfully
[14:09:41] <Ilya Rezvov> i think it link with indexes
[14:10:02] <Ilya Rezvov> but i have problem in other place
[14:15:43] <Marc Worrell> when i look at the hex/bytea representations it looks like you lost a '\' in your backup/restore cycle
[14:19:37] <Marc Worrell> but the problem is most definitely in your backup/restore cycle
[14:20:31] <Ilya Rezvov> agree
[14:20:44] <Ilya Rezvov> how u backup/restore db?
[14:20:51] <Ilya Rezvov> with pg_dump/pg_restore?
[14:24:07] <kaos> Ilya Rezvov: that is what I have used before.
[14:24:48] <kaos> or, pg_dump at least, then simply feed that sql data in with psql...
[14:48:36] <Ilya Rezvov> i execute sql file from backup of zotonic
[14:48:38] <Ilya Rezvov> with psql
[14:48:55] <Ilya Rezvov> and it was correct interpreted
[14:49:07] <Ilya Rezvov> i think problem in Navicate
[14:49:17] <Ilya Rezvov> thx all for help :)
[14:53:13] arjan leaves the room
[14:55:41] arjan joins the room
[14:59:58] arjan leaves the room
[15:05:17] <kaos> glad you got it solved :)
[15:23:52] arjan joins the room
[15:31:21] arjan leaves the room
[15:36:29] arjan joins the room
[15:46:30] maas.maarten.zeeman joins the room
[16:05:36] maas.maarten.zeeman leaves the room
[16:08:47] arjan leaves the room
[16:48:34] arjan joins the room
[17:43:02] arjan leaves the room
[17:43:22] arjan joins the room
[18:03:40] arjan leaves the room
[18:04:22] arjan joins the room
[18:30:03] <Ilya Rezvov> which is usefull for the mod_development?
[19:01:19] <kaos> one thing is you can get all lib files (js and css) as separate files, instead of in one big concatenated version that is suited for production use...
[19:03:30] <Ilya Rezvov> hmmm, it is usefull, something else?
[19:03:33] <kaos> [13:53:18] <Marc Worrell> i have seen it mentioned one time before by arjan
[13:53:44] <Marc Worrell> and then we couldn't reproduce the problem.
[13:54:03] <arjan> I have no clue
[13:54:09] <arjan> does not ring a bell actually
Marc, was it this your were thinking of? https://github.com/zotonic/zotonic/issues/272
[19:03:41] <Ilya Rezvov> •also
[19:07:12] arjan leaves the room
[19:10:47] arjan joins the room
[19:29:05] <Marc Worrell> @kaos - indeed, though that is another problem than Ilya encountered,
[19:50:51] <kaos> yup, now that you managed to identify Ilya's problem...
[20:49:53] kaos leaves the room
[21:13:06] arjan leaves the room
[21:15:39] arjan joins the room
[21:18:17] arjan leaves the room
[21:40:13] arjan joins the room
[21:43:29] arjan leaves the room
[22:47:16] maas.maarten.zeeman joins the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!