Closed magicspon closed 8 years ago
Hello,
I've just installed this plugin on the latest version of craft (2.6.2944) and I'm getting the following error when I go to the export tab.
Impossible to invoke a method ("getAllGroups") on a null variable
/craft/plugins/thearchitect/templates/blueprint.twig(302)
{% for group in craft.userGroups.getAllGroups() %} <tr class="group" data-id="{{ group.id }}" data-name="{{ group }}"> <th scope="row" class="name"> <input type="checkbox" id="group{{ group.id }}" class="checkbox" name="groupSelection[]" value="{{ group.id }}"> <label for="group{{ group.id }}">{{ group }}</label> </th> <td> <code>{{ group.handle }}</code> </td> </tr> {% endfor %}
I have fixed this by wrapping the loop with {% if craft.userGroups|length %} ... {% endif %}
{% if craft.userGroups|length %} ... {% endif %}
Thanks
Just submitted a pull request
Damn craft that function should be availed regardless of if groups exist or not. Maybe it saves memory not having it available? Turns out it is part of Craft Pro License.
Hello,
I've just installed this plugin on the latest version of craft (2.6.2944) and I'm getting the following error when I go to the export tab.
Impossible to invoke a method ("getAllGroups") on a null variable
/craft/plugins/thearchitect/templates/blueprint.twig(302)
I have fixed this by wrapping the loop with
{% if craft.userGroups|length %} ... {% endif %}
Thanks