Repository: OCHA-DAP/hdx-ckan

Issue:
Error messages
This error is back :)
![displayed-messages](https://cloud.githubusercontent.com/assets/3865844/3357669/b2090544-fad4-11e3-9a5c-53d731325844.png)



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
@@ -12,7 +12,7 @@
 import ckan.lib.mailer as mailer
 import ckan.model as model
 
-class HDXOrgController(base.BaseController):
+class HDXReqsOrgController(base.BaseController):
 
     def _send_mail(self, user, sys_admin, org, message = ''):
         body = _('New request membership\n' \
@@ -27,7 +27,7 @@ def _send_mail(self, user, sys_admin, org, message = ''):
         mailer.mail_recipient(sys_admin['display_name'], sys_admin['email'], _('New Request Membership'), body)
         return
 
-    def request_membership(self, id):
+    def request_membership(self, org_id):
         '''
             user_email, name of user, username, organization name,  list with sys-admins emails,
         '''
@@ -36,19 +36,19 @@ def request_membership(self, id):
             user = hdx_h.hdx_get_user_info(c.user)
             context = {'model': model, 'session': model.Session,
                        'user': c.user or c.author}
-            org_admins = tk.get_action('member_list')(context,{'id':id,'capacity':'admin','object_type':'user'})
+            org_admins = tk.get_action('member_list')(context,{'id':org_id,'capacity':'admin','object_type':'user'})
             admins=[]
             for admin_tuple in org_admins:
                 admin_id = admin_tuple[0]
                 admins.append(hdx_h.hdx_get_user_info(admin_id))
             admins_with_email = (admin for admin in admins if admin['email'])
             for admin in admins_with_email :
-                self._send_mail(user, admin, id, msg)
+                self._send_mail(user, admin, org_id, msg)
             h.flash_success(_('Message sent'))
         except:
             h.flash_error(_('Request can not be sent. Contact an administrator'))
-        h.redirect_to(controller='organization', action='read', id=id)
-    
+        h.redirect_to(controller='organization', action='read', id=org_id)
+        
 
     
     
\ No newline at end of file
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
@@ -52,7 +52,7 @@ def before_map(self, map):
         
         map.connect('/count/test', controller='ckanext.hdx_theme.count:CountController', action='test')
         
-        map.connect('/organization/{id}/request_membership', controller='ckanext.hdx_theme.org_controller:HDXOrgController', action='request_membership')
+        map.connect('/organization/{id}/request_membership', controller='ckanext.hdx_theme.org_controller:HDXReqsOrgController', action='request_membership')
         map.connect('/organization/members/{id}', controller='ckanext.hdx_theme.member_controller:HDXOrgMemberController', action='members')
         map.connect('/dataset/preselect', controller='ckanext.hdx_theme.preselect_dsform_controller:HDXPreselectOrgController', action='preselect')
 


Test patch: