We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

macro cause "This site can’t be reached"

{%- macro leaf_item(leaf, url) %}
    <li id="category_{{ leaf.getId() }}">
        <div class="item">
            <span class="title">{{ leaf.getTitle() }}</span>
            <span class="info">({{ leaf.getSlug() }})</span>
            <a href="{{ url }}category/admin/edit/{{ leaf.getId() }}"><i class="icon edit"></i></a>
            <a href="javascript:void(0);" onclick="deleteCategory({{ leaf.getId() }}, this)" class="delete"><i class="icon trash"></i></a>
        </div>
        {% if leaf.hasChildren() %}
            <ol>
                {% for child in leaf.children() %}
                    {{ leaf_item(child, url) }}
                {% endfor %}
            </ol>
        {% endif %}
    </li>
{%- endmacro %}

<div class="ui blue segment">
    You can drag and drop tree elements to change order and relations
</div>

{% for root, root_title in roots %}
    <div class="ui blue segment">
        <h3>{{ root_title }}</h3>

        <ol class="sortable" id="root_{{ root }}">

            {% set tree = category_helper.treeUpperLeafs(root) %}
            {% for leaf in tree %}
                {{ leaf_item(leaf, url.get()) }}
            {% endfor %}

        </ol>

        <a class="save ui button primary" id="save-root-{{ root }}" data-root="{{ root }}">
            <i class="save icon"></i> Save
        </a>
        <a href="javascript:void(0);" data-root="{{ root }}" class="add ui button positive">
            <i class="icon plus"></i> Add
        </a>
    </div>
{% endfor %}

I use macro volt template, but I can't open the page from yesterday. On my brower it's showing :

This site can’t be reached

The connection was reset. Try: Reloading the page Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET

....

If I delete endmacro block on view template, the page is available.

So, May I know what happend ? how to fix it ?

Did you update phalcon or something ?



5.2k

Did you update phalcon or something ? not yet. I am using windows10. And what I did before that is just update IIS service on my computer (I already disable it not)

edited May '16

Hm, could it possibly delete phalcon extension or change php version or even change php handlers or something ? I don't know anything about it. Just a guess.

Try to get more info about your error, enable detailed reporting first: https://forums.iis.net/t/1176836.aspx

IIS, Windows10. You applied patch by Microsoft. -_-

Have you tried your app on a real setup? I'm sure it will work.