Adding users to group does give JS errors

Permalink
When trying to assign a user to a group
index.php/ccm/system/dialogs/group/search?filter=assign

there's a bunch of JS errors:


ccm_addHeaderItem is not defined


<script type="text/javascript">ccm_addHeaderItem("/concrete/js/events.js", "JAVASCRIPT")</script>
<script type="text/javascript">ccm_addHeaderItem("/concrete/js/underscore.js", "JAVASCRIPT")</script>
<script type="text/javascript">ccm_addHeaderItem("/concrete/js/jquery-ui.js", "JAVASCRIPT")</script>
<script type="text/javascript">ccm_addHeaderItem("/concrete/js/dynatree.js", "JAVASCRIPT")</script>
<script type="text/javascript">ccm_addHeaderItem("/index.php/tools/required/i18n_dynatree_js", "JAVASCRIPT")</script>
<script type="text/javascript">ccm_addHeaderItem("/concrete/js/groups.js", "JAVASCRIPT")</script>
<script type="text/javascript">ccm_addHeaderItem("/concrete/css/dynatree.css", "CSS")</script>


It seems that something's wrong when C57 tries to inlcude its JS-Files.
I don't know where to look at. The
/concrete/elements/group/search.php
doesn't seem to load extra headers at all.

daenu
 
andrew replied on at Permalink Reply
andrew
You shouldn't ever browse directly to that URL – it's meant to be loaded in a dialog that gets added to a page that already has a bunch of javascript in it. ccm_addHeaderItem() is one of those calls. This should be called from the dashboard, which takes care of loading this.

If clicking on the assign groups button in the dashboard is actually taking you away from the page to the URL in question (and showing a white screen with javascript errors) there is probably a javascript error on the edit user screen. It'd be helpful to know what that is. Please uninstall any third party add-ons and turn off javascript and css caching (if it's on) before trying to deduce what is going on.
daenu replied on at Permalink Reply 1 Attachment
daenu
Thank you for replying. And, sorry for assuming that it could be a bug!
I did call that function from the dashboard (as any admin user would do).
I did a clean install on a local server and there everything is just fine.
I'm now on it to find out, where the problem could be.
The only thing I installed on the concerning project is the following theme:
https://www.concrete5.org/marketplace/themes/equinox...

Also I did the following overrides:
to eliminate the validation of state/province field:
1.
/application/attributes/address/controller.php

just for css purpose:
2.
/application/authentication/concrete/form.php

to give the
<input name="uName" ....
the attribute
type="text"


I didn't mentioned that in the PM because I really don't think the problem lies in my overrides.

Also, I post you the override config file (as .txt) from the equinox theme... maybe something is there.
path:
/application/config/generated_overrides/c5hub.php


Now that I know the problem not being in the system ;-) I'm on it to find the error, but if you have any suggestions...
When I find out, I'll naturally get back to you.
Thx again for your time (sry for my english, I'm not native speaking)
daenu replied on at Permalink Reply
daenu
Actually it is my override
/application/attributes/address/controller.php
which caused the problem. the user attributes for existent users weren't up to date before I override the
validateForm()


Oh man I didn't adapt the namespace either

Andrew, this is quite embarassing!!! Sry for having wasted your time!!

Folks if overriding, don't forget to adapt the Namespaces from
concrete/...
to
application/...
!!! Stupid me, RTFM!!!!