mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
76 stars 33 forks source link

Error when rendering an organization with lots of memberships #774

Open chrismytton opened 9 years ago

chrismytton commented 9 years ago

http://kenyan-politicians.popit.staging.mysociety.org/organizations/core_organisation:513 is currently returning the following error:

500 Error: Error rendering 'organization/view.html': RangeError: Maximum call stack size exceeded
   at Template.render (/data/vhost/popit.staging.mysociety.org/popit/node_modules/underscore-template-additions/index.js:106:11)
   at /data/vhost/popit.staging.mysociety.org/popit/node_modules/underscore-template-additions/index.js:174:26
   at Template.loadFromDir (/data/vhost/popit.staging.mysociety.org/popit/node_modules/underscore-template-additions/index.js:27:12)
   at View.engine (/data/vhost/popit.staging.mysociety.org/popit/node_modules/underscore-template-additions/index.js:168:10)
   at View.render (/data/vhost/popit.staging.mysociety.org/popit/node_modules/express/lib/view.js:76:8)
   at Function.app.render (/data/vhost/popit.staging.mysociety.org/popit/node_modules/express/lib/application.js:525:10)
   at ServerResponse.res.render (/data/vhost/popit.staging.mysociety.org/popit/node_modules/express/lib/response.js:833:7)
   at /data/vhost/popit.staging.mysociety.org/popit/lib/apps/organization.js:49:9
   at callbacks (/data/vhost/popit.staging.mysociety.org/popit/node_modules/express/lib/router/index.js:164:37)
   at param (/data/vhost/popit.staging.mysociety.org/popit/node_modules/express/lib/router/index.js:138:11)

Looks like it's something to do with recursion in the templates while trying to render all the memberships.