Re: [Zotonic-Dev] SSL

2024-04-23 Thread 'Marc Worrell' via Zotonic developers
We are using the library:

https://github.com/zotonic/zotonic_ssl

For the SSL certificate inspection.
Could you file an issue there?

If you want to use Let’s Encrypt with Zotonic 1.x (master), then you can also 
just enable mod_ssl_letsencrypt.
It will handle requesting certificates and also extending them before they 
expire.

Cheers,

Marc



> On 15 Mar 2024, at 10:41, 'Seann Aswell' via Zotonic developers 
>  wrote:
> 
> Question about using the SSL CA module...
> 
> I have been using Zotonic behind HAProxy, and would like to use it directly, 
> but there is an issue with newer certificates issued by Let's Encrypt.
> 
> According to the Erlang SSL man page 
> , it appears EC keys are now 
> supported. However, when placing all of the certs and keys into the 
> site/priv/security/ca directory, each time a connection to Zotonic is made 
> self-signed keys are generated, which seems to indicate Zotonic doesn't like 
> the EC keys.
> 
> The mod_ssl_ca  page suggests that 
> only PCKS#1 & 8 are supported,  but it appears that Erlang now supports EC 
> keys. Is it possible Zotonic could support new EC keys?
> 
> FYI: header for EC keys
> -BEGIN EC PRIVATE KEY-
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/d4f9206c-a24d-4b7c-801a-c1a9b452c40en%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/A7173253-4E1E-4A76-B1CE-2F4362EE5775%40me.com.


Re: [Zotonic-Dev] mod_payment(_stripe)

2024-04-23 Thread 'Marc Worrell' via Zotonic developers
Hi,

Actually, that sounds like a kind of “eternal” membership :-)
Maybe Stripe has a type of one-time-payment subscriptions?

The paysub module can dynamically assign a user group depending on the 
subscriptions.
The user group could then allow access to the content groups of your paid 
content.

Cheers, Marc



> On 20 Apr 2024, at 07:56, 'Seann Aswell' via Zotonic developers 
>  wrote:
> 
> Greetings Marc,
> 
> Okay, understand. 
> 
> I am hoping to automatically add users to a group (ie: members) after a 
> one-time payment is completed, allowing access to downloadable content and/or 
> certain pages. Will do some testing and see if mod_payment will do the trick.
> 
> Will follow-up if further help is needed.
> 
> Thanks again,
> Seann
> 
> On Friday, April 19, 2024 at 6:36:01 AM UTC-6 Marc Worrell wrote:
>> Hi!
>> 
>> Indeed paysub is in active development at the moment.
>> And it is geared for paid subscriptions.
>> 
>> The mod_payment (and friends) is more for one-off payments and simple 
>> recurring payments.
>> I think Driebit is using it - at least the 0.x version of the module(s).
>> As they are moving sites over to the 1.x they will definitely start using 
>> the new versions soon (if they don’t already).
>> 
>> Cheers, Marc
>> 
>> 
>> 
>> 
>> 
>>> On 19 Apr 2024, at 06:17, 'Seann Aswell' via Zotonic developers 
>>> > wrote:
>>> 
>> 
>>> Curious, is anyone using mod_payment with the 1.0-master branch?
>>> 
>>> Needing to implement basic payment functionality for sales of digital 
>>> goods, already have a Stripe account, and would prefer to use something 
>>> integrated with Zotonic if possible. However, not sure if it's been tested 
>>> or used with the lastest Zotonic?
>>> 
>>> It looks like mod_paysub is under development, but is focused on 
>>> subscriptions. Will it ultimately replace mod_payment?
>>> 
>>> 
>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Zotonic developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to zotonic-develop...@googlegroups.com <>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/zotonic-developers/1d448a59-76a2-452e-a6a0-c0b797b106c0n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/zotonic-developers/1d448a59-76a2-452e-a6a0-c0b797b106c0n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/71fa0c95-47c2-438c-8b56-ab3980f02f30n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/zotonic-developers/71fa0c95-47c2-438c-8b56-ab3980f02f30n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/4223BE8F-DE54-4E71-BA4F-70B5B3F34424%40me.com.


Re: [Zotonic-Dev] mod_payment(_stripe)

2024-04-19 Thread &#x27;Marc Worrell' via Zotonic developers
Hi!

Indeed paysub is in active development at the moment.
And it is geared for paid subscriptions.

The mod_payment (and friends) is more for one-off payments and simple recurring 
payments.
I think Driebit is using it - at least the 0.x version of the module(s).
As they are moving sites over to the 1.x they will definitely start using the 
new versions soon (if they don’t already).

Cheers, Marc




> On 19 Apr 2024, at 06:17, 'Seann Aswell' via Zotonic developers 
>  wrote:
> 
> Curious, is anyone using mod_payment with the 1.0-master branch?
> 
> Needing to implement basic payment functionality for sales of digital goods, 
> already have a Stripe account, and would prefer to use something integrated 
> with Zotonic if possible. However, not sure if it's been tested or used with 
> the lastest Zotonic?
> 
> It looks like mod_paysub is under development, but is focused on 
> subscriptions. Will it ultimately replace mod_payment?
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/1d448a59-76a2-452e-a6a0-c0b797b106c0n%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/2A7B6271-BEC6-4D01-A31C-A0D19FEA81DC%40me.com.


Re: [Zotonic-Dev] To Proxy or not to Proxy...

2024-03-26 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Seann,

We are generally running Zotonic directly on port 80/443 or just with firewall 
redirect rules.
In our cloud-init file we are now using the direct approach, as Maas-Maarten 
found that there is a problem with the firewall-redirecting taking up too many 
resources and not being able to handle the amount of connections they need.

Having a proxy indeed kind of doubles the request overhead.
We confirmed that in tests for ping-like requests and files.

There are a couple of reasons people do use a proxy:

- Being able to (with standard tools) block requesting IPs
- Manage certificates in a central way (if you have a sysop person)
- Separate responsibilities between sysop and devop.
- Extra logging via the proxy

There are a couple of reasons people do NOT use a proxy:

- Simple setup - less moving parts
- Let Zotonic handle all certificates
- Performance (useful for smaller servers)

Zotonic can log as well, we just don’t do it per default as the millions of log 
lines do not help.

We have been thinking about a simple access-log-counting thing.
Just didn’t have a customer yet that wanted it, and wanted to pay for it :-)

The email is almost always sent by Zotonic directly.

Unless there is a sysop responsible for all email, then sometimes the email is 
sent via a relay.
We also sent email via (for example) mailgun, which gives us better control of 
inbox placement with especially hotmail/outlook and still good email-address 
status via mod_mailgun.

We also receive email, sometimes via a relay on a central server (that also 
manages the corporate email addresses).
Most often just by directly listening on port 25.

Cheers,

Marc



> On 25 Mar 2024, at 21:30, 'Seann Aswell' via Zotonic developers 
>  wrote:
> 
> Question regarding the typical way Zotonic is deployed on (potentially) 
> high-traffic production sites.
> 
> How many people use Zotonic/Cowboy without a proxy in front? I read that the 
> creator of Cowboy recommends using a proxy, and many Elixir/Phoenix 
> developers appear to use a proxy also, partially for the security that having 
> a well-tested front end filtering bad requests can provide...along with nice 
> traffic stats.
> 
> I ask this question because I am setting up a new server now, and there are 
> two issues that have come up using HAProxy in front of Zotonic so far.
> 
> 1) There are some issues with Stripe/mod_payment(_stripe) that may be related 
> to Stripe headers being modified (need further testing).
> 2) It would be nice for Zotonic to send emails directly, rather than using an 
> external SMTP server. However, that requires Erlang compatible certificates, 
> which means overhauling the current certificate acquisition/distribution flow 
> and/or managing different certificates types for the Proxy and Zotonic.
> 
> In both cases it seems simpler to simply remove the proxy and let 
> Zotonic/Cowboy handle traffic directly. I read somewhere that MZeeman found 
> Zotonic was much faster without a proxy, but in his situation most users are 
> paying customers, not random internet users.
> 
> Any feedback is welcome...
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/39652344-de30-43dd-bd54-b2c23c89b5adn%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/CDAAC1A2-93ED-4B44-B512-F72C64064574%40me.com.


Re: [Zotonic-Dev] Content Blocks

2024-01-15 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Seann,

I would expect it to be:

> {% for blk in id.blocks %}
> {% include "blocks/_block_view_text.tpl" %}
> {% endfor %}


But that renders only blocks of the type ’text’.

The suffix _text is the type of the block, we added different templates for the 
different types.
You can see in the mod_survey how we use those to render the different 
questions.

That is also why we add the type of the block when including using the 
“_blocks.tpl”:

> {% for blk in m.rsc[id].blocks %}
> {% optional include ["blocks/_block_view_",blk.type,".tpl"]|join blk=blk 
> id=id %}
> {% endfor %}

(id.blocks is shorthand for m.rsc[id].blocks)

Cheers, Marc


> On 15 Jan 2024, at 09:32, 'Seann Aswell' via Zotonic developers 
>  wrote:
> 
> When I use the following, without .title on the end, it works.
> 
> {% for blk in id.blocks.name %}
> {% include "blocks/_block_view_text.tpl" %}
> {% endfor %}
> 
> If there is a better way, let me know. 
> 
> Else, thanks again. Much appreciated.
> On Sunday, January 14, 2024 at 3:23:27 AM UTC-7 Marc Worrell wrote:
>> You can use:
>> 
>> id.blocks.name.title
>> 
>> Where “title” is a property of the block. And name is the name of your block.
>> 
>> If your name includes spaces:
>> 
>> id.blocks[“name of block”].title
>> 
>> Cheers, Marc
>> 
>> 
>> 
>> Sent from my iPhone
>> 
>>> On 14 Jan 2024, at 09:32, 'Seann Aswell' via Zotonic developers 
>>> > wrote:
>>> 
>>> 
>> 
>>> Very interesting...
>>> 
>>> So, if I add a Header block called "header1" and a Text block called 
>>> "text1", are those fields directly addressable using something like 
>>> "blk.name <http://blk.name/>"?
>>> 
>>> For instance, I see in "_block_view_page_inline.tpl 
>>> <https://github.com/zotonic/zotonic/blob/master/apps/zotonic_mod_zotonic_site_management/priv/skel/blog/priv/templates/blocks/_block_view_page_inline.tpl>":
>>> 
>>> {% for blk in id.blocks %}
>>> {% if blk.type == "header" %}
>>> 
>>> Is there a blk.name <http://blk.name/> variable associated with the name of 
>>> the block added? If so, can you recommend how to address each block via 
>>> name directly?
>>> 
>>> What I am hoping to achieve is to have one resource with multiple Header 
>>> and Text blocks, but I need to address each one directly, to display in a 
>>> particular place in the HTML layout. However, I am unsure how to display a 
>>> specific blk by name, rather than listing them all as the above example 
>>> shows.
>>> 
>>> The flexibility you built into the system is impressive, but I am still 
>>> learning my way around...
>>> 
>>> On Saturday, January 13, 2024 at 5:14:14 AM UTC-7 Marc Worrell wrote:
>>>> Hi!
>>>> 
>>>> There are nested in the “blocks” property. 
>>>> 
>>>> You can check the _blocks.tpl here:
>>>> 
>>>> 
>>>> 
>>>> zotonic/apps/zotonic_mod_base/priv/templates/_blocks.tpl at master · 
>>>> zotonic/zotonic
>>>> github.com
>>>>  
>>>> <https://github.com/zotonic/zotonic/blob/master/apps/zotonic_mod_base/priv/templates/_blocks.tpl>zotonic/apps/zotonic_mod_base/priv/templates/_blocks.tpl
>>>>  at master · zotonic/zotonic 
>>>> <https://github.com/zotonic/zotonic/blob/master/apps/zotonic_mod_base/priv/templates/_blocks.tpl>
>>>> github.com 
>>>> <https://github.com/zotonic/zotonic/blob/master/apps/zotonic_mod_base/priv/templates/_blocks.tpl>
>>>> 
>>>> Cheers, marc 
>>>> 
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>>> On 11 Jan 2024, at 21:51, 'Seann Aswell' via Zotonic developers 
>>>>> > wrote:
>>>>> 
>>>>> 
>>>> 
>>>>> Another question...
>>>>> 
>>>>> In the admin there is the option of adding content blocks to resources, 
>>>>> which seems really handy. 
>>>>> 
>>>>> How can I address the additional blocks in HTML? I am obviously missing 
>>>>> something, as I do not see any properties defined in m_rsc 
>>>>> <https://zotonic.com/docs/1278/m_rsc> regarding content blocks.
>>>>> 
>>>>> Currently on a few webpa

Re: [Zotonic-Dev] Content Blocks

2024-01-14 Thread &#x27;Marc Worrell' via Zotonic developers
You can use:id.blocks.name.titleWhere “title” is a property of the block. And name is the name of your block.If your name includes spaces:id.blocks[“name of block”].titleCheers, MarcSent from my iPhoneOn 14 Jan 2024, at 09:32, 'Seann Aswell' via Zotonic developers  wrote:Very interesting...So, if I add a Header block called "header1" and a Text block called "text1", are those fields directly addressable using something like "blk.name"? For instance, I see in "_block_view_page_inline.tpl":    {% for blk in id.blocks %}        {% if blk.type == "header" %}Is there a blk.name variable associated with the name of the block added? If so, can you recommend how to address each block via name directly?What I am hoping to achieve is to have one resource with multiple Header and Text blocks, but I need to address each one directly, to display in a particular place in the HTML layout. However, I am unsure how to display a specific blk by name, rather than listing them all as the above example shows.The flexibility you built into the system is impressive, but I am still learning my way around...On Saturday, January 13, 2024 at 5:14:14 AM UTC-7 Marc Worrell wrote:Hi!There are nested in the “blocks” property. You can check the _blocks.tpl here:zotonic/apps/zotonic_mod_base/priv/templates/_blocks.tpl at master · zotonic/zotonicgithub.comCheers, marc Sent from my iPhoneOn 11 Jan 2024, at 21:51, 'Seann Aswell' via Zotonic developers <zotonic-d...@googlegroups.com> wrote:Another question...In the admin there is the option of adding content blocks to resources, which seems really handy. How can I address the additional blocks in HTML? I am obviously missing something, as I do not see any properties defined in m_rsc regarding content blocks.Currently on a few webpages, I have added multiple resources and called {id.body} multiple times in HTML to achieve the same affect...



-- 

--- 
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/971f861c-3850-4fe1-b1fc-815c4d6ba794n%40googlegroups.com.




-- 

--- 
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/f442e3c8-8ef6-4b9a-b8f9-5425de3acbe7n%40googlegroups.com.




-- 

--- 
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/859943B7-DBAC-4054-83D4-013D8B9FA0C6%40me.com.


Re: [Zotonic-Dev] Dmain Name Change

2024-01-09 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

You can just change the hostname in your config.
We mostly add the old hostnames to the hostalias, so that previous domain names 
still redirect to the new one.

No need to change databases.

Don’t forget to request a new SSL certificate.

Cheers, Marc



> On 9 Jan 2024, at 05:11, 'Seann Aswell' via Zotonic developers 
>  wrote:
> 
> So, I have populated a site with data, which at this point is over 200 items. 
> It consists of Categories and Predicates, Media items and Location data, lots 
> of information has been entered.
> 
> However, the domain name of the site needs to change. 
> 
> Can I simply create a new database, import the old schema, and point the 
> zotronic.site.config file to the new database? Or, is the site domain stored 
> within the database?
> 
> Any hints on how to proceed would be much appreciated...
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/fcc9f8c1-1a3f-42e0-bf96-f0c072cf2eeen%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/1CEB67B8-3C3C-42DC-9559-AE7051481C51%40me.com.


Re: [Zotonic-Dev] How to start a new Zotonic based project?

2024-01-04 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

We have a init file that can be used for Hetzner instances.

https://github.com/zotonic/zotonic/blob/master/cloud-init/zotonic-cloudinit.yml


We have still to update it for Ubuntu 22 - currently you can do an upgrade 
after installation.

What we often do is:

- The above script
- Checkout the website repo on the correct branch into ~zotonic/
- Symlink from ~zotonic/zotonic/apps_user/  to the website repo
- We also make sure that there is a local priv/zotonic_site.config or that in 
priv/config.d/ there is a config with the local information.
- Just run Zotonic from ~zotonic/zotonic with "bin/zotonic start"

You can also add this start command to the startup scripts of the server, so 
that after reboot the site will start.

As the site is now checked out from git, a deploy is just a click on the update 
button in /admin/status

We periodically just update zotonic from upstream, also with git pull.
Normally this can be done as a hot code upgrade, otherwise a quick stop, pull, 
make, start will do the trick.

The above is the lazy and low-tech approach.
At Driebit they work with Docker images.
And on our wish list for this year is to start making real releases (looking 
into some rebar3 issue for that…)

If you enable and configure mod_filestore and mod_backup, then you can have 
extra backups of all your data on a storage box.
(Besides the backups that Hetzner is doing for you.)

If the rebar3 issue is resolved then we can release Zotonic 1.0 and will update 
all Hex packages.

Cheers!

Marc




> On 4 Jan 2024, at 07:15, Carlo Ascani  wrote:
> 
> Greetings,
> 
> I want to pitch (for the second time) Zotonic at the company I am working for.
> 
> This time I have a better plan:
> I want to build a CMS to manage a conference website, and I want to do it 
> right,
> with tests, a somehow nice frontend, fake data and an easy deploy process
> on an Hetzner vps.
> 
> IIUC you can't just add Zotonic as a dependency in a rebar project,
> you have to bring in the whole source code, so my question is:
> - How do you organize the source code for a website?
> 
> - Do I have to fork and clone Zotonic source and work there?
> - If so, how could I keep the Zotonic part of the repo in sync with upstream?
> - Are there any other strategies?
> 
> Thank you and Happy New Year to all of you!
> Cheers
> 
> Carlo
>
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/8bf82611-aaba-4aa3-842e-09cf10e4a27bn%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/729EE9D0-72DF-4F50-88C7-CEC983A87F8A%40me.com.


Re: [Zotonic-Dev] Sending emails

2023-12-05 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

In the zotonic.config there are these settings:


%%% SMTP outbound relay configuration.
%%% Zotonic will send email itself, enable a relay if outgoing port 25 traffic 
is blocked.
   %% {smtp_relay, false},
   %% {smtp_host, "localhost"},
   %% {smtp_port, 25},
   %% {smtp_ssl, false},
   %% {smtp_username, undefined},
   %% {smtp_password, undefined},

%%% SMTP send all email into a blackhole, ideal for testing large mailings
   %% {smtp_is_blackhole, false},

%%% SMTP extra relay options:
%%% some picky/buggy/misconfigured relays might need one of these to be enabled.
   %% {smtp_no_mx_lookups, false},
   %% {smtp_verp_as_from, false},
   %% {smtp_bounce_email_override, "m...@example.com"},

%%% SMTP mail queue.
%%% How long to keep sent messages in the mail queue (in minutes).
%%% Leave it long enough to receive any bounce message.
   %% {smtp_delete_sent_after, 240},

%%% SMTP debug options.
%%% Send a copy of outgoing mail to this address:
   %% {smtp_bcc, "bcc@localhost"},
%%% Send all mail to this address instead of the original recipient:
   %% {email_override, "override@localhost"},

I have them on my dev machine as follows (with some redacted secrets):


