• I’ve installed Gantry 5 Framework plugin and the g5 hydrogen theme in a local ServerPress clean WordPress install.

    I’ve the latest ServerPress version (ServerPress is a WordPress specific server app built on XAMPP) with the following stack:

    Apache/2.4.12 (Unix) OpenSSL/1.0.1m PHP/5.5.24 mod_perl/2.0.8-dev Perl/v5.16.3
    Database client version: libmysql - mysqlnd 5.0.11-dev - 20120503
    PHP version: 5.5.24

    When I first tried to access Layout section in Hydrogen Theme settings, I got this error message. Then again when I tried to access the Menu particle settings:

    500 Internal Server Error
    
    Oops, An exception has been thrown during the rendering of a template ("Invalid argument supplied for foreach()") in "forms/fields/menu/item.html.twig" at line 5..

    Perhaps the error was due to not having a menu created. (After starting this thread) I’ve created a menu and tried again to access the Menu particle settings, it seems to work.

    I just wanted this to be documented, it may help someone with similar issue.

    https://wordpress.org/plugins/gantry5/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Gantry

    (@gantry)

    Hi,

    Sorry for late reply. Can you please tell me if you had “Debug Mode” enabled in Hydrogen Theme -> Extras (top right corner) -> Platform Settings ?

    Because that would display error message instead of notice in the front end.

    Anyways I’m glad that it’s working fine for you now 🙂

    Thanks,
    Jakub

    I can confirm that this is still an issue.

    For me it happened when trying to access Settings or Layout pages before creating any menus. After creating a menu I am able to access those pages without the 500 error.

    I think this is a bug.

    Debug mode is not activated.

    Thanks,

    Plugin Author Gantry

    (@gantry)

    Thanks, we’ll investigate that!

    Plugin Author Gantry

    (@gantry)

    This should be fixed in the latest CI build and will be released with next update.

    Thanks!

    500 Internal Server Error

    Oops, An exception has been thrown during the rendering of a template (“array_merge(): Argument #1 is not an array”) in “forms/fields/menu/item.html.twig” at line 6..

    This error code pops up when I try to assign a menu to the “menu particle” in the Helium theme.

    PS: I am a newbie at Gantry framework, just started my first project. Please help

    Plugin Author Gantry

    (@gantry)

    Are you sure you’re running latest Gantry 5.3.2 ?

    Thanks,
    Jakub

    Theme: Helium (v5.3.2 / g5_helium)
    Gantry Version 5.3.2
    Timber Version 1.1.2

    The code from item.html.twig

    {% extends 'forms/fields/select/selectize.html.twig' %}
    
    {% block options %}
        {{ parent() }}
        {% if gantry.menu is not null %}
            {% for group, items in gantry.menu.getGroupedItems() %}
                {% if items|length %}
                <optgroup label="{{ group|capitalize }}">
                {% for key, item in items %}
                <option
                        {# required attribute structures #}
                        {% if key == value %}selected="selected"{% endif %}
                        value="{{ key }}"
                        {# non-gloval attribute structures #}
                        {% if field.options.disabled in ['on', 'true', 1] %}disabled="disabled"{% endif %}
                        >{{ item.spacing|raw }}{{ item.label }}</option>
                {% endfor %}
                </optgroup>
                {% endif %}
            {% endfor %}
        {% endif %}
    {% endblock %}

    Note: I have been using Gantry 5 hydrogen theme and I did not experience this problem.

    Tried a whole lot of things, but am unable to resolve this issue.
    This (Screen shot) is happening only with the “Menu particle” all other particles seem to work fine.
    Any kind of help will be greatly appreciated.

    Regards,
    Soorya

    Plugin Author Gantry

    (@gantry)

    Hi,

    Sorry, I’m on my holidays. I’ll be back next week to take a look at your issue.

    Thanks!
    Jakub

    Hello Jakub,
    Thanks for your kind gesture.
    I have got the solution for this issue here.

    Thanks again.

    Plugin Author Gantry

    (@gantry)

    Awesome! 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘500 Internal Server Error in local install’ is closed to new replies.