%%% SMTP outbound relay configuration.
%{smtp_is_blackhole, true},
{smtp_relay,true},
{smtp_host,”smtp.myisp.nl"},
{smtp_port,587},
{smtp_username, “m.worr...@myisp.nl"},
{smtp_password, “…."},
   %% {smtp_ssl, true},

%%% SMTP extra relay options:
%%% some picky/buggy/misconfigured relays might need one of these to be enabled.
{smtp_no_mx_lookups,true},
{smtp_verp_as_from,true},
{smtp_bounce_email_override,"m...@worrell.nl"},

%%% SMTP mail queue.
%%% How long to keep sent messages in the mail queue (in minutes).
%%% Leave it long enough to receive any bounce message.
   %% {smtp_delete_sent_after, 240},

%%% SMTP debug options.
%%% Send a copy of outgoing mail to this address:
   %% {smtp_bcc, "bcc@localhost"},
%%% Send all mail to this address instead of the original recipient:
   %% {email_override, "override@localhost"},
{email_override, "m...@worrell.nl"},



> On 5 Dec 2023, at 00:55, carnel yve  wrote:
> 
> I have been slowly learning how zotonic works and couldn't get email to work 
> locally.
> My emails are bouncing. I am sure there is a trick for make mail servers to 
> accept emails sent from zotonic. Just couldn't find. I thought about adding 
> the " email_from" configuration to the zotonic_site.config, but it didn't 
> change anything.
> Any idea how to get email sending work?
> Thanks.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/e9c42185-51a8-4595-93f9-edd3eb4a7053n%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/2C883A54-2418-4CE9-96D4-05C055E94774%40me.com.


Re: [Zotonic-Dev] bin/zotonic config | grep password

2023-12-04 Thread &#x27;Marc Worrell' via Zotonic developers
Maybe we should just remove (or discourage to use) those docker images - we 
don’t use them ourselves as running native is much faster and easier for 
development.

Cheers, Marc



> On 3 Dec 2023, at 23:31, carnel yve  wrote:
> 
> I ended up compiling the project myself and not using docker. I am now able 
> to go past the status page.
> Thank you for your time. :-) 
> 
> On Sunday, December 3, 2023 at 5:01:10 PM UTC+1 carnel yve wrote:
>> 
>> THis is the status page url: https://localhost:8443/zotonic/status
>> I have been trying with wwwadmin.
>> To get the password, I run "bin/zotonic config" | grep password".  I do it 
>> inside the container.
>> Then I get the message:
>> Either the email or the password you entered is incorrect. Please try again.
>> Thank you for this amazing piece of software.
>> On Sunday, December 3, 2023 at 3:21:10 PM UTC+1 Marc Worrell wrote:
>>> Did you use the username wwwadmin?
>>> 
>>> For sites it is admin, for the Zotonic status site it is wwwadmin.
>>> 
>>> Cheers, Marc
>>> 
>>> 
>>> 
>>> Sent from my iPhone
>>> 
>>>> On 3 Dec 2023, at 13:42, carnel yve > wrote:
>>>> 
>>>> 
>>> 
>>>> I have just installed zotonic and wanted to take it for a ride. I can't 
>>>> seem to get past the first screen, because the password is not correct. I 
>>>> have been locked out many times for hours because of "too many errors".
>>>> This is the page of the doc I am following:
>>>> https://zotonic.com/docs/1411/docker
>>>> Have things changed?
>>>> Thanks.
>>>> 
>>> 
>>>> -- 
>>>> 
>>>> --- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Zotonic developers" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to zotonic-develop...@googlegroups.com <>.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/zotonic-developers/f354bba2-0b72-45c6-b015-bf198019bf9en%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/zotonic-developers/f354bba2-0b72-45c6-b015-bf198019bf9en%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/0749323f-c66f-433e-84ba-68ef96cc99ban%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/zotonic-developers/0749323f-c66f-433e-84ba-68ef96cc99ban%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/800B3229-7BAF-42D3-9D8C-715F40C354F3%40me.com.


Re: [Zotonic-Dev] Testing mod_signup

2023-12-04 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

Any example templates we provide are very simple, so they don’t provide signup 
links etc.

Having said that, the signup module should add a link in the login screen to 
signup.

Cheers, Marc



> On 4 Dec 2023, at 00:16, carnel yve  wrote:
> 
> I am trying the user registration module. I activated it in the admin panel 
> but I am not sure how the site is supposed to show the signup.
> Thanks.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/38fb1432-9e59-40aa-afba-55881465449an%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/F00334DC-EDC1-4FAE-BB08-7982725E67F9%40me.com.


Re: [Zotonic-Dev] bin/zotonic config | grep password

2023-12-03 Thread &#x27;Marc Worrell' via Zotonic developers
Did you use the username wwwadmin?For sites it is admin, for the Zotonic status site it is wwwadmin.Cheers, MarcSent from my iPhoneOn 3 Dec 2023, at 13:42, carnel yve  wrote:I have just installed zotonic and wanted to take it for a ride. I can't seem to get past the first screen, because the password is not correct. I have been locked out many times for hours because of "too many errors".This is the page of the doc I am following:https://zotonic.com/docs/1411/dockerHave things changed?Thanks.



-- 

--- 
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/f354bba2-0b72-45c6-b015-bf198019bf9en%40googlegroups.com.




-- 

--- 
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/1086850D-D182-4445-8520-3070F0F77CE2%40me.com.


Re: [Zotonic-Dev] Just some information for a novice

2023-03-21 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Carlo,

Welcome!

> On 21 Mar 2023, at 06:55, Carlo Ascani  wrote:
> 
> Greetings,
> 
> I would like to explore alternative to Elixir/Phoenix and Python/Django to 
> develop CRUD admin interfaces.
> 
> My goal is to:
> - Render a data table which displays all the records of a specific Resource 
> Category

That is easy, especially if your data is a resource (aka page).
In that case you can use the generic resource and query routines.

If your data is a special table then you can directly access your models from 
the templates.

> - Render links to RUD actions for each record

We use mostly async messages for this kind of actions.
The messages are posted over the MQTT message bus to the server (and back to 
the client).

You can use “wired” events for which we have all kinds of actions.

Or you can use (or bind) topics to post messages to the server (models).

> - Render forms to CRU the Resource Category

We don’t have routines to automatically generate forms.


> Before starting getting my hands dirty with Zotonic,
> I am asking if such a thing is possible (I believe so).
> 
> For example, let's say my resource category is a Material, that has a color 
> and a name.
> Can the Material be presented in the Zotonic admin interface as if it is NOT 
> a page?
> Or must everything be a page?

Our philosophy is that everything is a thing.

That is until it isn’t.  For example with payments, which need specific 
administration and access.
For those we add extra pages and menu items in the admin.

> That is my only concern, IIUC Zotonic is specific for blogs?

No it is a generic content management framework, geared towards semantic data.

See some examples here:

https://zotonic.com/made-with-zotonic

> I am sorry for the silly questions, I would accept a RTFM as an answer.

You are welcome :-)

You can also read an introduction to some concepts and ideas behind Zotonic:

https://zotonic.com/page/2192/the-rationale-of-zotonic


Cheers, Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/53473054-A10C-420D-991E-79F789BF967C%40me.com.


[Zotonic-Dev] Looking for proof readers

2020-12-17 Thread Marc Worrell
Hi,

To continu with the previous email.

We are looking for proof readers of the translations.

If you have interest, please e-mail us or apply at 
https://crowdin.com/project/zotonic

We want to make Zotonic available in many languages!

Cheers, 

Michiel, Maas-Maarten, and Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/5D2E32A5-D76B-4D0E-ABA0-AD955424F5CF%40worrell.nl.


[Zotonic-Dev] Moving translations to Crowdin

2020-12-17 Thread Marc Worrell
Hi,

We are in the process of moving our translations to Crowdin.

This enables easier management of the translation work.

The “zotonic.pot” file from Zotonic master will be automatically synchronized 
to Crowdin.
In Crowdin we can then translate and proofread translations.

After translation Crowdin generates a merge request for the generated .po files.

If you are missing a language, please let us know.

https://crowdin.com/project/zotonic

We did already upload some .po files which we know are good.

If you have translated .po files, please mail them to us, then we can manually 
upload them to Crowdin.

After this initial work all translations will be managed in Crowdin.

Cheers,

Michiel, Maas-Maarten and Marc


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/FD786D82-5409-4C79-93B0-BE62C07491D7%40worrell.nl.


[Zotonic-Dev] Zotonic Release 0.58.0

2020-11-09 Thread Marc Worrell
Hi,

We have released Zotonic version 0.58.0.
This is a maintenance release.

Main changes are:

• {% image %} tags now have a width and height attribute, use the nowh option 
to suppress generation of the width and height attributes
• Fix for a problem where an ACL deny rule could restrict too much
• Support to store JSON in PostgreSQL
• Fix a problem with Twitter/Facebook/LinkedIn authentication and Safari 14
• Fix a problem where very large dates could give unexpected results
• Better TLS cipher suite selection for SSL connections
• Allow custom formatters to show an error on empty input values

To fix sites that break on the width/height attributes on image tags there is 
an option added to the zotonic.config file: media_tag_nowh
If the media_tag_nowh option is set to true then all {% image %} tags have the 
nowh option added. Effectively suppressing the generation of width and height 
attributes.
Note that this option is not available on the 1.x version and later of Zotonic.

If you have css like:

img {
max-width: 100%;
}

Then add one line:

img {
max-width: 100%;
height: auto;
}

See the full release notes at 
http://docs.zotonic.com/en/latest/developer-guide/releasenotes/rel_0.58.0.html 


And download at: https://github.com/zotonic/zotonic/releases/tag/0.58.0 


Cheers,

The Zotonic Core Team

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/89EB5932-1312-4D08-B815-D8AA36BF67E4%40worrell.nl.


Re: [Zotonic-Dev] Lost access to website admin panel

2020-08-31 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Rishit,

Sorry for that email - something went wrong there.

You can find the passwords for the admin users in two different files.

Is it a 0.x version?  For now I assume it is.

The admin password for the zotonic status site can be found in:

~/.zotonic/0/zotonic.config

The admin password for the site can be found in:

zotonic/user/sites//config

Where “zotonic” is the directory of zotonic.

Hope this helps.

Cheers, Marc


> On 31 Aug 2020, at 18:13, Rishit Patel  wrote:
> 
> Hi,
> 
> We have lost access to admin panel of a website that uses Zotonic. I have 
> emailed Zotonic support at zoto...@maximonster.com. But, they haven't replied 
> me yet. What should I do? 
> 
> Thanks in advance.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/cf3f649c-53c7-4102-b48b-b420d51c1144n%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/1C7CE870-B4C8-44E5-A61D-893342647B02%40me.com.


[Zotonic-Dev] Supported OTP versions

2020-06-27 Thread Marc Worrell
Hi,

Tomorrow we will merge the fixes for OTP23 into master.

This will remove support for OTP20 and earlier form the master (1.0-dev) 
version.

The 0.x version will stay compatible with OTP18 through OTP22.

Cheers,

Marc




Sent from my iPhone

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/1C271B44-F20C-44AE-9CC6-8923A0ED644D%40worrell.nl.


[Zotonic-Dev] Supported OTP versions

2020-06-26 Thread Marc Worrell
Hi,

With the advent of OTP-23 there are some changes in the support of NIF 
functions.
This affected bcrypt, which we use for password encryption.

We have released a new version of bcrypt that works on OTP-23.
The new version is using APIs that are available since OTP-21.

Consequence is that if we want to support OTP-23 then we have to drop support 
for OTP-20 and older.

The proposal right now, is to indeed drop support on master for OTP20 and older.
Only OTP-21 and newer will then be supported.

I am curious which OTP versions are used right now and if this decision will 
badly affect anyone.
Or that, which I suspect, most are already using OTP-21 and newer.

Cheers,

Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/0C756CB2-2E74-48E4-80A0-BF0B5A60EFC4%40worrell.nl.


[Zotonic-Dev] Zotonic version 0.57.1 released

2020-05-19 Thread Marc Worrell
Hi,

We have released Zotonic version 0.57.1

This includes:

 * fix for https and OTP-22, all should work well with OTP-22 now
 * a method to temporarily disable surveys


Full release notes and more information here:

https://github.com/zotonic/zotonic/releases/tag/0.57.1 


Cheers,

The Zotonic Team.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/B41D33CA-2ED7-4CF4-BBD4-DC2788D17A8A%40worrell.nl.


Re: [Zotonic-Dev] Zotonic 0.57.0 - ssl Inssuficient Security - no_suitable_cipher error

2020-05-18 Thread &#x27;Marc Worrell' via Zotonic developers
Great!

Will release the 0.57.1 today, was waiting on your test result.

We have a rule that we follow the last 3 OTP releases.

That is, there is some work to do for OTP-23, especially in some dependencies.

For the 0.x we are supporting 19+ due to production servers.
For the 1.x series (aka master) we are supporting 20+, and might change that to 
21+.

At the moment I am not too concerned about the deprecation warnings.
We can fix those in due time.

Happy that you got everything up & running,

Cheers, Marc



> On 19 May 2020, at 02:54, Alvaro Pagliari  wrote:
> 
> Hello Marc,
> 
> Yep, now it works!! 
> 
> Maybe my git pull --all didn't work last time and I haven't noticed.
> 
> I do remember that erlware_commons was not downloading this version 
> a8b46e077034938fd82f57876103270311e6835b because I tried to change it but 
> with no luck.
> 
> My rebar version is the same as yours.
> 
> There are some compilation warnings, how is the policy for erlang version x 
> zotonic version? 
> 
> Cheers,
>  
> --
> Álvaro Gianni Pagliari
> alvaropag [at] gmail [dot] com
> 
> 
> Em seg., 18 de mai. de 2020 às 12:20, 'Marc Worrell' via Zotonic developers 
>  <mailto:zotonic-developers@googlegroups.com>> escreveu:
> Hi Alvaro,
> 
> That is strange.
> 
> I also did a clean build on OTP-22 without problems.
> And our Travis-CI build on 22 also works.
> 
> I am also using OTP 22.3
> (Quite recent build)
> 
> Which version of erlware_commons do you end up with?
> 
> I am at a8b46e077034938fd82f57876103270311e6835b
> 
> Maybe your rebar needs updating?
> 
> I have:
> 
>> zotonic-0.x marc$ ./rebar --version
>> rebar 2.6.4 17 20160831_145136 git 2.6.4-dirty
> 
> Cheers,
> 
> Marc
> 
> 
> 
> 
>> On 17 May 2020, at 20:52, Alvaro Pagliari > <mailto:alvaro...@gmail.com>> wrote:
>> 
>> Hello Marc,
>> 
>> Unfortunately it didn't work, I follow these steps on zotonic directory:
>> 
>> git pull --all
>> git checkout 0.x
>> make clean
>> cd deps
>> rm -rf */
>> cd ..
>> make
>> 
>> The following error was shown
>> 
>> ==> erlware_commons (compile)
>> /home/alvaro/devel/zotonic_leal/deps/erlware_commons/src/ec_plists.erl:834: 
>> erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for 
>> retrieving the stack backtrace
>> /home/alvaro/devel/zotonic_leal/deps/erlware_commons/src/ec_plists.erl:836: 
>> erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for 
>> retrieving the stack backtrace
>> Compiling 
>> /home/alvaro/devel/zotonic_leal/deps/erlware_commons/src/ec_plists.erl 
>> failed:
>> ERROR: compile failed while processing 
>> /home/alvaro/devel/zotonic_leal/deps/erlware_commons: rebar_abort
>> make: *** [GNUmakefile:56: compile] Error 1
>> 
>> I'm trying with erlang 22.3 built through kerl.
>> 
>> Cheers,
>> 
>> --
>> Álvaro Gianni Pagliari
>> alvaropag [at] gmail [dot] com
>> 
>> 
>> Em sex., 15 de mai. de 2020 às 12:39, 'Marc Worrell' via Zotonic developers 
>> > <mailto:zotonic-developers@googlegroups.com>> escreveu:
>> Hi Alvaro,
>> 
>> Could you try again with the now updated 0.x?
>> 
>> I was able to reproduce the issue and updated our mochiweb branch.
>> 
>> We still have a funky crash of lager at the start, but ignore that for now.
>> 
>> Cheers, Marc
>> 
>> 
>>> On 12 May 2020, at 20:47, Alvaro Pagliari >> <mailto:alvaro...@gmail.com>> wrote:
>>> 
>>> Hello Marc,
>>> 
>>> Sorry, I wasn't clear, this error is from my local development machine, I'm 
>>> using:
>>> Kubuntu 20.04
>>> OpenSSL 1.1.1f   31 Mar 2020
>>> Chrome 81.0.4044.138
>>> Erlang 22.3
>>> Zotonic 0.57.0
>>> 
>>> Is there a place within Zotonic or Erlang to enable these ciphers? I saw in 
>>> the Zotonic documentation for version 1.0 that it's possible to implement a 
>>> function to add SSL options 
>>> <http://docs.zotonic.com/en/latest/ref/configuration/port-ssl-configuration.html#adding-your-own-ssl-options-or-certificates>,
>>>  but I don't know if it's supported on 0.x and if it's the correct way to 
>>> handle this.
>>> 
>>> I sending as an attachment the versions and cipher suites of both erlang 
>>> 20.3 (the one I'm using with zotonic 0.56.0) and 22.3.
>>> 
>>> I appreciate it if you can give a look at i

Re: [Zotonic-Dev] Zotonic 0.57.0 - ssl Inssuficient Security - no_suitable_cipher error

2020-05-18 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Alvaro,

That is strange.

I also did a clean build on OTP-22 without problems.
And our Travis-CI build on 22 also works.

I am also using OTP 22.3
(Quite recent build)

Which version of erlware_commons do you end up with?

I am at a8b46e077034938fd82f57876103270311e6835b

Maybe your rebar needs updating?

I have:

> zotonic-0.x marc$ ./rebar --version
> rebar 2.6.4 17 20160831_145136 git 2.6.4-dirty

Cheers,

Marc




> On 17 May 2020, at 20:52, Alvaro Pagliari  wrote:
> 
> Hello Marc,
> 
> Unfortunately it didn't work, I follow these steps on zotonic directory:
> 
> git pull --all
> git checkout 0.x
> make clean
> cd deps
> rm -rf */
> cd ..
> make
> 
> The following error was shown
> 
> ==> erlware_commons (compile)
> /home/alvaro/devel/zotonic_leal/deps/erlware_commons/src/ec_plists.erl:834: 
> erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for 
> retrieving the stack backtrace
> /home/alvaro/devel/zotonic_leal/deps/erlware_commons/src/ec_plists.erl:836: 
> erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for 
> retrieving the stack backtrace
> Compiling 
> /home/alvaro/devel/zotonic_leal/deps/erlware_commons/src/ec_plists.erl failed:
> ERROR: compile failed while processing 
> /home/alvaro/devel/zotonic_leal/deps/erlware_commons: rebar_abort
> make: *** [GNUmakefile:56: compile] Error 1
> 
> I'm trying with erlang 22.3 built through kerl.
> 
> Cheers,
> 
> --
> Álvaro Gianni Pagliari
> alvaropag [at] gmail [dot] com
> 
> 
> Em sex., 15 de mai. de 2020 às 12:39, 'Marc Worrell' via Zotonic developers 
>  <mailto:zotonic-developers@googlegroups.com>> escreveu:
> Hi Alvaro,
> 
> Could you try again with the now updated 0.x?
> 
> I was able to reproduce the issue and updated our mochiweb branch.
> 
> We still have a funky crash of lager at the start, but ignore that for now.
> 
> Cheers, Marc
> 
> 
>> On 12 May 2020, at 20:47, Alvaro Pagliari > <mailto:alvaro...@gmail.com>> wrote:
>> 
>> Hello Marc,
>> 
>> Sorry, I wasn't clear, this error is from my local development machine, I'm 
>> using:
>> Kubuntu 20.04
>> OpenSSL 1.1.1f   31 Mar 2020
>> Chrome 81.0.4044.138
>> Erlang 22.3
>> Zotonic 0.57.0
>> 
>> Is there a place within Zotonic or Erlang to enable these ciphers? I saw in 
>> the Zotonic documentation for version 1.0 that it's possible to implement a 
>> function to add SSL options 
>> <http://docs.zotonic.com/en/latest/ref/configuration/port-ssl-configuration.html#adding-your-own-ssl-options-or-certificates>,
>>  but I don't know if it's supported on 0.x and if it's the correct way to 
>> handle this.
>> 
>> I sending as an attachment the versions and cipher suites of both erlang 
>> 20.3 (the one I'm using with zotonic 0.56.0) and 22.3.
>> 
>> I appreciate it if you can give a look at it (no hurry, hehe).
>> 
>> Cheers!
>> 
>> --
>> Álvaro Gianni Pagliari
>> alvaropag [at] gmail [dot] com
>> 
>> 
>> Em ter., 12 de mai. de 2020 às 15:13, 'Marc Worrell' via Zotonic developers 
>> > <mailto:zotonic-developers@googlegroups.com>> escreveu:
>> A quick search gave me this:
>> 
>> https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-826 
>> <https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-826>
>> 
>> Is your server up to date with the ciphers?
>> 
>> Tomorrow I can check my local install against OTP-22.
>> 
>> Cheers, Marc
>> 
>> 
>> 
>> Sent from my iPhone
>> 
>>> On 12 May 2020, at 19:35, Alvaro Pagliari >> <mailto:alvaro...@gmail.com>> wrote:
>>> 
>>> 
>>> Hello,
>>> 
>>> I just updated my local zotonic installation to 0.57.0 with erlang 22.3. It 
>>> starts normally, but when I try to access one of the sites this error pops 
>>> up:
>>> 
>>> TLS server: In state start at tls_handshake_1_3.erl:1932 generated SERVER 
>>> ALERT: Fatal - Insufficient Security 
>>> - no_suitable_cipher
>>> 
>>> I removed my certs and let zotonic recreate them, also tried to remove and 
>>> create a new dh-params.pem but with no luck.
>>> 
>>> Do I need to enable a new module? Maybe some configuration changed?
>>> 
>>> Any help is appreciated, thanks!
>>> 
>>> --
>>> Álvaro Pagliari
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed

Re: [Zotonic-Dev] Zotonic 0.57.0 - ssl Inssuficient Security - no_suitable_cipher error

2020-05-15 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Alvaro,

Could you try again with the now updated 0.x?

I was able to reproduce the issue and updated our mochiweb branch.

We still have a funky crash of lager at the start, but ignore that for now.

Cheers, Marc


> On 12 May 2020, at 20:47, Alvaro Pagliari  wrote:
> 
> Hello Marc,
> 
> Sorry, I wasn't clear, this error is from my local development machine, I'm 
> using:
> Kubuntu 20.04
> OpenSSL 1.1.1f   31 Mar 2020
> Chrome 81.0.4044.138
> Erlang 22.3
> Zotonic 0.57.0
> 
> Is there a place within Zotonic or Erlang to enable these ciphers? I saw in 
> the Zotonic documentation for version 1.0 that it's possible to implement a 
> function to add SSL options 
> <http://docs.zotonic.com/en/latest/ref/configuration/port-ssl-configuration.html#adding-your-own-ssl-options-or-certificates>,
>  but I don't know if it's supported on 0.x and if it's the correct way to 
> handle this.
> 
> I sending as an attachment the versions and cipher suites of both erlang 20.3 
> (the one I'm using with zotonic 0.56.0) and 22.3.
> 
> I appreciate it if you can give a look at it (no hurry, hehe).
> 
> Cheers!
> 
> --
> Álvaro Gianni Pagliari
> alvaropag [at] gmail [dot] com
> 
> 
> Em ter., 12 de mai. de 2020 às 15:13, 'Marc Worrell' via Zotonic developers 
>  <mailto:zotonic-developers@googlegroups.com>> escreveu:
> A quick search gave me this:
> 
> https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-826 
> <https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-826>
> 
> Is your server up to date with the ciphers?
> 
> Tomorrow I can check my local install against OTP-22.
> 
> Cheers, Marc
> 
> 
> 
> Sent from my iPhone
> 
>> On 12 May 2020, at 19:35, Alvaro Pagliari > <mailto:alvaro...@gmail.com>> wrote:
>> 
>> 
>> Hello,
>> 
>> I just updated my local zotonic installation to 0.57.0 with erlang 22.3. It 
>> starts normally, but when I try to access one of the sites this error pops 
>> up:
>> 
>> TLS server: In state start at tls_handshake_1_3.erl:1932 generated SERVER 
>> ALERT: Fatal - Insufficient Security 
>> - no_suitable_cipher
>> 
>> I removed my certs and let zotonic recreate them, also tried to remove and 
>> create a new dh-params.pem but with no luck.
>> 
>> Do I need to enable a new module? Maybe some configuration changed?
>> 
>> Any help is appreciated, thanks!
>> 
>> --
>> Álvaro Pagliari
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com 
>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/zotonic-developers/6e086be6-7392-4c53-b473-47a2734f6d1e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/zotonic-developers/6e086be6-7392-4c53-b473-47a2734f6d1e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/8FAC43F8-CDC1-4002-B9D9-A1AE8E93A0A6%40mac.com
>  
> <https://groups.google.com/d/msgid/zotonic-developers/8FAC43F8-CDC1-4002-B9D9-A1AE8E93A0A6%40mac.com?utm_medium=email&utm_source=footer>.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/CAOuQNV1VRBrbo-UxDonPv1TO2cuj3iitCpjjmLFsj3KV8K7SLg%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/zotonic-developers/CAOuQNV1VRBrbo-UxDonPv1TO2cuj3iitCpjjmLFsj3KV8K7SLg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/F846BA95-FE71-4762-8535-5A30A3E211FD%40me.com.


[Zotonic-Dev] Breaking change

2020-05-15 Thread Marc Worrell
Hi,

I am merging some changes into the master.

There is one breaking change, but that will make some things a bit simpler.

Check your templates for:

{% for cat, _true in m.rsc[id].is_a %}

(or “in id.is_a”)

And change it into:

{% for cat in m.rsc[id].is_a %}

(So no “, _true” anymore)

That is all.

Cheers,

Marc


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/97BE5135-B612-4ED8-ADEE-51DBD8FF3D28%40worrell.nl.


Re: [Zotonic-Dev] Zotonic 0.57.0 - ssl Inssuficient Security - no_suitable_cipher error

2020-05-12 Thread &#x27;Marc Worrell' via Zotonic developers
A quick search gave me this:

https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-826

Is your server up to date with the ciphers?

Tomorrow I can check my local install against OTP-22.

Cheers, Marc



Sent from my iPhone

> On 12 May 2020, at 19:35, Alvaro Pagliari  wrote:
> 
> 
> Hello,
> 
> I just updated my local zotonic installation to 0.57.0 with erlang 22.3. It 
> starts normally, but when I try to access one of the sites this error pops up:
> 
> TLS server: In state start at tls_handshake_1_3.erl:1932 generated SERVER 
> ALERT: Fatal - Insufficient Security
> - no_suitable_cipher
> 
> I removed my certs and let zotonic recreate them, also tried to remove and 
> create a new dh-params.pem but with no luck.
> 
> Do I need to enable a new module? Maybe some configuration changed?
> 
> Any help is appreciated, thanks!
> 
> --
> Álvaro Pagliari
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/6e086be6-7392-4c53-b473-47a2734f6d1e%40googlegroups.com.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/8FAC43F8-CDC1-4002-B9D9-A1AE8E93A0A6%40mac.com.


[Zotonic-Dev] Binary rsc/medium keys and maps are merged

2020-04-26 Thread Marc Worrell
Hi,

Just to warn you all that in master we have merged the change to binary keys in 
the m_get of models.

Now m_rsc:get/2 and m_media:get/2 return a map with binary keys.

In z_props we have routines to convert property lists and form posts to maps.

We are nearing the 1.0.0a1 release.

Cheers, 

Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/EE9EBB1D-6435-4915-9FC2-38A814FE9A18%40worrell.nl.


[Zotonic-Dev] Big change in master

2020-04-23 Thread Marc Worrell
Hi,

Big change coming - one of the last breaking changes before the first 1.0.0a1 
release
We are changing the format of the rsc and medium records to binaries and maps.

This makes it possible to insert random keys into those records, without having
them mapped to atom and thus exhausting the atom table.

It will also make it possible to move (in a later version) to JSONB as the 
storage format.
JSONB is natively supported by PostgreSQL, which can search and index 
individual properties.

The update will also change the m_get routines, as all atoms will be binaries 
instead.
So m_get( [ hello ], …) will now become m_get( [ <<"hello">> ], …)

As the rsc and medium records are now maps, you will need to change
some observers that handle rsc or medium property lists to handling
maps with binary keys.

The pending merge request is:

https://github.com/zotonic/zotonic/pull/2406

Cheers,

Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/129D6096-61B2-45A4-A6EC-6C13207CAAF4%40worrell.nl.


Re: [Zotonic-Dev] stdint.h not found on first compile under FreeBSD

2020-03-19 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Nikolas,

> On 19 Mar 2020, at 12:29, Nikolas Nikou  wrote:
> 
> in zotonic you must use IPv4 and need to set the ip in the configuration 
> otherwise zotonic crashes.

Interesting, how & where do we crash on IPv6 addresses?

Maybe there is a difference between Linux and BSD here.

- Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/7401D3F3-0995-40B3-8921-76F0C5A9E18D%40me.com.


Re: [Zotonic-Dev] installing zotonic on Freebsd jail

2019-11-27 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

Do you also see some messages on the Erlang command line?

Did you try to connect with http to :8000 and see if there is a redirect to 
https :8443?
If so then Zotonic is listening and responding.

If there are errors on the erlang command line and you are on OTP21, then you 
might need to get a patched OTP install.
I just saw someone referring to TLS handshake errors on OTP 21.3.
That problem was fixed in 21.3.8.5

Cheers, Marc



> On 26 Nov 2019, at 00:11, Java House  wrote:
> 
> Thank you Marc, 
> I found the file and changed the listen_ip and dbhost but I cannot connect 
> using https
> Is there some additional step required?
> 
> $ curl -kIv https://10.2.3.14:8443
> * Rebuilt URL to: https://10.2.3.14:8443/
> *   Trying 10.2.3.14...
> * TCP_NODELAY set
> * Connected to 10.2.3.14 (10.2.3.14) port 8443 (#0)
> * ALPN, offering h2
> * ALPN, offering http/1.1
> * successfully set certificate verify locations:
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>   CApath: none
> * TLSv1.3 (OUT), TLS handshake, Client hello (1):
> * TLSv1.3 (IN), TLS alert, handshake failure (552):
> * error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
> * Closing connection 0
> curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake 
> failure
> 
> 
> 
> 
> %%% PostgreSQL database defaults.
> %%% These are the defaults for the equally named options in your site's 
> config file.
>{dbdatabase, "zotonic"},
>{dbschema, "public"},
>{dbpassword, []},
>{dbuser, "zotonic"},
>{dbport, 5432},
>{dbhost, {10,2,4,11}},
> 
> %%% By default, Zotonic will create a postgres database for you if it doesn't
> %%% already exist, and install tables in it. Uncomment the options below
> %%% to prevent that.
>  % {dbcreate, false},
>  % {dbinstall, false},
> 
> %%% IP address on which Zotonic will listen for HTTP requests.
> %%% Always overridden by the ZOTONIC_IP environment variable.
> %%% Use 'any' for all IP addresses.
>{listen_ip, {10,2,3,14}},
> 
> 
> On Monday, November 25, 2019 at 11:27:27 PM UTC+1, Marc Worrell wrote:
> Hi Nikolas,
> 
> Try:
> 
>   ~/.zotonic/0/zotonic.config
> 
> It should have been installed there by the bin/zotonic script.
> 
> Cheers, Marc
> 
> 
>> On 25 Nov 2019, at 20:03, Java House > wrote:
>> 
>> Hi Marc
>> 
>> where do I find the zotonic.config file?
>> I searched and there is nowhere bellow the zotonic directory.
>> I found only one copy under docker/zotonic.config but the file has different 
>> content and I am not using docker.
>> 
>> Best
>> Nikolas
>> 
>> 
>> On Monday, November 25, 2019 at 10:44:11 AM UTC+1, Marc Worrell wrote:
>> Hi,
>> 
>> Looks like the ipv6 listener can’t start.
>>> =SUPERVISOR REPORT 24-Nov-2019::18:36:42.045104 ===
>>> supervisor: {local,zotonic_sup}
>>> errorContext: start_error
>>> reason: eprotonosupport
>>> offender: [{pid,undefined},
>>>{id,webmachine_mochiweb_v6},
>>>{mfargs,
>>>{webmachine_mochiweb,start,
>>>[webmachine_mochiweb_v6,
>>> [{port,8000},
>>>  {ip,any6},
>>>  {dispatcher,z_sites_dispatcher},
>>>  {dispatch_list,[]},
>>>  {backlog,500},
>>>  {acceptor_pool_size,75}]]}},
>>>{restart_type,permanent},
>>>{shutdown,5000},
>>>{child_type,worker}]
>> 
>> We check if ipv6 is available and if it is we start the listener.
>> This is in zotonic_sup.erl:
>> 
>>> ipv6_supported() ->
>>> case (catch inet:getaddr("localhost", inet6)) of
>>> {ok, _Addr} -> true;
>>> {error, _} -> false
>>> end.
>> 
>> Apparently the system pretend there is ip6 but doesn’t really support it.
>> 
>> You can disable starting the ipv6 listener by providing a specific listener 
>> port instead of ‘any’ in the zotonic.config
>> 
>> Replace this
>> 
>>> %%% IP address on which Zotonic will listen for HTTP requests.
>>> %%% Always overridden by the ZOTONIC_IP environment variable.
>>> %%% Use 'any' for all IP addresses.
>>>{listen_ip, any},
>> 
>> With this:
>> 
>>> %%% IP address on which Zotonic will listen for HTTP re

Re: [Zotonic-Dev] installing zotonic on Freebsd jail

2019-11-25 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Nikolas,

Try:

~/.zotonic/0/zotonic.config

It should have been installed there by the bin/zotonic script.

Cheers, Marc


> On 25 Nov 2019, at 20:03, Java House  wrote:
> 
> Hi Marc
> 
> where do I find the zotonic.config file?
> I searched and there is nowhere bellow the zotonic directory.
> I found only one copy under docker/zotonic.config but the file has different 
> content and I am not using docker.
> 
> Best
> Nikolas
> 
> 
> On Monday, November 25, 2019 at 10:44:11 AM UTC+1, Marc Worrell wrote:
> Hi,
> 
> Looks like the ipv6 listener can’t start.
>> =SUPERVISOR REPORT 24-Nov-2019::18:36:42.045104 ===
>> supervisor: {local,zotonic_sup}
>> errorContext: start_error
>> reason: eprotonosupport
>> offender: [{pid,undefined},
>>{id,webmachine_mochiweb_v6},
>>{mfargs,
>>{webmachine_mochiweb,start,
>>[webmachine_mochiweb_v6,
>> [{port,8000},
>>  {ip,any6},
>>  {dispatcher,z_sites_dispatcher},
>>  {dispatch_list,[]},
>>  {backlog,500},
>>  {acceptor_pool_size,75}]]}},
>>{restart_type,permanent},
>>{shutdown,5000},
>>{child_type,worker}]
> 
> We check if ipv6 is available and if it is we start the listener.
> This is in zotonic_sup.erl:
> 
>> ipv6_supported() ->
>> case (catch inet:getaddr("localhost", inet6)) of
>> {ok, _Addr} -> true;
>> {error, _} -> false
>> end.
> 
> Apparently the system pretend there is ip6 but doesn’t really support it.
> 
> You can disable starting the ipv6 listener by providing a specific listener 
> port instead of ‘any’ in the zotonic.config
> 
> Replace this
> 
>> %%% IP address on which Zotonic will listen for HTTP requests.
>> %%% Always overridden by the ZOTONIC_IP environment variable.
>> %%% Use 'any' for all IP addresses.
>>{listen_ip, any},
> 
> With this:
> 
>> %%% IP address on which Zotonic will listen for HTTP requests.
>> %%% Always overridden by the ZOTONIC_IP environment variable.
>> %%% Use 'any' for all IP addresses.
>>{listen_ip, {0,0,0,0}},
> 
> If this fixes the problem then we can look into a better ipv6 detection 
> method.
> One of the methods I am thinking of is by actually opening the port before 
> proceeding.
> 
> Cheers, Marc
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/ca77a00c-03aa-4047-a95c-1252dda57db4%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/zotonic-developers/ca77a00c-03aa-4047-a95c-1252dda57db4%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/005DA0AF-E69C-442B-BB07-4C555298B344%40me.com.


Re: [Zotonic-Dev] installing zotonic on Freebsd jail

2019-11-25 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

Looks like the ipv6 listener can’t start.
> =SUPERVISOR REPORT 24-Nov-2019::18:36:42.045104 ===
> supervisor: {local,zotonic_sup}
> errorContext: start_error
> reason: eprotonosupport
> offender: [{pid,undefined},
>{id,webmachine_mochiweb_v6},
>{mfargs,
>{webmachine_mochiweb,start,
>[webmachine_mochiweb_v6,
> [{port,8000},
>  {ip,any6},
>  {dispatcher,z_sites_dispatcher},
>  {dispatch_list,[]},
>  {backlog,500},
>  {acceptor_pool_size,75}]]}},
>{restart_type,permanent},
>{shutdown,5000},
>{child_type,worker}]

We check if ipv6 is available and if it is we start the listener.
This is in zotonic_sup.erl:

> ipv6_supported() ->
> case (catch inet:getaddr("localhost", inet6)) of
> {ok, _Addr} -> true;
> {error, _} -> false
> end.

Apparently the system pretend there is ip6 but doesn’t really support it.

You can disable starting the ipv6 listener by providing a specific listener 
port instead of ‘any’ in the zotonic.config

Replace this

> %%% IP address on which Zotonic will listen for HTTP requests.
> %%% Always overridden by the ZOTONIC_IP environment variable.
> %%% Use 'any' for all IP addresses.
>{listen_ip, any},

With this:

> %%% IP address on which Zotonic will listen for HTTP requests.
> %%% Always overridden by the ZOTONIC_IP environment variable.
> %%% Use 'any' for all IP addresses.
>{listen_ip, {0,0,0,0}},

If this fixes the problem then we can look into a better ipv6 detection method.
One of the methods I am thinking of is by actually opening the port before 
proceeding.

Cheers, Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/EBF1C36D-8A31-4A4A-9A0C-724321250CB0%40me.com.


Re: [Zotonic-Dev] Any sample example for REST API example

2019-09-09 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Kulveer,

The master (1.0-dev) has a new implementation for the API methods.

Previously you would make a service module.
This has been replaced with direct access to the models.

The API calls get mapped on m_get. m_post, and m_delete.

The url for a model is:

https://example.com/api/model/yourmodel/get/some/path 


This calls your model in the same way as:

{{ m.yourmodel.some.path }}

In a template.

For a delete (calls m_yourmodel:m_delete/3):

https://example.com/api/model/yourmodel/delete/some/path 


And post (calls m_yourmodel:m_post/3):

https://example.com/api/model/yourmodel/post/some/path 


The payload on a post can be anything that the model accepts.
It will be packed in a MQTT message that is delivered to the model.

The models will send their result back in the HTTP response (as JSON).
If you don’t expect an answer then you can tag an empty response topic to your
request:

https://example.com/api/model/yourmodel/post/some/path?response_topic= 


Or, alternatively, you can route the response to some other topic:

https://example.com/api/model/yourmodel/post/some/path?response_topic= 
some/topic/foo/bar

We will document this in the master documentation which is being adapted to the 
new
capabilities.

Note that the 0.x uses the special service modules (as documented in the 0.x 
documentation).

We have changed this behavior so that the API methods (models) are accessed in 
the same way via:

 * HTTP
 * MQTT
 * templates

And also give access to the MQTT topics via a normal HTTP POST with payload.

Hope this explains a bit.

Cheers, Marc


> On 7 Sep 2019, at 21:46, Kulveer Singh  wrote:
> 
> Looking to make REST API app, is there any sample example for REST API 
> example?
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/zotonic-developers/c3ece6e8-f670-486e-b5da-c02ff26bfcde%40googlegroups.com
>  
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/zotonic-developers/3DC6CA81-8B5C-4289-8860-A90D0B35EBFA%40me.com.


Re: [Zotonic-Dev] Get SSL Lets encrypt working on Zotonic

2019-04-12 Thread &#x27;Marc Worrell' via Zotonic developers
Did you just try git pull and then make?
That should update the dependencies.

- M

> On 12 Apr 2019, at 14:00, el  wrote:
> 
> Hi Marc,
> Didn’t think it would be a bug. Thought it might be that I missed out some 
> configuration step. 
> Could you run through how you would update that change without doing a full 
> re-install. 
> 
> I installed using git clone https://github.com/zotonic/zotonic.git 
> <https://github.com/zotonic/zotonic.git>
> I could do a fresh install on another machine maybe.
> 
> Eddie
> 
> 
> 
> On 11 Apr 2019, at 20:54, 'Marc Worrell' via Zotonic developers 
>  <mailto:zotonic-developers@googlegroups.com>> wrote:
> 
>> Hi Eddie,
>> 
>> I pushed an update to our letsencrypt version.
>> 
>> It now works on our cotonic branch, and I merged that change into the master.
>> 
>> Can you check again?
>> (Don’t forget to enable ‘cron’)
>> 
>> Please check the log files if anything goes wrong.
>> 
>> Cheers, Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Get SSL Lets encrypt working on Zotonic

2019-04-11 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Eddie,

I pushed an update to our letsencrypt version.

It now works on our cotonic branch, and I merged that change into the master.

Can you check again?
(Don’t forget to enable ‘cron’)

Please check the log files if anything goes wrong.

Cheers, Marc


> On 11 Apr 2019, at 21:16, 'Marc Worrell' via Zotonic developers 
>  wrote:
> 
> Hi Eddie,
> 
> It seems something changed with the LetsEncrypt API since we made the module.
> I am investigating it.
> 
> - Marc
> 
> PS. Ensure that the ‘cron’ module is also running, might be the reason your 
> module didn’t start
> 
> 
> 
>> On 11 Apr 2019, at 17:42, el > <mailto:layed...@gmail.com>> wrote:
>> 
>> Hi Marc,
>> 
>> Yes its on the Zotonic / System / modules page.
>> 
>> thanks
>> Eddie
>> 
>> On Thu, 11 Apr 2019 at 16:36, 'Marc Worrell' via Zotonic developers 
>> > <mailto:zotonic-developers@googlegroups.com>> wrote:
>> Hi Eddie,
>> 
>> This is the Zotonic master LetsEncrypt module?
>> If so, then I will need to check it, as I didn’t use it for a while.
>> (We are working on the last bits of the MQTT/Cotonic integration)
>> 
>> - Marc
>> 
>> 
>>> On 11 Apr 2019, at 17:27, layed...@gmail.com <mailto:layed...@gmail.com> 
>>> wrote:
>>> 
>>> Hi Marc,
>>> 
>>>  I am trying to get a certificate working on my zotonic installation.
>>> 
>>> I have activated the  SSL - Lets Encrypt module but its not showing the 
>>> green radio button against it.
>>> it shows light green then goes grey.
>>> 
>>> Eddie
>>> 
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Zotonic developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to zotonic-developers+unsubscr...@googlegroups.com 
>>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com 
>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com 
>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Get SSL Lets encrypt working on Zotonic

2019-04-11 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Eddie,

It seems something changed with the LetsEncrypt API since we made the module.
I am investigating it.

- Marc

PS. Ensure that the ‘cron’ module is also running, might be the reason your 
module didn’t start



> On 11 Apr 2019, at 17:42, el  wrote:
> 
> Hi Marc,
> 
> Yes its on the Zotonic / System / modules page.
> 
> thanks
> Eddie
> 
> On Thu, 11 Apr 2019 at 16:36, 'Marc Worrell' via Zotonic developers 
>  <mailto:zotonic-developers@googlegroups.com>> wrote:
> Hi Eddie,
> 
> This is the Zotonic master LetsEncrypt module?
> If so, then I will need to check it, as I didn’t use it for a while.
> (We are working on the last bits of the MQTT/Cotonic integration)
> 
> - Marc
> 
> 
>> On 11 Apr 2019, at 17:27, layed...@gmail.com <mailto:layed...@gmail.com> 
>> wrote:
>> 
>> Hi Marc,
>> 
>>  I am trying to get a certificate working on my zotonic installation.
>> 
>> I have activated the  SSL - Lets Encrypt module but its not showing the 
>> green radio button against it.
>> it shows light green then goes grey.
>> 
>> Eddie
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com 
>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Get SSL Lets encrypt working on Zotonic

2019-04-11 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Eddie,

This is the Zotonic master LetsEncrypt module?
If so, then I will need to check it, as I didn’t use it for a while.
(We are working on the last bits of the MQTT/Cotonic integration)

- Marc


> On 11 Apr 2019, at 17:27, layed...@gmail.com wrote:
> 
> Hi Marc,
> 
>  I am trying to get a certificate working on my zotonic installation.
> 
> I have activated the  SSL - Lets Encrypt module but its not showing the green 
> radio button against it.
> it shows light green then goes grey.
> 
> Eddie
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Make fails after installing zotonic on ubuntu 16.04.5

2019-03-21 Thread &#x27;Marc Worrell' via Zotonic developers
Hei Ed,

That is great news, good to hear that you got everything up and running!

Cheers, Marc

Sent from my iPhone

> On 19 Mar 2019, at 17:19, layed...@gmail.com wrote:
> 
> Hello Marc,
> 
> Got it Working - at last.
> 
> I had already installed erlang.
> 
> I forgot to run
> sudo apt-get install build-essential imagemagick postgresql
> Ed
> 
> 
> 
> 
>> On Friday, March 8, 2019 at 10:30:07 AM UTC, Marc Worrell wrote:
>> I will try to let one of the system administrators I work with chime in.
>> They might have some tips.
>> 
>> Cheers, Marc
>> 
>> 
>> 
>>> On 7 Mar 2019, at 16:47, laye...@gmail.com wrote:
>>> 
>>> H Marc,
>>> 
>>> I have tried 16.04.5 and 18.04.2 droplets on Digitaloceon and tried it a 
>>> number of times on fresh 16.04.5 droplets.
>>> I have not tried Debian yet.
>>> 
>>> I have also tried it on Nixos 17 and make ran OK - once I added the right 
>>> supporting applications. 
>>> That does not mean Zotonic will be happy on NixOS without some other 
>>> problems. I still have to get Postgres running on Nix.
>>> 
>>> I would like to get Zotonic running on Digitaloceon first and then continue 
>>> seeing if I can run Zotonic on NixOS. 
>>> I have a server with NixOS on AWS and on VPSFreeze.org.
>>> 
>>> I have not tried installing zotonic on AWS.
>>> 
>>> I have an account with Scaleway but have decided not to use them for 
>>> Zotonic.
>>> 
>>> I will try Kerl on DigitalOceon.
>>> 
>>> Any tips for configuring zotonic to run on a secure VPS will be welcome.
>>> 
>>> thanks
>>> 
>>> Eddie
>>> vpsFree.orgvpsFree.org
>>> vpsFree.org
>>>> On Thursday, March 7, 2019 at 11:53:41 AM UTC, Marc Worrell wrote:
>>>> We are using Ubuntu and Debian servers.
>>>> And for dev Mac OS X.
>>>> 
>>>> For switching Erlang releases we are using kerl.
>>>> That works fine, in fact I use it now even in production.
>>>> 
>>>> My own servers are running at TransIP.
>>>> But others are running servers at many other places.
>>>> 
>>>> I might try to get a demo server up & running with Scaleway.
>>>> They are pretty cheap, but no idea if there is a catch to that price.
>>>> 
>>>> Did you try with stock Ubuntu or Debian?
>>>> 
>>>> Maybe others have some suggestions?
>>>> 
>>>> Cheers, 
>>>> 
>>>> Marc
>>>> 
>>>> 
>>>> 
>>>>> On 6 Mar 2019, at 19:17, laye...@gmail.com wrote:
>>>>> 
>>>>> Hi Marc
>>>>> 
>>>>> Is it possible to run my installation on the same hosting provider you 
>>>>> use so that my zotonic installation mirrors yours?
>>>>> That might be one way of doing this.
>>>>> 
>>>>> Eddie
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Wednesday, March 6, 2019 at 4:20:59 PM UTC, Marc Worrell wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> I think cowboy is now OTP-19+ only.
>>>>>> 
>>>>>> Can you check with OTP-19 or 20?
>>>>>> 
>>>>>> Cheers, Marc
>>>>>> 
>>>>>> 
>>>>>>> On 6 Mar 2019, at 17:19, laye...@gmail.com wrote:
>>>>>>> 
>>>>>>> Hi Marc,
>>>>>>> 
>>>>>>> Still fumbling around trying to get a working zotonic installation
>>>>>>> 
>>>>>>> I am using an ubuntu 16.04.5 digitaloceon droplet.
>>>>>>> I am logged in as user zotonic.
>>>>>>> 
>>>>>>> I installed the dependencies...
>>>>>>> sudo apt-get install build-essential git erlang imagemagick postgresql
>>>>>>> 
>>>>>>> zotonic@ubuntu-zotonic:~/zotonic$ erl -v
>>>>>>> Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] 
>>>>>>> [kernel-poll:false]
>>>>>>> 
>>>>>>> Eshell V7.3  (abort with ^G)
>>>>>>> 
>>>>>>> 
>>>>>>> I ran git clone https://github.com/zotonic/zotonic.git
>>>>>>> cd /zotonic
>>>>>>> make
>>>>

Re: [Zotonic-Dev] demo doesn't work (website)

2019-03-13 Thread &#x27;Marc Worrell' via Zotonic developers
Thanks for the heads up.

I’m checking with the person who runs the demo site.
We might have to move the demo site to another location.


Cheers, Marc



> On 13 Mar 2019, at 15:02, PVN0  wrote:
> 
> Hi, just letting you know that the demo website (http://demo.zotonic.com/) 
> that is linked from http://zotonic.com/ is offline or redirected to wrong 
> address.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Make fails after installing zotonic on ubuntu 16.04.5

2019-03-08 Thread &#x27;Marc Worrell' via Zotonic developers
I will try to let one of the system administrators I work with chime in.
They might have some tips.

Cheers, Marc



> On 7 Mar 2019, at 16:47, layed...@gmail.com wrote:
> 
> H Marc,
> 
> I have tried 16.04.5 and 18.04.2 droplets on Digitaloceon and tried it a 
> number of times on fresh 16.04.5 droplets.
> I have not tried Debian yet.
> 
> I have also tried it on Nixos 17 and make ran OK - once I added the right 
> supporting applications. 
> That does not mean Zotonic will be happy on NixOS without some other 
> problems. I still have to get Postgres running on Nix.
> 
> I would like to get Zotonic running on Digitaloceon first and then continue 
> seeing if I can run Zotonic on NixOS. 
> I have a server with NixOS on AWS and on VPSFreeze.org.
> 
> I have not tried installing zotonic on AWS.
> 
> I have an account with Scaleway but have decided not to use them for Zotonic.
> 
> I will try Kerl on DigitalOceon.
> 
> Any tips for configuring zotonic to run on a secure VPS will be welcome.
> 
> thanks
> 
> Eddie
> vpsFree.orgvpsFree.org
> vpsFree.org
> On Thursday, March 7, 2019 at 11:53:41 AM UTC, Marc Worrell wrote:
> We are using Ubuntu and Debian servers.
> And for dev Mac OS X.
> 
> For switching Erlang releases we are using kerl.
> That works fine, in fact I use it now even in production.
> 
> My own servers are running at TransIP.
> But others are running servers at many other places.
> 
> I might try to get a demo server up & running with Scaleway.
> They are pretty cheap, but no idea if there is a catch to that price.
> 
> Did you try with stock Ubuntu or Debian?
> 
> Maybe others have some suggestions?
> 
> Cheers, 
> 
> Marc
> 
> 
> 
>> On 6 Mar 2019, at 19:17, laye...@gmail.com <> wrote:
>> 
>> Hi Marc
>> 
>> Is it possible to run my installation on the same hosting provider you use 
>> so that my zotonic installation mirrors yours?
>> That might be one way of doing this.
>> 
>> Eddie
>> 
>> 
>> 
>> On Wednesday, March 6, 2019 at 4:20:59 PM UTC, Marc Worrell wrote:
>> Hi,
>> 
>> I think cowboy is now OTP-19+ only.
>> 
>> Can you check with OTP-19 or 20?
>> 
>> Cheers, Marc
>> 
>> 
>>> On 6 Mar 2019, at 17:19, laye...@gmail.com <> wrote:
>>> 
>>> Hi Marc,
>>> 
>>> Still fumbling around trying to get a working zotonic installation
>>> 
>>> I am using an ubuntu 16.04.5 digitaloceon droplet.
>>> I am logged in as user zotonic.
>>> 
>>> I installed the dependencies...
>>> sudo apt-get install build-essential git erlang imagemagick postgresql
>>> 
>>> zotonic@ubuntu-zotonic:~/zotonic$ erl -v
>>> Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] 
>>> [kernel-poll:false]
>>> 
>>> Eshell V7.3  (abort with ^G)
>>> 
>>> 
>>> I ran git clone https://github.com/zotonic/zotonic.git 
>>> <https://github.com/zotonic/zotonic.git>
>>> cd /zotonic
>>> make
>>> 
>>> and got these errors at the end of the make.
>>> 
>>> 
>>> ===> Compiling _build/default/lib/cowlib/src/cow_sse.erl failed
>>> _build/default/lib/cowlib/src/cow_sse.erl:32: syntax error before: ':='
>>> 
>>> _build/default/lib/cowlib/src/cow_sse.erl:44: type event() undefined
>>> 
>>> GNUmakefile:27: recipe for target 'compile' failed
>>> make: *** [compile] Error 1
>>> zotonic@ubuntu-zotonic:~/zotonic$
>>> 
>>> 
>>> 
>>> 
>>> 
>>> I have had various problems getting zotonic to compile on earlier droplets 
>>> with missing components
>>> 
>>> 
>>> On an earlier droplet I got these errors.
>>> 
>>> 2. Missing components similar to this link 
>>> https://sea-region.github.com/asdf-vm/asdf/issues/415 
>>> <https://sea-region.github.com/asdf-vm/asdf/issues/415>
>>> 
>>> any ideas? still just following the developer instructions
>>> 
>>> Eddie
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Zotonic developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout&

Re: [Zotonic-Dev] Make fails after installing zotonic on ubuntu 16.04.5

2019-03-07 Thread &#x27;Marc Worrell' via Zotonic developers
We are using Ubuntu and Debian servers.
And for dev Mac OS X.

For switching Erlang releases we are using kerl.
That works fine, in fact I use it now even in production.

My own servers are running at TransIP.
But others are running servers at many other places.

I might try to get a demo server up & running with Scaleway.
They are pretty cheap, but no idea if there is a catch to that price.

Did you try with stock Ubuntu or Debian?

Maybe others have some suggestions?

Cheers, 

Marc



> On 6 Mar 2019, at 19:17, layed...@gmail.com wrote:
> 
> Hi Marc
> 
> Is it possible to run my installation on the same hosting provider you use so 
> that my zotonic installation mirrors yours?
> That might be one way of doing this.
> 
> Eddie
> 
> 
> 
> On Wednesday, March 6, 2019 at 4:20:59 PM UTC, Marc Worrell wrote:
> Hi,
> 
> I think cowboy is now OTP-19+ only.
> 
> Can you check with OTP-19 or 20?
> 
> Cheers, Marc
> 
> 
>> On 6 Mar 2019, at 17:19, laye...@gmail.com <> wrote:
>> 
>> Hi Marc,
>> 
>> Still fumbling around trying to get a working zotonic installation
>> 
>> I am using an ubuntu 16.04.5 digitaloceon droplet.
>> I am logged in as user zotonic.
>> 
>> I installed the dependencies...
>> sudo apt-get install build-essential git erlang imagemagick postgresql
>> 
>> zotonic@ubuntu-zotonic:~/zotonic$ erl -v
>> Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] 
>> [kernel-poll:false]
>> 
>> Eshell V7.3  (abort with ^G)
>> 
>> 
>> I ran git clone https://github.com/zotonic/zotonic.git 
>> <https://github.com/zotonic/zotonic.git>
>> cd /zotonic
>> make
>> 
>> and got these errors at the end of the make.
>> 
>> 
>> ===> Compiling _build/default/lib/cowlib/src/cow_sse.erl failed
>> _build/default/lib/cowlib/src/cow_sse.erl:32: syntax error before: ':='
>> 
>> _build/default/lib/cowlib/src/cow_sse.erl:44: type event() undefined
>> 
>> GNUmakefile:27: recipe for target 'compile' failed
>> make: *** [compile] Error 1
>> zotonic@ubuntu-zotonic:~/zotonic$
>> 
>> 
>> 
>> 
>> 
>> I have had various problems getting zotonic to compile on earlier droplets 
>> with missing components
>> 
>> 
>> On an earlier droplet I got these errors.
>> 
>> 2. Missing components similar to this link 
>> https://sea-region.github.com/asdf-vm/asdf/issues/415 
>> <https://sea-region.github.com/asdf-vm/asdf/issues/415>
>> 
>> any ideas? still just following the developer instructions
>> 
>> Eddie
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Make fails after installing zotonic on ubuntu 16.04.5

2019-03-06 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

I think cowboy is now OTP-19+ only.

Can you check with OTP-19 or 20?

Cheers, Marc


> On 6 Mar 2019, at 17:19, layed...@gmail.com wrote:
> 
> Hi Marc,
> 
> Still fumbling around trying to get a working zotonic installation
> 
> I am using an ubuntu 16.04.5 digitaloceon droplet.
> I am logged in as user zotonic.
> 
> I installed the dependencies...
> sudo apt-get install build-essential git erlang imagemagick postgresql
> 
> zotonic@ubuntu-zotonic:~/zotonic$ erl -v
> Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] 
> [kernel-poll:false]
> 
> Eshell V7.3  (abort with ^G)
> 
> 
> I ran git clone https://github.com/zotonic/zotonic.git
> cd /zotonic
> make
> 
> and got these errors at the end of the make.
> 
> 
> ===> Compiling _build/default/lib/cowlib/src/cow_sse.erl failed
> _build/default/lib/cowlib/src/cow_sse.erl:32: syntax error before: ':='
> 
> _build/default/lib/cowlib/src/cow_sse.erl:44: type event() undefined
> 
> GNUmakefile:27: recipe for target 'compile' failed
> make: *** [compile] Error 1
> zotonic@ubuntu-zotonic:~/zotonic$
> 
> 
> 
> 
> 
> I have had various problems getting zotonic to compile on earlier droplets 
> with missing components
> 
> 
> On an earlier droplet I got these errors.
> 
> 2. Missing components similar to this link 
> https://sea-region.github.com/asdf-vm/asdf/issues/415 
> 
> 
> any ideas? still just following the developer instructions
> 
> Eddie
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Zotonic fails to startup after make and bin/zotonic debug

2019-02-21 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Eddie,

This error about the ‘port program’ is caused by running then beam.smp (erlang) 
as root user.

There is an explanation here:

https://github.com/aeternity/aeternity/wiki/Troubleshooting#node-wont-start-with-privileged-user
 


In short: try to run zotonic as a “normal” user, and not as root.

Cheers, Marc



> On 21 Feb 2019, at 15:47, layed...@gmail.com wrote:
> 
> Hello,
> 
> Newbie problems - Just wondered if you recognise this problem
> 
> Rebuilt zotonic on DigitalOceon droplet on ubuntu 16.04
> installed zotonic with..
> 
> installed OTP 20 as I have had make fail using OTP 21
> $ git clone https://github.com/zotonic/zotonic.git
> cd zotonic
> make
> bin/zotonic debug
> 
> 
> Checked DB is OK
> postgres=# \du
>List of roles
>  Role name | Attributes | 
> Member of
> ---++---
>  postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
>  zotonic   | Create DB  | {}
> 
> postgres=# SELECT version();
>   version
> ---
>  PostgreSQL 9.5.14 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 
> 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit
> 
> 
> 
> root@packer-manual-zotonic:~/zotonic# bin/zotonic debug
> Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:1:1] [ds:1:1:10] 
> [async-threads:10] [hipe] [kernel-poll:true]
> 
> Eshell V9.3  (abort with ^G)
> (zotonic001@packer-manual-zotonic)1> 14:28:09.329 [info] Application lager 
> started on node 'zotonic001@packer-manual-zotonic'
> 14:28:09.412 [info] Application mimetypes started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:09.814 [info] Application mnesia started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:09.845 [info] emqtt_app:35 starting emqtt on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:09.892 [info] emqtt_auth:55 emqtt_auth is started
> 14:28:09.899 [info] emqtt_retained:89 emqtt_retained is started.
> 14:28:09.911 [info] emqtt_router:121 emqtt_router is started.
> 14:28:09.918 [info] emqtt_registry:56 emqtt_registry is started.
> 14:28:09.925 [info] emqtt_client_monitor:46 emqtt_client_monitor is started.
> 14:28:09.939 [info] emqtt_app:38 emqtt broker is running now.
> 14:28:09.939 [info] Application emqtt started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.006 [info] Application gproc started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.062 [info] Application jobs started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.083 [info] Application sidejob started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.095 [info] Application bert started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.105 [info] Application dh_date started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.116 [info] Application eiconv started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.157 [info] Setup running ...
> 14:28:10.158 [info] Directories verified. Res = ok
> 14:28:10.158 [info] Setup finished processing hooks (Mode=normal)...
> 14:28:10.158 [info] Application setup started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.233 [info] exometer_report:632 Starting reporters with []
> 14:28:10.233 [info] Application exometer_core started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.252 [info] Application epgsql started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.265 [info] Application depcache started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.266 [info] Application zotonic_stdlib started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.288 [info] Application cowlib started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.319 [info] Application ranch started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.342 [info] Application cowboy started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.353 [info] Application cowmachine started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.360 [info] Application poolboy started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.416 [info] filezcache: repopulating cache with 0 keys
> 14:28:10.416 [info] filezcache: scanning cache directory for unknown files.
> 14:28:10.423 [info] Application filezcache started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.476 [info] Application s3filez started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.512 [info] Application template_compiler started on node 
> 'zotonic001@packer-manual-zotonic'
> 14:28:10.529 [info] Application qdate_localtime started on node 
> 'zotonic001@packer-manual-z

Re: [Zotonic-Dev] erl_child_setup closed

2019-02-13 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

Could it be that you are running out of memory?
Seems that a Linux OOM could give such startup errors.

http://erlang.2086793.n4.nabble.com/Causes-of-Slogan-erl-child-setup-closed-td4719785.html

- Marc


> On 13 Feb 2019, at 14:40, heiheshang  wrote:
> 
> =erl_crash_dump:0.5
> Wed Feb 13 22:15:11 2019
> Slogan: erl_child_setup closed

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] erl_child_setup closed

2019-02-13 Thread &#x27;Marc Worrell' via Zotonic developers
Check where ‘erl’ is started in the following files:

If you start with ‘debug’ (like with ./start.sh):

src/scripts/zotonic-debug

If you start in the background (./bin/zotonic start):

src/scripts/zotonic-start

- Marc


> On 13 Feb 2019, at 09:48, heiheshang  wrote:
> 
> how to run zotonic with this option?
> 
> среда, 13 февраля 2019 г., 17:21:39 UTC+9 пользователь Marc Worrell написал:
> Hi,
> 
> Can you try to start Erlang with the option:  +S 4:4
> This gives you 4 schedulers.
> 
> See if that works.
> 
> - M
> 
>> On 13 Feb 2019, at 02:52, heiheshang > wrote:
>> 
>> I use a virtual machine, I have only one processor
>> 
>> среда, 13 февраля 2019 г., 0:08:48 UTC+9 пользователь Marc Worrell написал:
>> Hi,
>> 
>> I see "smp:1:1” in the system version.
>> It might help to use more threads.
>> 
>> For example, the dev env I am right now working in says:
>> 
>> Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:12:12] [async-threads:10] 
>> [hipe] [kernel-poll:false]
>> 
>> Cheers, Marc
>> 
>> 
>>> On 12 Feb 2019, at 13:38, heiheshang > wrote:
>>> 
>>> /opt/zotonic $ ./bin/zotonic debug
>>> erl_child_setup closed
>>> 
>>> Crash dump is being written to: erl_crash.dump...done
>>> 
>>> 
>>> =erl_crash_dump:0.5
>>> Tue Feb 12 21:25:48 2019
>>> Slogan: erl_child_setup closed
>>> System version: Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:1:1] 
>>> [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:true]
>>> Compiled: Fri Feb 23 20:13:12 2018
>>> Taints: erl_tracer,zlib
>>> Atoms: 2257
>>> Calling Thread: scheduler:1
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] erl_child_setup closed

2019-02-13 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

Can you try to start Erlang with the option:  +S 4:4
This gives you 4 schedulers.

See if that works.

- M

> On 13 Feb 2019, at 02:52, heiheshang  wrote:
> 
> I use a virtual machine, I have only one processor
> 
> среда, 13 февраля 2019 г., 0:08:48 UTC+9 пользователь Marc Worrell написал:
> Hi,
> 
> I see "smp:1:1” in the system version.
> It might help to use more threads.
> 
> For example, the dev env I am right now working in says:
> 
> Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:12:12] [async-threads:10] 
> [hipe] [kernel-poll:false]
> 
> Cheers, Marc
> 
> 
>> On 12 Feb 2019, at 13:38, heiheshang > wrote:
>> 
>> /opt/zotonic $ ./bin/zotonic debug
>> erl_child_setup closed
>> 
>> Crash dump is being written to: erl_crash.dump...done
>> 
>> 
>> =erl_crash_dump:0.5
>> Tue Feb 12 21:25:48 2019
>> Slogan: erl_child_setup closed
>> System version: Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:1:1] 
>> [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:true]
>> Compiled: Fri Feb 23 20:13:12 2018
>> Taints: erl_tracer,zlib
>> Atoms: 2257
>> Calling Thread: scheduler:1
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] erl_child_setup closed

2019-02-12 Thread &#x27;Marc Worrell' via Zotonic developers
Hi,

I see "smp:1:1” in the system version.
It might help to use more threads.

For example, the dev env I am right now working in says:

Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:12:12] [async-threads:10] 
[hipe] [kernel-poll:false]

Cheers, Marc


> On 12 Feb 2019, at 13:38, heiheshang  wrote:
> 
> /opt/zotonic $ ./bin/zotonic debug
> erl_child_setup closed
> 
> Crash dump is being written to: erl_crash.dump...done
> 
> 
> =erl_crash_dump:0.5
> Tue Feb 12 21:25:48 2019
> Slogan: erl_child_setup closed
> System version: Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:1:1] 
> [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:true]
> Compiled: Fri Feb 23 20:13:12 2018
> Taints: erl_tracer,zlib
> Atoms: 2257
> Calling Thread: scheduler:1

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: What kind of mistake I do not understand?

2019-02-06 Thread &#x27;Marc Worrell' via Zotonic developers
OTP-20 should be ok.

As this  is master, could you try:

rm -rf _build
rm ./rebar3
make

This forces a complete rebuild and a fresh install or rebar3.

I once had a problem with a version of rebar3, that was resolved by removing it.
The Makefile will fetch the newest rebar3 release.

- M

> On 2 Feb 2019, at 03:01, heiheshang  wrote:
> 
> System version: Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:1:1] 
> [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:true]
> 
> среда, 30 января 2019 г., 21:55:44 UTC+9 пользователь heiheshang написал:
> /opt/zotonic $ ./bin/zotonic compile
> {"init terminating in 
> do_boot",{undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,670}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
> init terminating in do_boot 
> ({undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Will zotonic run in alpine linux?

2019-02-06 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Ed,

Is there something special with Alpine?

In principle Zotonic runs on any Unix-alike that supports:

 - Erlang
 - PostgreSQL
 - ImageMagick

I guess Alpine supports those?

Cheers, Marc


> On 5 Feb 2019, at 16:29, layed...@gmail.com wrote:
> 
> Just wondering if zotonic will run on Alpine Linux?
> 
> thanks Ed
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: What kind of mistake I do not understand?

2019-02-01 Thread &#x27;Marc Worrell' via Zotonic developers
In which file was it?

Then I can check the master.

Still strange that it does compile on Travis-CI.
Which Erlang version are you using?

- Marc


> On 1 Feb 2019, at 02:14, heiheshang  wrote:
> 
> if replace it
> -include_lib("../zotonic_fileindexer/include/zotonic_fileindexer.hrl").
> 
> works without problems
> 
> среда, 30 января 2019 г., 21:55:44 UTC+9 пользователь heiheshang написал:
> /opt/zotonic $ ./bin/zotonic compile
> {"init terminating in 
> do_boot",{undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,670}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
> init terminating in do_boot 
> ({undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: What kind of mistake I do not understand?

2019-01-31 Thread &#x27;Marc Worrell' via Zotonic developers
This is the tip of the master?

I just tried a clean build on my machine (macOS 10.13, Erlang OTP-19 via kerl) 
and everything compiled.
Also the Travis-CI builds work.

So I am wondering what the difference could be with your setup.

You are also in the “zotonic” directory when running ‘make’?

- Marc


> On 31 Jan 2019, at 11:17, heiheshang  wrote:
> 
> this is an access problem
> user docker image does not match the user host system
> uid zotonic into docker images 100, but uid zotonic host system 1002 after 
> the fix, the next problem appeared
> 
> ===> Compiling apps/zotonic_core/src/support/z_module_indexer.erl failed
> apps/zotonic_core/src/support/z_module_indexer.erl:43: can't find include lib 
> "zotonic_fileindexer/include/zotonic_fileindexer.hrl"; Make sure 
> zotonic_fileindexer is in your app file's 'applications' list
> 
> apps/zotonic_core/src/support/z_module_indexer.erl:418: record fileindex 
> undefined
> apps/zotonic_core/src/support/z_module_indexer.erl:420: record fileindex 
> undefined
> apps/zotonic_core/src/support/z_module_indexer.erl:423: record fileindex 
> undefined
> apps/zotonic_core/src/support/z_module_indexer.erl:423: record fileindex 
> undefined
> apps/zotonic_core/src/support/z_module_indexer.erl:423: record fileindex 
> undefined
> apps/zotonic_core/src/support/z_module_indexer.erl:425: record fileindex 
> undefined
> 
> make: *** [GNUmakefile:27: compile] Error 1
> 
> 
> 
> 
> среда, 30 января 2019 г., 21:55:44 UTC+9 пользователь heiheshang написал:
> /opt/zotonic $ ./bin/zotonic compile
> {"init terminating in 
> do_boot",{undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,670}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
> init terminating in do_boot 
> ({undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: What kind of mistake I do not understand?

2019-01-31 Thread &#x27;Marc Worrell' via Zotonic developers
Seems like something is going wrong with Hex and fetching bcrypt.

What you could try is to delete the ‘./rebar3’ application and let the Makefile 
fetch a new version.

- Marc


> On 31 Jan 2019, at 03:41, heiheshang  wrote:
> 
> /opt/zotonic $ make
> ./rebar3  compile
> Zotonic Config:
> - /etc/zotonic/zotonic.config
> Application Dirs:
> - /opt/zotonic/user/modules/*
> - /opt/zotonic/user/sites/*
> - apps/*
> ===> Fetching pc ({pkg,<<"pc">>,<<"1.10.0">>})
> ===> Version cached at /tmp/.cache/rebar3/hex/default/packages/pc-1.10.0.tar 
> is up to date, reusing it
> ===> sh(mv /tmp/.tmp_dir90026919743 /opt/zotonic/_build/default/plugins/pc)
> failed with return code 1 and the following output:
> mv: can't rename '/tmp/.tmp_dir90026919743': No such file or directory
> 
> ===> Plugin pc not available. It will not be used.
> ===> Verifying dependencies...
> ===> Fetching bcrypt ({pkg,<<"bcrypt">>,<<"1.0.0">>})
> ===> Version cached at 
> /tmp/.cache/rebar3/hex/default/packages/bcrypt-1.0.0.tar is up to date, 
> reusing it
> ===> sh(mv /tmp/.tmp_dir800480727219 /opt/zotonic/_build/default/lib/bcrypt)
> failed with return code 1 and the following output:
> mv: can't rename '/tmp/.tmp_dir800480727219': No such file or directory
> 
> ===> Failed to fetch and copy dep: {pkg,<<"bcrypt">>,<<"1.0.0">>,
>
> <<"1C0F76981D8A7B32E4DAA813408BFCA5BA8B1286196EB771F026D02C710F71C5">>}
> make: *** [GNUmakefile:27: compile] Error 1
> 
> 
> среда, 30 января 2019 г., 21:55:44 UTC+9 пользователь heiheshang написал:
> /opt/zotonic $ ./bin/zotonic compile
> {"init terminating in 
> do_boot",{undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,670}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
> init terminating in do_boot 
> ({undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: What kind of mistake I do not understand?

2019-01-30 Thread &#x27;Marc Worrell' via Zotonic developers
Erlang crashes?

Which OTP version are you using?
And is it a clean build (maybe it doesn’t like a beam file from another OTP 
version).

- M


> On 30 Jan 2019, at 14:31, heiheshang  wrote:
> 
> /opt/zotonic $ ./bin/zotonic debug
> erl_child_setup closed
> 
> Crash dump is being written to: erl_crash.dump...done
> 
> Started: Wed Jan 30 22:28:16 2019
> Message queue length: 0
> Number of heap fragments: 0
> Heap fragment data: 0
> Link list: [<0.5.0>]
> Reductions: 1112
> Stack+heap: 4185
> OldHeap: 6772
> Heap unused: 3467
> OldHeap unused: 5371
> Memory: 88544   
> Program counter: 0x7f0a73aa7498 (init:boot_loop/2 + 64)
> CP: 0x (invalid)
> arity = 0
> Internal State: ACT_PRIO_NORMAL | USR_PRIO_NORMAL | PRQ_PRIO_NORMAL | 
> TRAP_EXIT | ON_HEAP_MSGQ
> =proc:<0.1.0>
> State: Waiting
> Name: erts_code_purger
> Spawned as: erts_code_purger:start/0
> Spawned by: <0.0.0>
> 
> 
> 
> 
> 
> 
> среда, 30 января 2019 г., 21:55:44 UTC+9 пользователь heiheshang написал:
> /opt/zotonic $ ./bin/zotonic compile
> {"init terminating in 
> do_boot",{undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,670}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
> init terminating in do_boot 
> ({undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] What kind of mistake I do not understand?

2019-01-30 Thread &#x27;Marc Worrell' via Zotonic developers
I think this is a fresh compile and this is the master, which is now OTP.

The compile option will be removed and is currently only working for 
incremental compiles.

You can use ‘make’ to compile (which calls rebar etc)

Cheers, Marc


> On 30 Jan 2019, at 13:55, heiheshang  wrote:
> 
> /opt/zotonic $ ./bin/zotonic compile
> {"init terminating in 
> do_boot",{undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,670}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
> init terminating in do_boot 
> ({undef,[{zotonic_launcher_config,load_configs,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] zotonic CI deployment best practice for 2019

2019-01-29 Thread &#x27;Marc Worrell' via Zotonic developers
 REPORT Process <0.310.0> with 0 neighbours exited 
> with reason: {{shutdown,{failed_to_start_child,exec,{bad_return_value,"Port 
> program 
> /root/zotonic/_build/default/lib/erlexec/priv/x86_64-pc-linux-gnu/exec-port 
> with SUID bit set is not allowed to run without setting effective 
> user!"}}},{exec_app,start,[normal,[]]}} in application_master:init/4 line 134
> 16:56:36.907 [error] zotonic:49 Zotonic start error: 
> {{shutdown,{failed_to_start_child,exec,{bad_return_value,"Port program 
> /root/zotonic/_build/default/lib/erlexec/priv/x86_64-pc-linux-gnu/exec-port 
> with SUID bit set is not allowed to run without setting effective 
> user!"}}},{exec_app,start,[normal,[]]}}
> 16:56:36.907 [info] Application erlexec exited with reason: 
> {{shutdown,{failed_to_start_child,exec,{bad_return_value,"Port program 
> /root/zotonic/_build/default/lib/erlexec/priv/x86_64-pc-linux-gnu/exec-port 
> with SUID bit set is not allowed to run without setting effective 
> user!"}}},{exec_app,start,[normal,[]]}}
> Many thanks
> Edlay
> 
> On Monday, January 14, 2019 at 4:53:17 PM UTC, Marc Worrell wrote:
> Hi Eddie and Lloyd,
> 
> “It depends” is indeed the correct answer...
> 
> Most Zotonic installations fall in two categories:
> 
> 1. Deployment via a Docker container, which is updated before deployment
> 2. Deployment via git (manual or automatic)
> 
> Some follow (1),  I follow (2).
> 
> Nice thing of (2) is that it allows for hot code upgrades and quick 
> turnaround of small patches.
> When we are i a development cycle for new features we might have 10 to 20 
> deployments per day.
> This goes very smooth, we even deploy minor updates to Zotonic and 
> dependencies using hot code upgrades.
> 
> Zotonic itself can watch changes in the file system and dynamically load new 
> files.
> 
> Most of the updates we deploy have only minor changes.
> Think of changes to templates, css, or translations.
> And minor Erlang changes (ie. not completely new apps or other dependencies).
> That is why we can have updates-via-git without service interruption.
> 
> The orgs that deploy via Docker (option 1) - have typically less frequent 
> updates and perform periodic major updates.
> As the whole container is updated this also restarts the Zotonic server.
> 
> Of course it is also possible to deploy using the OTP release mechanism.
> This is something that will be possible with the 1.0 (really soon now) of 
> Zotonic, as that version is OTP compliant.
> I personally never had the need to use OTP releases as the version control 
> via git is good enough for us.
> (Especially with rebar3 managing versions of dependencies.)
> 
> 
> Cheers, Marc
> 
> 
>> On 14 Jan 2019, at 17:40, ll...@writersglen.com <> wrote:
>> 
>> Hi Eddie,
>>  
>> I'm in a similar situation--- planning soon to release a Nitrogen web 
>> application but feeling profound apprehension since I don't have a clear 
>> understanding of risks and how to minimize them.
>>  
>> No doubt the flip answer is, "It depends..." Are we talking cloud hosting or 
>> on-premises? What are projected traffic patterns? Etc. Etc.
>>  
>> But "It depends..." doesn't help folks like us who lack experience or 
>> organizational support.
>>  
>> One can find considerable information on the web covering firewalls, proxy 
>> servers, load balancers, site hardening, etc. But, like you, I've found 
>> little in the Erlang corpus that provides sufficiently clear patterns and 
>> guidelines to assuage my Erlang release/production apprehensions.
>>  
>> It may well be a book-length topic or more, but even a thoughtful, thorough 
>> tutorial, or even a checklist, would be helpful.
>>  
>> Please do let me know what you come up with.
>>  
>> All the best,
>>  
>> Lloyd
>>  
>>  
>> -Original Message-
>> From: laye...@gmail.com <>
>> Sent: Monday, January 14, 2019 9:28am
>> To: "Zotonic developers" >
>> Subject: [Zotonic-Dev] zotonic CI deployment best practice for 2019
>> 
>> Hi,
>> I have followed zotonic for the last couple of years and am now interested 
>> in setting up a production server for zotonic.
>> I have just spent some time searching zotonic users and zotonic developers 
>> for an up to date guide on how you would go about developing and deploying 
>> zotonic to a production environment.
>> most of the links I found range from between 2010 - 2012.
>> I have looked through the zotonic documentation as well.
>> I have also installed locally using the zo

Re: [Zotonic-Dev] zotonic CI deployment best practice for 2019

2019-01-15 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Lloyd (and rest of list),

For Zotonic I have seen two setups:

1. Only Zotonic (Erlang)  (single machine)

With this setup external port 80 is redirected (using iptables prerouting 
rules) to 127.0.0.1:8000.
And port 443 to 8433. Erlang is directly handling all (SSL) traffic.
Same is done with the SMTP port 25, which is usually mapped to 2525.

2. Using a proxy (one or more machines)

In this haproxy or nginx are used to terminate the SSL connections and proxy 
requests to Zotonic/Erlang.
The Zotonic node is either running locally or on some other host in local 
network.
In this setup it is also common to have a mail server running to forward 
incoming email to the Zotonic/Erlang node.


Setup 1 (direct) is the easiest for small single-server operations.
Setup 2 (proxy) is when you want to have multiple machines and a local network.


We have setup 1 running on a €50/month VPS, handling monthly traffic of 1.5+ TB 
(~2M monthly visitors).
Another company is running setup 1 on dedicated hardware with more than 1M 
hourly requests.
(That server is mostly idle…)

So for most (98%?) sites the simple setup is actually very realistic.
You just need to be sure that you have a good backup scheme, as it is a single 
machine.
I know of some people that are working on a “lukewarm” failover setup.

With the single VPS server solution we didn’t have any significant down time in 
the last years and
usually have 100% monthly uptime (according to pingdom).

So, for me, the single server solution works best.
Especially with a VPS where the hosting company moves the VPS in case of any 
hardware problems.

Cheers,

Marc


> On 14 Jan 2019, at 19:47, ll...@writersglen.com wrote:
> 
> Hi Marc,
>  
> Many thanks for your prompt response.
>  
> This addresses one part of the puzzle. I can't speak for Eddie, but as a 
> total DevOps noob, a big-picture perspective would give me greater comfort as 
> I move into my own deployments.
>  
> I'm guessing that there are different issues if we're considering on-premises 
> vs. cloud deployment, so considering the two hosting scenarios...
>  
> What are the specific security, scaling, or other issues we need to attend 
> to? And how do we implement them? For instance, if on-premises: Do we need a 
> dmz to protect our LAN or is port-forwarding sufficient? Should we put a 
> proxy server such as nginx or HAProxy in front of our app? How can we most 
> effectively harden our servers and applications against exploits?
>  
> I understand much of this goes beyond the realm of Zotonic, Erlang, and 
> Nitrogen. But when I step out into the web for answers I'm totally 
> overwhelmed with confusing and oft contradictory info.
>  
> I'd love to create a living-document tutorial and checklist for, at least, 
> the simplest deployments, but wouldn't know where to start.
>  
> Thanks again,
>  
> Lloyd
>  
>  
>  
> -----Original Message-
> From: "'Marc Worrell' via Zotonic developers" 
> 
> Sent: Monday, January 14, 2019 11:53am
> To: "'Marc Worrell' via Zotonic developers" 
> 
> Cc: "erlang-questi...@erlang.org" 
> Subject: Re: [Zotonic-Dev] zotonic CI deployment best practice for 2019
> 
> Hi Eddie and Lloyd,
> “It depends” is indeed the correct answer...
> Most Zotonic installations fall in two categories:
> 1. Deployment via a Docker container, which is updated before deployment
> 2. Deployment via git (manual or automatic)
> Some follow (1),  I follow (2).
> Nice thing of (2) is that it allows for hot code upgrades and quick 
> turnaround of small patches.
> When we are i a development cycle for new features we might have 10 to 20 
> deployments per day.
> This goes very smooth, we even deploy minor updates to Zotonic and 
> dependencies using hot code upgrades.
> Zotonic itself can watch changes in the file system and dynamically load new 
> files.
> Most of the updates we deploy have only minor changes.
> Think of changes to templates, css, or translations.
> And minor Erlang changes (ie. not completely new apps or other dependencies).
> That is why we can have updates-via-git without service interruption.
> The orgs that deploy via Docker (option 1) - have typically less frequent 
> updates and perform periodic major updates.
> As the whole container is updated this also restarts the Zotonic server.
> Of course it is also possible to deploy using the OTP release mechanism.
> This is something that will be possible with the 1.0 (really soon now) of 
> Zotonic, as that version is OTP compliant.
> I personally never had the need to use OTP releases as the version control 
> via git is good enough for us.
> (Especially with rebar3 managing versions of dependencies.)
> Cheers, Marc
> 
> 
> On 14

Re: [Zotonic-Dev] zotonic CI deployment best practice for 2019

2019-01-14 Thread &#x27;Marc Worrell' via Zotonic developers
Hi Eddie and Lloyd,

“It depends” is indeed the correct answer...

Most Zotonic installations fall in two categories:

1. Deployment via a Docker container, which is updated before deployment
2. Deployment via git (manual or automatic)

Some follow (1),  I follow (2).

Nice thing of (2) is that it allows for hot code upgrades and quick turnaround 
of small patches.
When we are i a development cycle for new features we might have 10 to 20 
deployments per day.
This goes very smooth, we even deploy minor updates to Zotonic and dependencies 
using hot code upgrades.

Zotonic itself can watch changes in the file system and dynamically load new 
files.

Most of the updates we deploy have only minor changes.
Think of changes to templates, css, or translations.
And minor Erlang changes (ie. not completely new apps or other dependencies).
That is why we can have updates-via-git without service interruption.

The orgs that deploy via Docker (option 1) - have typically less frequent 
updates and perform periodic major updates.
As the whole container is updated this also restarts the Zotonic server.

Of course it is also possible to deploy using the OTP release mechanism.
This is something that will be possible with the 1.0 (really soon now) of 
Zotonic, as that version is OTP compliant.
I personally never had the need to use OTP releases as the version control via 
git is good enough for us.
(Especially with rebar3 managing versions of dependencies.)


Cheers, Marc


> On 14 Jan 2019, at 17:40, ll...@writersglen.com wrote:
> 
> Hi Eddie,
>  
> I'm in a similar situation--- planning soon to release a Nitrogen web 
> application but feeling profound apprehension since I don't have a clear 
> understanding of risks and how to minimize them.
>  
> No doubt the flip answer is, "It depends..." Are we talking cloud hosting or 
> on-premises? What are projected traffic patterns? Etc. Etc.
>  
> But "It depends..." doesn't help folks like us who lack experience or 
> organizational support.
>  
> One can find considerable information on the web covering firewalls, proxy 
> servers, load balancers, site hardening, etc. But, like you, I've found 
> little in the Erlang corpus that provides sufficiently clear patterns and 
> guidelines to assuage my Erlang release/production apprehensions.
>  
> It may well be a book-length topic or more, but even a thoughtful, thorough 
> tutorial, or even a checklist, would be helpful.
>  
> Please do let me know what you come up with.
>  
> All the best,
>  
> Lloyd
>  
>  
> -Original Message-
> From: layed...@gmail.com
> Sent: Monday, January 14, 2019 9:28am
> To: "Zotonic developers" 
> Subject: [Zotonic-Dev] zotonic CI deployment best practice for 2019
> 
> Hi,
> I have followed zotonic for the last couple of years and am now interested in 
> setting up a production server for zotonic.
> I have just spent some time searching zotonic users and zotonic developers 
> for an up to date guide on how you would go about developing and deploying 
> zotonic to a production environment.
> most of the links I found range from between 2010 - 2012.
> I have looked through the zotonic documentation as well.
> I have also installed locally using the zotonic full docker container and the 
> manual install.
> I am looking for a guide for Git / continuous integration / continuous 
> deployment guide and any best practice tips.
> Is something like this available?
> Many thanks
> Eddie L
> (Uk based)
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Security Advisory -- Zotonic Release 0.43

2018-12-21 Thread Marc Worrell
Full release notes and download are here:

https://github.com/zotonic/zotonic/releases/tag/0.43.0 
<https://github.com/zotonic/zotonic/releases/tag/0.43.0>

- Marc


> On 21 Dec 2018, at 14:40, Marc Worrell  wrote:
> 
> Hi,
> 
> We have released 0.43.0.
> 
> This includes security fixes and the changes mentioned below 
> 
> NOTE: If you have a blog site derived from the skel/blog then replace the
> archives.tpl file in your site with the one provided in 
> priv/skel/blog/archives.tpl
> 
> This also fixes a reflected XSS problem in the admin.
> 
> We request people to update their 0.x installation to 0.43 to mitigate this 
> problem.
> 
> Main changes are:
> 
> * Allowed uploadable files in mod_acl_user_groups are now configurable
> * Security fixes for reflected XSS in the admin and skel/blog/archives.tpl
> * Hardened HTTP headers for securing Zotonic sessions and requests
> * mod_twitter now uses polling for fetching tweets, stopped using deprecated 
> streaming API
> 
> 
> ## Compatibility
> 
> If you include a page of your site inside a frame on another site, then set 
> the ``allow_frame``
> option on the affected dispatch rule.
> 
> 
> Regards from the Zotonic core team,
> 
> Marc Worrell
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Zotonic-Dev] Security Advisory -- Zotonic Release 0.43

2018-12-21 Thread Marc Worrell
Hi,

We have released 0.43.0.

This includes security fixes and the changes mentioned below 

NOTE: If you have a blog site derived from the skel/blog then replace the
archives.tpl file in your site with the one provided in 
priv/skel/blog/archives.tpl

This also fixes a reflected XSS problem in the admin.

We request people to update their 0.x installation to 0.43 to mitigate this 
problem.

Main changes are:

 * Allowed uploadable files in mod_acl_user_groups are now configurable
 * Security fixes for reflected XSS in the admin and skel/blog/archives.tpl
 * Hardened HTTP headers for securing Zotonic sessions and requests
 * mod_twitter now uses polling for fetching tweets, stopped using deprecated 
streaming API


## Compatibility

If you include a page of your site inside a frame on another site, then set the 
``allow_frame``
option on the affected dispatch rule.


Regards from the Zotonic core team,

Marc Worrell

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] How to correctly set the cookie when the ztonic starts?

2018-08-22 Thread &#x27;Marc Worrell' via Zotonic developers
In your home directory:

~/.erlang.cookie

- Marc


> On 22 Aug 2018, at 11:22, heiheshang  wrote:
> 
> no, cookie an erlang node
> I want to start the debugger
> 
> среда, 22 августа 2018 г., 17:41:03 UTC+9 пользователь Marc Worrell написал:
> The session cookie?
> 
> There is a config for that.
> 
> You can change the name by adding a configuration “site.session_cookie_name”.
> It defaults to “z_sid”.
> 
> - Marc
> 
>> On 22 Aug 2018, at 04:26, heiheshang > wrote:
>> 
>> in which file to register the name of the cookie?
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] How to correctly set the cookie when the ztonic starts?

2018-08-22 Thread &#x27;Marc Worrell' via Zotonic developers
The session cookie?

There is a config for that.

You can change the name by adding a configuration “site.session_cookie_name”.
It defaults to “z_sid”.

- Marc

> On 22 Aug 2018, at 04:26, heiheshang  wrote:
> 
> in which file to register the name of the cookie?
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] eqc in zotonic ?

2018-08-21 Thread &#x27;Marc Worrell' via Zotonic developers
Ah, in that way.

I believe QuickCheck is a commercial product.
But there is a “mini” version that you can download from Quviq

http://www.quviq.com/downloads/ <http://www.quviq.com/downloads/>

- Marc



> On 21 Aug 2018, at 12:46, heiheshang  wrote:
> 
> https://github.com/Quviq/webdrv <https://github.com/Quviq/webdrv> with this I 
> have no problems
> problem to add QuickCheck,I do not know where to get it and whether it is on 
> github
> 
> вторник, 21 августа 2018 г., 19:33:09 UTC+9 пользователь Marc Worrell написал:
> In the 0.x you can add extra dependencies by adding a ‘deps’ key to your 
> zotonic config file.
> 
> http://docs.zotonic.com/en/0.x/ref/configuration/zotonic-configuration.html?highlight=deps#deps
>  
> <http://docs.zotonic.com/en/0.x/ref/configuration/zotonic-configuration.html?highlight=deps#deps>
> 
> Master is different, there we are using real OTP apps for all modules.
> 
> Cheers, Marc
> 
>> On 21 Aug 2018, at 08:09, heiheshang > wrote:
>> 
>> https://github.com/Quviq/webdrv <https://github.com/Quviq/webdrv> I'm trying 
>> to use this project
>> it requires the installation of QuickCheck
>> how to do it right in the zotonic ?
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] eqc in zotonic ?

2018-08-21 Thread &#x27;Marc Worrell' via Zotonic developers
In the 0.x you can add extra dependencies by adding a ‘deps’ key to your 
zotonic config file.

http://docs.zotonic.com/en/0.x/ref/configuration/zotonic-configuration.html?highlight=deps#deps
 


Master is different, there we are using real OTP apps for all modules.

Cheers, Marc

> On 21 Aug 2018, at 08:09, heiheshang  wrote:
> 
> https://github.com/Quviq/webdrv I'm trying to use this project
> it requires the installation of QuickCheck
> how to do it right in the zotonic ?
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Mobile app based on Zotonic framework

2018-04-20 Thread Marc Worrell
Hi Kirill,

I didn’t see Arjan or others with App experience chime in yet, so here are my 2 
cents :)

I think you can use any kind of client-side framework and call API methods to 
get your data.
A choice you can make is to, either:

 1. use API data and render on the client; or
 2. render snippets of HTML on the server and do composition in the App.

I think that Arjan and others are currently following strategy (1).
That is also what fits most App frameworks.

On a side note, we are working on new front end technology that will be more 
App (or Single Page App) friendly.
We are following strategy (2) with this new technology.

You can see the work in progress here:
https://github.com/cotonic/cotonic

And here:
https://github.com/zotonic/zotonic/pull/1902 

Realistically, we should have Cotonic/Zotonic stable by the summer.

Cheers, Marc



> On 15 Apr 2018, at 10:56, Kirill Sysoev  wrote:
> 
> Hi All!
> 
> Was looking for the ways of building mobile app with Zotonic as a backend.
> Found jQuery Mobile/mod_signal based app - "Upload Cinema":  
> https://miraclethings.nl/en/project/1179/upload-cinema-2nd-screen
> 
> What else technologies could be used, maybe there are open source examples?
> 
> Thanks in advance,
> Kirill
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Zotonic upside down.

2018-04-06 Thread Marc Worrell
Hi Kirill,

Good that Cowboy is now stable on Hex.
Then we can move some dependencies over to Hex instead of Git urls.

Next will be ensuring all our dependencies are on Hex.
And then in the correct state, including our merged patches.

It is a nice puzzle :-)

Do you have experience with LetsEncrypt?
Our patched letsencrypt library doesn’t pass its own tests.
And we are a bit puzzled why, especially as the test is quite hard to debug.
If we can figure it out then we can clean up our branch and get our changes 
merged.

It is the dependency I am most worried about moving to Hex.

Cheers,

Marc

 

> On 5 Apr 2018, at 14:00, Kirill Sysoev  wrote:
> 
> Hi Marc,
> 
> Thanks for an answer!
> 
> Yep, I've found some signs of this process on github, but it looked like it 
> stalled a bit:
> https://github.com/zotonic/zotonic/issues/1718
> https://github.com/zotonic/cowmachine/issues/3
> 
> At the same time it looks like another try could be already given: 
> https://hex.pm/packages/cowboy
> 
> Glad to know Zotonic as a dependency idea is alive :)
> 
> Please let me know if I can help somehow. 
> Not familiar with hex but ready to make my hands dirty :)
> 
> Regards,
> Kirill
> 
> четверг, 5 апреля 2018 г., 11:55:22 UTC+3 пользователь Marc Worrell написал:
> Hi Kirill,
> 
> Your suggestion of being able to make Zotonic a dependency of another project 
> is exactly what we are doing with the master.
> 
> We have split Zotonic in a bunch of OTP applications (in the apps directory).
> These OTP applications will be pushed as separate Hex packages.
> 
> This will make it possible to mix & match your own OTP application with 
> Zotonic inside.
> And also make it possible to create releases of your project.
> 
> Cheers,
> 
> Marc
> 
> 
>> On 2 Apr 2018, at 17:44, Kirill Sysoev > 
>> wrote:
>> 
>> Hi!
>> 
>> Feels it could be fun to be able to build website application with Zotonic 
>> as a dependancy. Opposite to current way, when site otp app located 
>> somewhere inside Zotonic and could be added only when Zotonic already 
>> instelled.
>> 
>> Does anyone already implemented such a structure or maybe there is a plans 
>> to do that?
>> 
>> Regards,
>> Kirill  
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Zotonic upside down.

2018-04-05 Thread Marc Worrell
Hi Kirill,

Your suggestion of being able to make Zotonic a dependency of another project 
is exactly what we are doing with the master.

We have split Zotonic in a bunch of OTP applications (in the apps directory).
These OTP applications will be pushed as separate Hex packages.

This will make it possible to mix & match your own OTP application with Zotonic 
inside.
And also make it possible to create releases of your project.

Cheers,

Marc


> On 2 Apr 2018, at 17:44, Kirill Sysoev  wrote:
> 
> Hi!
> 
> Feels it could be fun to be able to build website application with Zotonic as 
> a dependancy. Opposite to current way, when site otp app located somewhere 
> inside Zotonic and could be added only when Zotonic already instelled.
> 
> Does anyone already implemented such a structure or maybe there is a plans to 
> do that?
> 
> Regards,
> Kirill  
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Zotonic returns 200 instead of 404 on "Not Found"

2018-03-26 Thread Marc Worrell
Merged!

And thanks again :)

- Marc


> On 23 Mar 2018, at 23:41, Kirill Sysoev  wrote:
> 
> Marc,
> 
> What about this part?
> https://github.com/zotonic/cowmachine/pull/5
> 
> Regards,
> Kirill
> 
> среда, 21 марта 2018 г., 13:56:37 UTC+3 пользователь Marc Worrell написал:
> And merged, thanks!
> 
> - Marc
> 
> 
>> On 20 Mar 2018, at 18:19, Kirill Sysoev > 
>> wrote:
>> 
>> Done.
>> 
>> Regards,
>> Kirill
>> 
>> вторник, 20 марта 2018 г., 19:40:55 UTC+3 пользователь Marc Worrell написал:
>> Yes, please add a merge request!
>> 
>> Thanks, Marc
>> 
>> 
>>> On 20 Mar 2018, at 17:09, Kirill Sysoev gmail.com 
>>> <http://gmail.com/>> wrote:
>>> 
>>> Hi,
>>> 
>>> Just noticed, that while rendering "Not Found" error page Zotonic returns 
>>> code 200
>>> 
>>> To make a quick workaround a couple of changes needed:
>>> 
>>> https://github.com/onnet/zotonic/commit/b22665dda28d82ae6770a085d645e554cf579032
>>>  
>>> <https://github.com/onnet/zotonic/commit/b22665dda28d82ae6770a085d645e554cf579032>
>>> https://github.com/onnet/cowmachine/commit/73f7db0c3f96a0e32907b5ac5fac565576490ac9
>>>  
>>> <https://github.com/onnet/cowmachine/commit/73f7db0c3f96a0e32907b5ac5fac565576490ac9>
>>> 
>>> Could it be accepted as a PR or I'm missing something?
>>> 
>>> Regards,
>>> Kirill
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Zotonic developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Zotonic returns 200 instead of 404 on "Not Found"

2018-03-21 Thread Marc Worrell
And merged, thanks!

- Marc


> On 20 Mar 2018, at 18:19, Kirill Sysoev  wrote:
> 
> Done.
> 
> Regards,
> Kirill
> 
> вторник, 20 марта 2018 г., 19:40:55 UTC+3 пользователь Marc Worrell написал:
> Yes, please add a merge request!
> 
> Thanks, Marc
> 
> 
>> On 20 Mar 2018, at 17:09, Kirill Sysoev gmail.com 
>> <http://gmail.com/>> wrote:
>> 
>> Hi,
>> 
>> Just noticed, that while rendering "Not Found" error page Zotonic returns 
>> code 200
>> 
>> To make a quick workaround a couple of changes needed:
>> 
>> https://github.com/onnet/zotonic/commit/b22665dda28d82ae6770a085d645e554cf579032
>>  
>> <https://github.com/onnet/zotonic/commit/b22665dda28d82ae6770a085d645e554cf579032>
>> https://github.com/onnet/cowmachine/commit/73f7db0c3f96a0e32907b5ac5fac565576490ac9
>>  
>> <https://github.com/onnet/cowmachine/commit/73f7db0c3f96a0e32907b5ac5fac565576490ac9>
>> 
>> Could it be accepted as a PR or I'm missing something?
>> 
>> Regards,
>> Kirill
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Zotonic returns 200 instead of 404 on "Not Found"

2018-03-20 Thread Marc Worrell
Yes, please add a merge request!

Thanks, Marc


> On 20 Mar 2018, at 17:09, Kirill Sysoev  wrote:
> 
> Hi,
> 
> Just noticed, that while rendering "Not Found" error page Zotonic returns 
> code 200
> 
> To make a quick workaround a couple of changes needed:
> 
> https://github.com/onnet/zotonic/commit/b22665dda28d82ae6770a085d645e554cf579032
> https://github.com/onnet/cowmachine/commit/73f7db0c3f96a0e32907b5ac5fac565576490ac9
> 
> Could it be accepted as a PR or I'm missing something?
> 
> Regards,
> Kirill
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Running Zotonic without Postgres

2018-03-16 Thread Marc Worrell
Yes, I think we can decouple it.

- Marc



> On 16 Mar 2018, at 09:04, Kirill Sysoev  wrote:
> 
> Marc,
> 
> While playing with DBless Zotonic and decided to get rid of mod_admin, it 
> appeared that mod_translation dependent on mod_admin.
> This dependence looks weak enough:
> - 2 records definitions in admin_menu.hrl
> - "language_list" variable stored in db 
> (https://github.com/zotonic/zotonic/pull/1888)
> 
> Is there any special reason in this dependence?
> Since Zotonic getting more modular, could it be good to decouple it?
> 
> Regards,
> Kirill
> 
> вторник, 13 марта 2018 г., 18:35:35 UTC+3 пользователь Kirill Sysoev написал:
> Thanks, Marc!
> 
> This is exactly what I was looking for.
> 
> Regards,
> 
> вторник, 13 марта 2018 г., 14:46:29 UTC+3 пользователь Marc Worrell написал:
> Yes.
> 
> You can check the zotonic_status site config:
> 
>%% This site doesn't use a database connection
>{dbdatabase, none},
> 
> This disables the database for the given site.
> Be careful that a lot of modules do need database support.
> 
> Cheers, Marc
> 
> 
> 
>> On 13 Mar 2018, at 12:44, Kirill Sysoev > wrote:
>> 
>> Hi
>> 
>> I would like to use Zotonic as a framework only.
>> Is there an easy way to run site on Zotonic without Postgres installed on 
>> the system?
>> 
>> I see DB check hardcoded into install_check, but maybe there is a hidden 
>> silver bullet to get rid of that? :))
>> 
>> Regards,
>> Kirill
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Running Zotonic without Postgres

2018-03-13 Thread Marc Worrell
Yes.

You can check the zotonic_status site config:

 %% This site doesn't use a database connection
 {dbdatabase, none},

This disables the database for the given site.
Be careful that a lot of modules do need database support.

Cheers, Marc



> On 13 Mar 2018, at 12:44, Kirill Sysoev  wrote:
> 
> Hi
> 
> I would like to use Zotonic as a framework only.
> Is there an easy way to run site on Zotonic without Postgres installed on the 
> system?
> 
> I see DB check hardcoded into install_check, but maybe there is a hidden 
> silver bullet to get rid of that? :))
> 
> Regards,
> Kirill
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Ensure that an email is provided

2018-02-16 Thread Marc Worrell
> On 16 Feb 2018, at 17:17, Antoine  wrote:
> 
> What is the correct validator to force the user to enter an email ?
> 
> presence; will not check that email is valid.
> email; will accept the field to be empty.
> 
> Using both validator, trigger an javascript warning.

Use both as follows:

{% validate id=“…”  type={presence} type={email} %}

Cheers, Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-10-10 Thread Marc Worrell
Hi,

David and I discussed this today and we think that there is a possibility to 
make a zotonic-plug in combination with a “default” site in Zotonic.

David made some notes, which I assume he will share here :)

There are some details we need to figure out, like how we are using cowboy2 and 
if we might want to use ecto.

Cheers, Marc

Sent from my iPhone

> On 10 Oct 2017, at 15:24, Allen Wyma  wrote:
> 
> I'm more than happy to help convert some pieces. I left some messages on 
> gitter. I just couldn't get zotonic to run by itself. It would be great if 
> there was a way I could just add them as plugs, like David was saying.
> 
> On Tuesday, October 10, 2017 at 8:21:05 PM UTC+8, da...@ddeboer.nl wrote:
>> 
>>> I have converted larger Erlang codebases to Elixir incrementally
>> 
>> Jake, can you explain the rationale behind this? Why did you want to run 
>> your apps in Elixir instead of Erlang?
>>  
>>> The most interesting thing is probably an example combining Zotonic with 
>>> Phoenix. 
>> 
>> This is something I’ve been thinking about for a while now. Going one step 
>> further: what about porting Zotonic to Elixir? There are a many reasons why 
>> Zotonic and Phoenix (= Photonic ;) are a great match:
>> 
>> 1. As of yet, there’s no fully-fledged CMS available for Phoenix/Elixir. 
>> Having a stable CMS for Phoenix will enable developers to be more productive 
>> in Elixir and attract more of them to start doing Elixir in the first place. 
>> There’s definitely a demand for a Phoenix CMS: as Allen and others write in 
>> this thread and again others have told me.
>> 
>> 2. This is also a great chance for Zotonic. As most web developers on the 
>> Beam VM are doing Elixir, it will be much easier for them to submit 
>> improvements to an Elixir CMS than an Erlang one. So by porting Zotonic to 
>> Elixir we will hopefully find more contributors.
>> 
>> 3. The number of Zotonic contributors is rather small for such a large 
>> product. One way to solve this problem is by reducing the scope of Zotonic. 
>> Currently it has custom logic for HTTP (Cowmachine), templates (template 
>> compiler), routes (dispatch compiler) and so on. All these belong to web 
>> applications in general, not a CMS specifically. Let’s use Phoenix to take 
>> care of these. Phoenix has a (much) larger community, so it can do these 
>> fundamentals better and more efficiently than we can. Worst case, we would 
>> have to build something on top of what Phoenix ships with out of the box, 
>> such as adding adding dynamic routing. Let’s stick to what makes Zotonic 
>> unique: its flexible datamodel, performant depcache, (possibly) ErlyDTL 
>> template language. 
>> (As a side-note, let’s not forget Zotonic is much older than Phoenix, and 
>> Zotonic has been doing things such as real-time client/server communication 
>> before Phoenix existed, let alone added Channels.)
>> 
>> 4. Phoenix is well-designed and properly decoupled (Plug for HTTP, Ecto for 
>> databases and Contexts for domain logic). The same cannot not always be said 
>> of Zotonic. So switching over to Phoenix will result in smaller Zotonic 
>> components written in higher-quality code.
>> 
>> 5. Most web development on the Beam VM is happening in Elixir: if you need 
>> authentication, JSON-LD parsing etc., there are much more likely to be 
>> up-to-date, well-maintained and documented Elixir packages available on 
>> Hex.pm than a single Erlang one. It therefore makes sense to integrate with 
>> the Elixir ecosystem.
>> 
>> Cheers,
>> 
>> David
>> 
>> 
>> Op dinsdag 3 oktober 2017 04:23:11 UTC+2 schreef Jake Morrison:
>>> 
>>> On Mon, Oct 02, 2017 at 10:39:04AM +, Marc Worrell wrote: 
>>> > 
>>> > > On 2 Oct 2017, at 02:19, Jake Morrison  wrote: 
>>> > > 
>>> > > Marc, 
>>> > > 
>>> > > On Fri, Sep 29, 2017 at 09:40:07AM +, Marc Worrell wrote: 
>>> > >> Can mix build rebar3 based apps? 
>>> > > 
>>> > > Mix is more or less a replacement for rebar3, so they are mutually 
>>> > > exclusive, though largely compatible. 
>>> > > 
>>> > >> If so then we can just provide a mix based project. 
>>> > > 
>>> > > For Elixir users, the easiest thing is if Zotonic can be used 
>>> > > as a library which can be pulled in by mix/rebar from https://hex.pm/, 
>>> > > i.e. it's a well behaved OTP application. It might make sense 
>>> 

[Zotonic-Dev] Re: [Zotonic-Usr] IMPORTANT: Security advisory

2017-10-05 Thread Marc Worrell
Of course, besides a good secret, there are two other options:

1) Use your firewall

Especially outside access to port 4369
Always good to block ports that should not be accessed by
random Internet users …

2) Let epmd only listen on 127.0.0.1

Before starting Zotonic set:

export ERL_EPMD_ADDRESS=127.0.0.1

And in the erlang.config file add:

{kernel, [
{inet_dist_use_interface,{127,0,0,1}}
 ]}


3) Disable erlang distribution

Before starting Zotonic set:

export ZOTONIC_DISTRIBUTED=false


Didn’t try the last two yet, so I welcome instructions to include
in the Zotonic documentation :)


Cheers, Marc


> On 5 Oct 2017, at 21:48, Marc Worrell  wrote:
> 
> Hi,
> 
> Erlang has builtin distribution, which is secured by a secret cookie.
> There have been some discussion about the possibility of brute-forcing this 
> cookie.
> 
> Looking at the cookie generation code we are the opinion that there is not 
> enough entropy.
> 
> That is why we advise strongly to use a different cookie than the one
> generated by Erlang.
> 
> For this we have a simple script that you might run from the Zotonic/Erlang 
> shell.
> 
> The script replaces the content of the “.erlang.cookie” file in the Zotonic 
> home
> directory and then sets the cookie of the running system to the newly 
> generated
> cookie.
> 
> First connect with your Erlang shell:
> 
> $ bin/zotonic shell
> 
> Then run the following (assuming you have a UNIX alike system):
> 
> begin
> Cookie = base64:encode(crypto:strong_rand_bytes(30)),
> F = filename:join(os:getenv("HOME"), ".erlang.cookie"),
> CurrCookie = atom_to_binary(erlang:get_cookie(), utf8),
> {ok, CurrCookie} = file:read_file(F),
> ok = file:change_mode(F, 8#600),
> ok = file:write_file(F, Cookie),
> erlang:set_cookie(node(), binary_to_atom(Cookie, utf8)),
> ok = file:change_mode(F, 8#400),
> binary_to_atom(Cookie, utf8)
> end.
> 
> If the above doesn’t work, then you can do it manually:
> 
> 1. Find the “.erlang.cookie” file in your Zotonic home directory.
> 2. Stop Zotonic
> 3. Replace the contents of the file
> 4. Start Zotonic.
> 
> 
> Kind regards,
> 
> Marc
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-users+unsubscr...@googlegroups.com 
> <mailto:zotonic-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Zotonic-Dev] IMPORTANT: Security advisory

2017-10-05 Thread Marc Worrell
Hi,

Erlang has builtin distribution, which is secured by a secret cookie.
There have been some discussion about the possibility of brute-forcing this 
cookie.

Looking at the cookie generation code we are the opinion that there is not 
enough entropy.

That is why we advise strongly to use a different cookie than the one
generated by Erlang.

For this we have a simple script that you might run from the Zotonic/Erlang 
shell.

The script replaces the content of the “.erlang.cookie” file in the Zotonic home
directory and then sets the cookie of the running system to the newly generated
cookie.

First connect with your Erlang shell:

$ bin/zotonic shell

Then run the following (assuming you have a UNIX alike system):

begin
Cookie = base64:encode(crypto:strong_rand_bytes(30)),
F = filename:join(os:getenv("HOME"), ".erlang.cookie"),
CurrCookie = atom_to_binary(erlang:get_cookie(), utf8),
{ok, CurrCookie} = file:read_file(F),
ok = file:change_mode(F, 8#600),
ok = file:write_file(F, Cookie),
erlang:set_cookie(node(), binary_to_atom(Cookie, utf8)),
ok = file:change_mode(F, 8#400),
binary_to_atom(Cookie, utf8)
end.

If the above doesn’t work, then you can do it manually:

1. Find the “.erlang.cookie” file in your Zotonic home directory.
2. Stop Zotonic
3. Replace the contents of the file
4. Start Zotonic.


Kind regards,

Marc


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-10-02 Thread Marc Worrell

> On 2 Oct 2017, at 02:19, Jake Morrison  wrote:
> 
> Marc,
> 
> On Fri, Sep 29, 2017 at 09:40:07AM +0000, Marc Worrell wrote:
>> Can mix build rebar3 based apps?
> 
> Mix is more or less a replacement for rebar3, so they are mutually
> exclusive, though largely compatible.
> 
>> If so then we can just provide a mix based project.
> 
> For Elixir users, the easiest thing is if Zotonic can be used
> as a library which can be pulled in by mix/rebar from https://hex.pm/,
> i.e. it's a well behaved OTP application. It might make sense
> to have some mix tasks which e.g. create template modules. 

The master is being split in OTP apps, with the specific goal of
being reusable.

Actually, there is not much left in the ‘zotonic.app’, almost everything
is moved to the other (OTP) apps.

So I guess having a Mix (/Elixir) project that people can clone could
be a good starting point for Elixir devs.

> 
>> I am also thinking of using the introspection (we are using that for
>> notify observers) to discover if a module, filter, action or other
>> type of Zotonic callback module is an Elixir module.
>> And if so we could generate or use some glue code to call directly
>> into the Elixir modules from Zotonic.
> 
> Generally speaking, Elixir code is functionally the same as Erlang
> code, the module atoms just start with 'Elixir.', so that may not be
> necessary. 

So if an Elixir source file defines the Elixir equivalent of a function:

observe_some_event/2

Then in the function definitions I can find just that function?
And the module itself would be loaded as ElixitSomModuleName?

That would make it quite straightforward to integrate Elixir code
into the notification system.

- M

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-29 Thread Marc Worrell
Can mix build rebar3 based apps?
If so then we can just provide a mix based project.

I am also thinking of using the introspection (we are using that for
notify observers) to discover if a module, filter, action or other
type of Zotonic callback module is an Elixir module.
And if so we could generate or use some glue code to call directly
into the Elixir modules from Zotonic.

- M


> On 29 Sep 2017, at 10:49, Jake Morrison  wrote:
> 
> On Fri, Sep 29, 2017 at 08:12:53AM +0000, Marc Worrell wrote:
>> Thinking of it… we do use a lot of records for all notifications and 
>> postbacks.
>> 
>> Are those supported in Elixir?
> 
> Records are supported, here is the Elixir syntax:
> https://hexdocs.pm/elixir/Record.html
> Maps are generally easier to deal with than records, though, in both 
> languages.
> 
> I have converted larger Erlang codebases to Elixir incrementally. The
> first step is generally to switch the project to using using mix, the
> Elixir build tool. Second is to switch to using maps for the core data
> structures, so it's easier to interoperate. Then we do a "mechanical"
> conversion from Erlang to Elixir, as the language semantics are
> essentially the same. Depending on the state of tests in the project, we
> would either use the Erlang tests to validate that things are still
> working properly, or write tests using Elixir's ExUnit and friends.
> Finally we start using the syntax improvements in Elixir to make the code 
> nicer.
> 
> For interop, doing the first two steps would make things easiest for
> Elixir folks. It adds a dependency on Elixir to build the system,
> though.
> 
>> - Marc
> 
> Jake
> 
>>> On 29 Sep 2017, at 08:54, Kai Janson  wrote:
>>> 
>>> Some of the things in the hrl file could be replaced by Elixir macros or 
>>> functions?
>>> 
>>> On Sep 29, 2017, at 02:51, Marc Worrell >> <mailto:mworr...@me.com>> wrote:
>>> 
>>>> Hi Allen,
>>>> 
>>>> Two weeks ago David de Boer and I had a look at how Elixir and 
>>>> Erlang could be mixed.
>>>> 
>>>> We concluded that it all should be possible to do with the master.
>>>> But also that we didn’t know enough of Elixir to make it frictionless.
>>>> So we need some help with this.
>>>> 
>>>> The master is split in applications, and those will all be pushed to Hex.
>>>> That is a good start for any Elixir setup, I guess.
>>>> 
>>>> The main zotonic.hrl is mainly included because we like to poke around in 
>>>> #context{} (which we shouldn’t) and to use the ?DEBUG/1 macro.
>>>> 
>>>> There are some other macros in there, but they are not essential.
>>>> So it is not really needed for building modules etc.
>>>> 
>>>> We welcome help to make Zotonic work with Elixir!
>>>> 
>>>> Arjan could probably help as well - though he is very busy right now.
>>>> 
>>>> Cheers, Marc
>>>> 
>>>> 
>>>>> On 29 Sep 2017, at 03:17, Allen Wyma >>>> <mailto:allen.w...@gmail.com>> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> Does anyone have a guide with how to use elixir with Zotonic?
>>>>> We're a ruby house that's looking to switch to elixir, but
>>>>> sometimes we get projects that seem to work better for a CMS. When
>>>>> I saw this project, I was quite amazed and we'd like to start to
>>>>> experiment a bit with it.
>>>>> 
>>>>> Is it possible to have a guide of how to use elixir with Zotonic?
>>>>> I've tried looking a bit at the code for erlang, and it includes
>>>>> references to hrl (erlang macro/header files) which are not
>>>>> supported in elixir. This is probably my biggest question of how
>>>>> to translate over the code.
>>>>> 
>>>>> Thanks
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-29 Thread Marc Worrell

> On 29 Sep 2017, at 10:38, Allen Wyma  wrote:
> 
> Ganz geil! How to connect?

That is German, actually.
The team is quite present on gitter.

https://gitter.im/zotonic/zotonic <https://gitter.im/zotonic/zotonic>

Maas-Maarten, David and Arthur are there quite regularly.
And maybe Arjan is watching along between his busy times.

- Marc



> On Fri, Sep 29, 2017 at 4:13 PM Marc Worrell  <mailto:mworr...@me.com>> wrote:
>> On 29 Sep 2017, at 10:11, Allen Wyma > <mailto:allen.w...@gmail.com>> wrote:
>> 
>> I’m more than willing to help out in exchange for some Dutch help? Language 
>> 4 language exchange? :)
> 
> LOL,  quite some people in the core team are quite proficient in Dutch.
> So that won’t be problematic :)
> 
> - M
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Zotonic developers" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/zotonic-developers/iOOAFZ8Uq1Y/unsubscribe 
> <https://groups.google.com/d/topic/zotonic-developers/iOOAFZ8Uq1Y/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-29 Thread Marc Worrell

> On 29 Sep 2017, at 10:11, Allen Wyma  wrote:
> 
> I’m more than willing to help out in exchange for some Dutch help? Language 4 
> language exchange? :)

LOL,  quite some people in the core team are quite proficient in Dutch.
So that won’t be problematic :)

- M

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-29 Thread Marc Worrell
Thinking of it… we do use a lot of records for all notifications and postbacks.

Are those supported in Elixir?

- Marc

> On 29 Sep 2017, at 08:54, Kai Janson  wrote:
> 
> Some of the things in the hrl file could be replaced by Elixir macros or 
> functions?
> 
> Sent from my non-google-device
> 
> On Sep 29, 2017, at 02:51, Marc Worrell  <mailto:mworr...@me.com>> wrote:
> 
>> Hi Allen,
>> 
>> Two weeks ago David de Boer and I had a look at how Elixir and 
>> Erlang could be mixed.
>> 
>> We concluded that it all should be possible to do with the master.
>> But also that we didn’t know enough of Elixir to make it frictionless.
>> So we need some help with this.
>> 
>> The master is split in applications, and those will all be pushed to Hex.
>> That is a good start for any Elixir setup, I guess.
>> 
>> The main zotonic.hrl is mainly included because we like to poke around in 
>> #context{} (which we shouldn’t) and to use the ?DEBUG/1 macro.
>> 
>> There are some other macros in there, but they are not essential.
>> So it is not really needed for building modules etc.
>> 
>> We welcome help to make Zotonic work with Elixir!
>> 
>> Arjan could probably help as well - though he is very busy right now.
>> 
>> Cheers, Marc
>> 
>> 
>>> On 29 Sep 2017, at 03:17, Allen Wyma >> <mailto:allen.w...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> Does anyone have a guide with how to use elixir with Zotonic? We're a ruby 
>>> house that's looking to switch to elixir, but sometimes we get projects 
>>> that seem to work better for a CMS. When I saw this project, I was quite 
>>> amazed and we'd like to start to experiment a bit with it.
>>> 
>>> Is it possible to have a guide of how to use elixir with Zotonic? I've 
>>> tried looking a bit at the code for erlang, and it includes references to 
>>> hrl (erlang macro/header files) which are not supported in elixir. This is 
>>> probably my biggest question of how to translate over the code.
>>> 
>>> Thanks
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Zotonic developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to zotonic-developers+unsubscr...@googlegroups.com 
>>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com 
>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-28 Thread Marc Worrell
Hi Allen,

Two weeks ago David de Boer and I had a look at how Elixir and 
Erlang could be mixed.

We concluded that it all should be possible to do with the master.
But also that we didn’t know enough of Elixir to make it frictionless.
So we need some help with this.

The master is split in applications, and those will all be pushed to Hex.
That is a good start for any Elixir setup, I guess.

The main zotonic.hrl is mainly included because we like to poke around in 
#context{} (which we shouldn’t) and to use the ?DEBUG/1 macro.

There are some other macros in there, but they are not essential.
So it is not really needed for building modules etc.

We welcome help to make Zotonic work with Elixir!

Arjan could probably help as well - though he is very busy right now.

Cheers, Marc


> On 29 Sep 2017, at 03:17, Allen Wyma  wrote:
> 
> Hi,
> 
> Does anyone have a guide with how to use elixir with Zotonic? We're a ruby 
> house that's looking to switch to elixir, but sometimes we get projects that 
> seem to work better for a CMS. When I saw this project, I was quite amazed 
> and we'd like to start to experiment a bit with it.
> 
> Is it possible to have a guide of how to use elixir with Zotonic? I've tried 
> looking a bit at the code for erlang, and it includes references to hrl 
> (erlang macro/header files) which are not supported in elixir. This is 
> probably my biggest question of how to translate over the code.
> 
> Thanks
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: [Zotonic-Usr] Re: Big changes coming to the 1.0-dev

2017-07-28 Thread Marc Worrell
Creating sites is a work-in-progress and has an open ticket attached to it.

A bit patience, we are working on it :)

Cheers, Marc

> On 28 Jul 2017, at 17:43, heiheshang  wrote:
> 
> Does the new version work exactly? I can not even create a new site
> 
> понедельник, 10 июля 2017 г., 19:51:41 UTC+9 пользователь Marc Worrell 
> написал:
> Mikael, you are brave! :-)
> 
> 
> About the _checkouts, I was thinking about using that for installing 
> user-defined modules/sites with the “umbrella” Zotonic app server.
> 
> But we could also just add the user modules and user sites directories as 
> sources to the rebar.config.
> 
> I guess a rebar extension or script can handle this.
> 
> We have an issue for this: https://github.com/zotonic/zotonic/issues/1743 
> <https://github.com/zotonic/zotonic/issues/1743>
> 
> - Marc
> 
> 
>> On 10 Jul 2017, at 12:49, Mikael Karlsson > 
>> wrote:
>> 
>> OK,
>> it was more a question what was feasible, but great if you treat it as a 
>> tip. :-) It is good to have when you are developing your site inside the 
>> zotonic directory tree. I guess you also need to add path to user/modules.
>> Maybe the _checkouts alternative is useful when you pull your site from a 
>> remote git repository and would like to keep it outside the zotonic 
>> directory structure?
>> 
>> Best Regards
>> Mikael
>> 
>> Den måndag 10 juli 2017 kl. 10:42:10 UTC+2 skrev da...@ddeboer.nl 
>> <http://ddeboer.nl/>:
>> I like using project_app_dirs 
>> <https://www.rebar3.org/v3/docs/configuration#section-directories> instead 
>> of creating a custom symlink strategy. Thanks for the tip!
>> 
>> David
>> 
>> 
>> On Sunday, July 9, 2017 at 7:00:56 PM UTC+2, Mikael Karlsson wrote:
>> >This BREAKS ALL existing Zotonic-master installs, so DO NOT UPGRADE!
>> 
>> Sorry I couldn't resist. At least not on my development machine.
>> 
>> So if it is to early for questions just ignore :-)
>> 
>> Concerning the point "user module/site handling with _checkouts" I tried to 
>> symlink to my user/sites/ directory from _checkouts but nothing 
>> happened. Adding it in the rebar.config to default app dirs like:
>> 
>> {project_app_dirs, ["apps/*", "lib/*", ".","user/sites/*"]}.
>> 
>> Makes it work. The compiled app ends up under the _build directory together 
>> with the modules, I cannot judge if this is any problem though.
>> 
>> Best Regards
>> Mikael
>> 
>> Den tisdag 4 juli 2017 kl. 23:42:51 UTC+2 skrev Marc Worrell:
>> Hi,
>> 
>> We are preparing a huge update to the 1.0-dev (aka master) branch.
>> 
>> This update will make Zotonic compatible with Erlang OTP projects.
>> All modules and sites become OTP applications.
>> 
>> This BREAKS ALL existing Zotonic-master installs, so DO NOT UPGRADE!
>> 
>> 
>> And now for some Q&A.
>> 
>> 
>> What is changing?
>> 
>>  * All sites must become Erlang OTP applications
>>  * All modules must become Erlang OTP applications
>>  * Zotonic is being split up in different apps, for better re-use
>>  * All Zotonic parts are published as separate packages to hex.pm 
>> <http://hex.pm/>
>>  * Use the hex package manager for module installations
>>  * The zotonic umbrella project which can be used for core development
>>  * There will be separate “starter” projects for easy development
>>  * rebar3 templates for creating 
>> 
>> 
>> When will what happen?
>> 
>> In the coming days we will merge the OTP branch into master.
>> The pull request is: https://github.com/zotonic/zotonic/pull/1717 
>> <https://github.com/zotonic/zotonic/pull/1717>
>> 
>> After this we will update with some missing pieces:
>> 
>>  - rebar3 templates https://github.com/zotonic/zotonic/issues/1737 
>> <https://github.com/zotonic/zotonic/issues/1737>
>>  - hex for module installs https://github.com/zotonic/zotonic/issues/1742 
>> <https://github.com/zotonic/zotonic/issues/1742>
>>  - user module/site handling with _checkouts 
>> https://github.com/zotonic/zotonic/issues/1743 
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fzotonic%2Fzotonic%2Fissues%2F1743&sa=D&sntz=1&usg=AFQjCNFSZx0swvWTkHus32C-zD0-oBRciQ>
>> 
>> After we added logging we can call it a release candidate.
>> 
>> 
>> What is the overall structure of a site/module?
>> 
>> Template, css, js etc. all move into the p

[Zotonic-Dev] Re: [Zotonic-Usr] Re: Big changes coming to the 1.0-dev

2017-07-10 Thread Marc Worrell
Mikael, you are brave! :-)


About the _checkouts, I was thinking about using that for installing 
user-defined modules/sites with the “umbrella” Zotonic app server.

But we could also just add the user modules and user sites directories as 
sources to the rebar.config.

I guess a rebar extension or script can handle this.

We have an issue for this: https://github.com/zotonic/zotonic/issues/1743

- Marc


> On 10 Jul 2017, at 12:49, Mikael Karlsson  wrote:
> 
> OK,
> it was more a question what was feasible, but great if you treat it as a tip. 
> :-) It is good to have when you are developing your site inside the zotonic 
> directory tree. I guess you also need to add path to user/modules.
> Maybe the _checkouts alternative is useful when you pull your site from a 
> remote git repository and would like to keep it outside the zotonic directory 
> structure?
> 
> Best Regards
> Mikael
> 
> Den måndag 10 juli 2017 kl. 10:42:10 UTC+2 skrev da...@ddeboer.nl:
> I like using project_app_dirs 
> <https://www.rebar3.org/v3/docs/configuration#section-directories> instead of 
> creating a custom symlink strategy. Thanks for the tip!
> 
> David
> 
> 
> On Sunday, July 9, 2017 at 7:00:56 PM UTC+2, Mikael Karlsson wrote:
> >This BREAKS ALL existing Zotonic-master installs, so DO NOT UPGRADE!
> 
> Sorry I couldn't resist. At least not on my development machine.
> 
> So if it is to early for questions just ignore :-)
> 
> Concerning the point "user module/site handling with _checkouts" I tried to 
> symlink to my user/sites/ directory from _checkouts but nothing 
> happened. Adding it in the rebar.config to default app dirs like:
> 
> {project_app_dirs, ["apps/*", "lib/*", ".","user/sites/*"]}.
> 
> Makes it work. The compiled app ends up under the _build directory together 
> with the modules, I cannot judge if this is any problem though.
> 
> Best Regards
> Mikael
> 
> Den tisdag 4 juli 2017 kl. 23:42:51 UTC+2 skrev Marc Worrell:
> Hi,
> 
> We are preparing a huge update to the 1.0-dev (aka master) branch.
> 
> This update will make Zotonic compatible with Erlang OTP projects.
> All modules and sites become OTP applications.
> 
> This BREAKS ALL existing Zotonic-master installs, so DO NOT UPGRADE!
> 
> 
> And now for some Q&A.
> 
> 
> What is changing?
> 
>  * All sites must become Erlang OTP applications
>  * All modules must become Erlang OTP applications
>  * Zotonic is being split up in different apps, for better re-use
>  * All Zotonic parts are published as separate packages to hex.pm 
> <http://hex.pm/>
>  * Use the hex package manager for module installations
>  * The zotonic umbrella project which can be used for core development
>  * There will be separate “starter” projects for easy development
>  * rebar3 templates for creating 
> 
> 
> When will what happen?
> 
> In the coming days we will merge the OTP branch into master.
> The pull request is: https://github.com/zotonic/zotonic/pull/1717 
> <https://github.com/zotonic/zotonic/pull/1717>
> 
> After this we will update with some missing pieces:
> 
>  - rebar3 templates https://github.com/zotonic/zotonic/issues/1737 
> <https://github.com/zotonic/zotonic/issues/1737>
>  - hex for module installs https://github.com/zotonic/zotonic/issues/1742 
> <https://github.com/zotonic/zotonic/issues/1742>
>  - user module/site handling with _checkouts 
> https://github.com/zotonic/zotonic/issues/1743 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fzotonic%2Fzotonic%2Fissues%2F1743&sa=D&sntz=1&usg=AFQjCNFSZx0swvWTkHus32C-zD0-oBRciQ>
> 
> After we added logging we can call it a release candidate.
> 
> 
> What is the overall structure of a site/module?
> 
> Template, css, js etc. all move into the priv directory.
> All Erlang source files move into the src directory
> 
> Example:
> 
>   mysite /
>   src /
>   mysite.app.src
>   mysite.erl
>   controllers / 
>   controller_test_foo.erl
>   models /
>   …
>   priv /
>   zotonic_site.config
>   templates / 
>   …
>   lib /
>   …
> 
> 
> We will keep you updated via the list.
> 
> Cheers, Marc
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic users" group.
> To unsubscribe from this group a

[Zotonic-Dev] Big changes coming to the 1.0-dev

2017-07-04 Thread Marc Worrell
Hi,

We are preparing a huge update to the 1.0-dev (aka master) branch.

This update will make Zotonic compatible with Erlang OTP projects.
All modules and sites become OTP applications.

This BREAKS ALL existing Zotonic-master installs, so DO NOT UPGRADE!


And now for some Q&A.


What is changing?

 * All sites must become Erlang OTP applications
 * All modules must become Erlang OTP applications
 * Zotonic is being split up in different apps, for better re-use
 * All Zotonic parts are published as separate packages to hex.pm
 * Use the hex package manager for module installations
 * The zotonic umbrella project which can be used for core development
 * There will be separate “starter” projects for easy development
 * rebar3 templates for creating 


When will what happen?

In the coming days we will merge the OTP branch into master.
The pull request is: https://github.com/zotonic/zotonic/pull/1717

After this we will update with some missing pieces:

 - rebar3 templates https://github.com/zotonic/zotonic/issues/1737
 - hex for module installs https://github.com/zotonic/zotonic/issues/1742
 - user module/site handling with _checkouts 
https://github.com/zotonic/zotonic/issues/1743

After we added logging we can call it a release candidate.


What is the overall structure of a site/module?

Template, css, js etc. all move into the priv directory.
All Erlang source files move into the src directory

Example:

mysite /
src /
mysite.app.src
mysite.erl
controllers / 
controller_test_foo.erl
models /
…
priv /
zotonic_site.config
templates / 
…
lib /
…


We will keep you updated via the list.

Cheers, Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Form mask on submit

2017-07-03 Thread Marc Worrell
Nobody yet.

But will be solved, I have some ideas.
Right now we are a bit busy with making Zotonic 1.0-dev OTP compatible.

Cheers, Marc


> On 02 Jul 2017, at 12:15, heiheshang  wrote:
> 
> Who solved the problem?
> 
> понедельник, 19 июня 2017 г., 20:26:56 UTC+9 пользователь Kirill Sysoev 
> написал:
> Hi List,
> 
> Moved to master/cowmachine recently and can see that there is no automatic 
> form mask after form submit  anymore.
> 
> With 0.x, right after I hit Submit button, form was masked waiting for 
> postback would be processed on server. 
> 
> Does anyone experience the same, or it's just my local glitch?
> 
> Regards,
> Kirill
>  
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Form mask on submit

2017-06-20 Thread Marc Worrell

> On 20 Jun 2017, at 05:59, heiheshang  wrote:
> 
> Hi.
> 
> I have the same problem with the mask.
> 
> If the field is empty, no message appears, livevalidation incorrectly 
> processes events

You mean with the ‘presence’ validation?
And then the failure message?

- Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Form mask on submit

2017-06-19 Thread Marc Worrell
Still weird.

We should get this back to working order, I also like this automatic masking a 
lot.

Hmmm, thinking of which, I might know what the problem is.
The mask is placed if we didn’t get an ack within N msec.
But now, all postbacks are running as async jobs connected to the session.
So the ack is coming back, but the result is not there yet.

So we have to come up with some other “trick” to get this working again….

Can you file an issue on GitHub, then we can look into solutions there?

- Marc


> On 19 Jun 2017, at 13:37, Kirill Sysoev  wrote:
> 
> Hi Marc!
> 
> Thanks for the answer.
> 
> No, it's over there:
> ==
> {% lib
>   "js/modules/jquery.loadmask.js"
>   "js/modules/livevalidation-1.3.js"
>  %}
> ===
> 
> I did a funny workaround and it works:
> 
> {% wire action={connect signal={page_mask_signal 
> signal_filter=m.kazoo.signal_filter}
> action={update template="_z_add_page_mask.tpl"}
>}
> %}
> ==
> _z_add_page_mask.tpl:
> {% wire action={mask target=m.signal[signal].target} %}
> ===
> mod_signal:emit({page_mask_signal
> ,?SIGNAL_FILTER(Context) ++ [{'target', 
> "sign_in_form"}]
> }
>,Context),
> ===
> 
> If no one else experiences such a behaviour, will check locally what else 
> could spoil my life :)
> 
> Thanks again!
> 
> Regards,
> Kirill
> 
> понедельник, 19 июня 2017 г., 14:28:02 UTC+3 пользователь Marc Worrell 
> написал:
> I think it is a local thing.
> 
> Maybe the jquery.loadmask.js is not included?
> 
> - Marc
> 
> 
>> On 19 Jun 2017, at 12:47, Kirill Sysoev > 
>> wrote:
>> 
>> Hi List,
>> 
>> Moved to master/cowmachine recently and can see that there is no automatic 
>> form mask after form submit  anymore.
>> 
>> With 0.x, right after I hit Submit button, form was masked waiting for 
>> postback would be processed on server. 
>> 
>> Does anyone experience the same, or it's just my local glitch?
>> 
>> Regards,
>> Kirill
>>  
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Form mask on submit

2017-06-19 Thread Marc Worrell
I think it is a local thing.

Maybe the jquery.loadmask.js is not included?

- Marc


> On 19 Jun 2017, at 12:47, Kirill Sysoev  wrote:
> 
> Hi List,
> 
> Moved to master/cowmachine recently and can see that there is no automatic 
> form mask after form submit  anymore.
> 
> With 0.x, right after I hit Submit button, form was masked waiting for 
> postback would be processed on server. 
> 
> Does anyone experience the same, or it's just my local glitch?
> 
> Regards,
> Kirill
>  
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] What is this error? How to fix it?

2017-05-22 Thread Marc Worrell
And, how does the request URL look like?

- Marc

Sent from my iPhone

> On 22 May 2017, at 18:05, heiheshang  wrote:
> 
> What is this error? How to fix it?
> zotonic  | 2017-05-22 10:58:19.565 [error] 
> <0.32044.6>@cowmachine:request_1:72 stop_request 500 (reason 
> {function_clause,[{controller_file,drop_dotdot_1,[[<<"fonts">>,<<"icons">>,<<"icons.eot')
>  
> format('embedded-opentype'),url('..">>,<<"fonts">>,<<"icons">>,<<"icons.ttf') 
> format('truetype'),url('..">>,<<"fonts">>,<<"icons">>,<<"icons.woff') 
> format('woff'),url('..">>,<<"fonts">>,<<"icons">>,<<"icons.svg') 
> format('svg">>],[]],[{file,"modules/mod_base/controllers/controller_file.erl"},{line,254}]},{controller_file,drop_dotdot,1,[{file,"modules/mod_base/controllers/controller_file.erl"},{line,250}]},{controller_file,get_file_info_cfg,2,[{file,"modules/mod_base/controllers/controller_file.erl"},{line,214}]},{controller_file,service_available,1,[{file,"modules/mod_base/controllers/controller_file.erl"},{line,51}]},{cowmachine_decision_core,controller_call,3,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine_decision_core.erl"},{line,55}]},{cowmachine_decision_core,decision,3,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine_decision_core.erl"},{line,158}]},{cowmachine_decision_core,handle_request,2,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine_decision_core.erl"},{line,34}]},{cowmachine,request_1,6,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine.erl"},{line,64}]}]})
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] What is this error? How to fix it?

2017-05-22 Thread Marc Worrell
Looks like a problem in the SVG sanitizer. Can you sends us the SVG file?

Best, Marc

Sent from my iPhone

> On 22 May 2017, at 18:05, heiheshang  wrote:
> 
> What is this error? How to fix it?
> zotonic  | 2017-05-22 10:58:19.565 [error] 
> <0.32044.6>@cowmachine:request_1:72 stop_request 500 (reason 
> {function_clause,[{controller_file,drop_dotdot_1,[[<<"fonts">>,<<"icons">>,<<"icons.eot')
>  
> format('embedded-opentype'),url('..">>,<<"fonts">>,<<"icons">>,<<"icons.ttf') 
> format('truetype'),url('..">>,<<"fonts">>,<<"icons">>,<<"icons.woff') 
> format('woff'),url('..">>,<<"fonts">>,<<"icons">>,<<"icons.svg') 
> format('svg">>],[]],[{file,"modules/mod_base/controllers/controller_file.erl"},{line,254}]},{controller_file,drop_dotdot,1,[{file,"modules/mod_base/controllers/controller_file.erl"},{line,250}]},{controller_file,get_file_info_cfg,2,[{file,"modules/mod_base/controllers/controller_file.erl"},{line,214}]},{controller_file,service_available,1,[{file,"modules/mod_base/controllers/controller_file.erl"},{line,51}]},{cowmachine_decision_core,controller_call,3,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine_decision_core.erl"},{line,55}]},{cowmachine_decision_core,decision,3,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine_decision_core.erl"},{line,158}]},{cowmachine_decision_core,handle_request,2,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine_decision_core.erl"},{line,34}]},{cowmachine,request_1,6,[{file,"/srv/zotonic/_build/default/lib/cowmachine/src/cowmachine.erl"},{line,64}]}]})
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Infinite redirect. I see that the page is constantly reloading, I see such a request

2017-05-15 Thread Marc Worrell
“page_invalid” means that the page-id was not found with this session-id.

It might be that there is no z_pageid set on the page.
Which could well be as the page_id in the pong is set to ‘undefined’.

Can you check that?

This could be the result of some javascript errors.
Try to break on the ‘ping’ code in the javascript and check the console (and 
the global z_pageid)

Try also to break on the (javascript) function z_set_page_id, which should be 
called from the startup code.

- Marc




> On 14 May 2017, at 18:15, heiheshang  wrote:
> 
> #{'z_msg_ack',1,24~$ws-lewhum7iXxZo1M6FnBYr~,'page',32~KHjufe8ZxQh7dXSeSUNcEURaT6DQCGDu~,'undefined','pong'}&{'z_msg_v1',0,'false',32~E0MPTmERQkwTc7nwoqiayx9o8osDSEZW~,1494778330579,'ubf','session','undefined','undefined','undefined',12~page_invalid~}&{'z_msg_v1',0,'false',32~jwvGl4F7B0YTSo3UcRdem913CF5n3wAn~,1494778330579,'ubf','session','undefined','undefined','undefined',12~page_invalid~}&$
> 
> Infinite redirect. I see that the page is constantly reloading, I see such a 
> request
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] authbind ?

2017-04-26 Thread Marc Worrell
Is there a difference between authbind in a container and on a “real” system?

- Marc


> On 24 Apr 2017, at 17:49, heiheshang  wrote:
> 
> How to use authbind if i start zotonik in docker container?
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Zotonic on Cloud 9

2017-04-10 Thread Marc Worrell
Cool :-)

So they terminate SSL for you.
Makes sense with that proxy thing of theirs.

- Marc


> On 07 Apr 2017, at 20:52, Milan Kosir  wrote:
> 
> It works :)
> 
> Got reply from c9 support:
> https://community.c9.io/t/there-was-an-error-proxying-the-request-please-help/15131/2
> 
> Got this nice screen...
> 
>  
> 
> 
> Thanks for support!
> 
> 
> 
> BR Milan
> 
> 
> 
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Zotonic on Cloud 9

2017-04-07 Thread Marc Worrell
Looking at their forum it seems that c9.io is quite unresponsive indeed.

And with this kind of vague errors they are not really helping…

I am not completely sure what the advantage of c9 is.
But if you like to try a VPS then you could also checkout Scaleway.
They start at €2.99 / month.

https://www.scaleway.com/pricing/

(Didn’t work with them, just heard good stories)

- Marc


> On 07 Apr 2017, at 16:00, Milan Kosir  wrote:
> 
> I actually don't know how to get proxy log, c9 support doesn't react... I've 
> seen similar questions on their forum with no response.
> 
> In my browser I got these headers:
> 
> Request URL:https://phoenixtonic-infocube.c9users.io:8080/
> Request Method:GET
> Status Code:503 Service Unavailable
> Remote Address:35.187.1.119:8080
> Referrer Policy:no-referrer-when-downgrade
> Response Headers
> view source
> Date:Fri, 07 Apr 2017 13:52:15 GMT
> Transfer-Encoding:chunked
> X-BACKEND:apps-proxy
> Request Headers
> view source
> Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
> Accept-Encoding:gzip, deflate, sdch, br
> Accept-Language:hr,en-US;q=0.8,en;q=0.6,it;q=0.4,it-IT;q=0.2,sl;q=0.2,sr;q=0.2,de;q=0.2,und;q=0.2
> Cache-Control:max-age=0
> Connection:keep-alive
> DNT:1
> Host:phoenixtonic-infocube.c9users.io:8080
> Upgrade-Insecure-Requests:1
> User-Agent:Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like 
> Gecko) Chrome/57.0.2987.133 Safari/537.36
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Zotonic on Cloud 9

2017-04-06 Thread Marc Worrell
Curious which headers are counted as invalid … 

- M


> On 06 Apr 2017, at 16:52, Milan Kosir  wrote:
> 
> Ok, thanks, I posted on c9 help forum:
> https://community.c9.io/t/there-was-an-error-proxying-the-request-please-help/15131
> 
> BR, Milan
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Zotonic on Cloud 9

2017-04-06 Thread Marc Worrell
I guess for this you need the log of the proxy.

- M


> On 06 Apr 2017, at 16:36, Milan Kosir  wrote:
> 
> yes I know, but this is all I got from webpage.
> where can I get log? zotonic console doesn't say nothing...
> 
> 14:19:35.416 [info] zotonic:147 Web server listening on IPv4 any:8081, SSL 
> any::8080
> 14:19:35.737 [info] zotonic:183 Web server listening on IPv6 ::8081, SSL 
> ::8080
> 14:19:39.253 [info] zotonic_sup:117 
> 14:19:39.253 [info] zotonic_sup:128 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Zotonic on Cloud 9

2017-04-06 Thread Marc Worrell
That is not very helpful :-)

Any log files?

- Marc


> On 06 Apr 2017, at 16:25, Milan Kosir  wrote:
> 
> error_content:
> 
> The request could not be proxied because some headers contained invalid data.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] Re: Zotonic on Cloud 9

2017-04-06 Thread Marc Worrell

You can change the default ports in the config files in  ~/.zotonic/
Make sure you change the http, ssl and smtp ports.

(smtp defaults to 2525)

- Marc


> On 06 Apr 2017, at 13:37, Milan Kosir  wrote:
> 
> I installed zotonic on c9.io, but there is still a problem, because c9 ports 
> which I can use are only 8080,8081 and 8082 
> (https://docs.c9.io/docs/multiple-ports). Where can I change zotonic port 
> 8000 to 8080?
> 
> so to say, I would like this line:
> 11:31:02.074 [info] zotonic:183 Web server listening on IPv6 ::8000, SSL 
> ::8443
> to be like this: 
> 11:31:02.074 [info] zotonic:183 Web server listening on IPv6 ::8081, SSL 
> ::8080
> 
> Thanks in advance for any hint!
> 
> On Thursday, 6 April 2017 00:03:43 UTC+2, Milan Kosir wrote:
> I want to learn zotonic while on my tablet/laptop, so I'm trying to install 
> it on cloud9 virtual ubuntu box (my prefered dev environment), having some 
> problems. Does anyone has experience of installing/using zotonic on c9.io 
> ? Thanks for any reply.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] [Postgres] Running out of number for auto-increment primary key

2017-03-01 Thread Marc Worrell
Saw it, thanks!

- Marc


> On 01 Mar 2017, at 03:51, David Tran  wrote:
> 
> Github issue is submitted at #1623 
> <https://github.com/zotonic/zotonic/issues/1623>.
> 
> Regards,
> David
> 
> On Tuesday, February 28, 2017 at 4:37:29 PM UTC+7, Marc Worrell wrote:
> Good question.
> 
> The initial datamodel we are working with is from 2009.
> Back then there were quite some 32 bit machines, now replaced with 64 bits.
> 
> For all core modules it is quite straightforward to replace int with bigint.
> It needs some work on other, external, modules.
> But that could be done bit by bit.
> 
> Maybe you could add an issue on GitHub?
> Then we can take the discussion there.
> 
> - Marc
> 
>> On 28 Feb 2017, at 08:08, David Tran > wrote:
>> 
>> Hi all,
>> 
>> 1. I see that Zotonic uses integer as id for auto-increment primary key in 
>> Postgres tables such as rsc, edge. Max value of an interger is 2147483647. 
>> Let's say I have a rather heavy traffic site that will allow members to 
>> insert 1000 pages per second continuously. Would I run out of number for id 
>> in about 25 days?
>> 2. If #1 is true, how would I use bigserial as id in our Postgres schema?
>> 
>> Regards,
>> David
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] [Postgres] Running out of number for auto-increment primary key

2017-02-28 Thread Marc Worrell
Good question.

The initial datamodel we are working with is from 2009.
Back then there were quite some 32 bit machines, now replaced with 64 bits.

For all core modules it is quite straightforward to replace int with bigint.
It needs some work on other, external, modules.
But that could be done bit by bit.

Maybe you could add an issue on GitHub?
Then we can take the discussion there.

- Marc

> On 28 Feb 2017, at 08:08, David Tran  wrote:
> 
> Hi all,
> 
> 1. I see that Zotonic uses integer as id for auto-increment primary key in 
> Postgres tables such as rsc, edge. Max value of an interger is 2147483647. 
> Let's say I have a rather heavy traffic site that will allow members to 
> insert 1000 pages per second continuously. Would I run out of number for id 
> in about 25 days?
> 2. If #1 is true, how would I use bigserial as id in our Postgres schema?
> 
> Regards,
> David
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Zotonic-Dev] scomp pager ?

2017-02-27 Thread Marc Worrell
On master I now added an extra “template” argument to the pager scomp.

- Marc


> On 27 Feb 2017, at 10:01, Marc Worrell  wrote:
> 
> That is a good question.
> 
> I see that right now we can’t have an optional parameter to change the 
> template.
> 
> What you could do is test in _pager.tpl which dispatch rule is being used.
> The admin uses only a very limited number of dispatch rules.
> 
> I think we should add an optional ‘template’ argument to the pager scomp….
> 
> - Marc
> 
> 
>> On 26 Feb 2017, at 15:13, heiheshang > <mailto:strangerfuture2...@gmail.com>> wrote:
>> 
>> how can you change scomp pager template for the public part, without 
>> affecting the admin template?
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com 
>> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   >