mysociety / fixmystreet

This is mySociety's popular map-based reporting platform: easy to install in new countries and regions
http://fixmystreet.org/
Other
507 stars 235 forks source link

Error when trying to create a new report (web) #494

Closed vvergnolle closed 10 years ago

vvergnolle commented 11 years ago

Hello

I'm trying to install the fixmystreet plateform (in french) and I was doing it well until now. Let me explain.

I have installed the plateform and I have a problem when I'm trying to create a new report with the website.

The left panel show the form for creating a new report but an ajax call at 'report/new/report_form_ajax' url return this message: 'That location does not appear to be covered by a council; perhaps it is offshore or outside the country. Please try again' and the form disappear.

I don't know why. I already set the langage in french and I already update the conf/general.yml file with the global mapit url and I have added my boundaries in the whitelist.

Does someone know what could be the problem ? And if I have doing something wrong ?

Thank you by advance.

(and sorry for my english)

dracos commented 11 years ago

Could you paste your general.yml file somewhere? Is your installation publicly viewable? That code, if I remember right, is called when you first get a map too, so it's odd if it's working there, but then not when you click on the map.

vvergnolle commented 11 years ago

Thanks for your reply,

For answering to your question, no my installation isn't public. I work in local.

I would like to know if I have correctly understood the configuration keys.

The configuration key 'MAPIT_WHITELIST' is for having a restriction by region on the map, am I right ?

But I don't understand the usefulness of the 'MAPIT_TYPES' key.

I already have filled the 'MAPIT_WHITELIST' key. Do I need both ?

Link to my 'general.yml' : https://dl.dropboxusercontent.com/u/54953699/general.yml

dracos commented 11 years ago

(I think you might mean 363198, France métropolitaine, not 363598 for your second ID number.)

Yes, you need to set MAPIT_TYPES, in your case currently to [ 'O02', 'O04', 'O06' ] (to match the types of the IDs you are using, as the comment above this variable in the file mentions). This is because it uses MAPIT_TYPES first to fetch areas, before restricting to the whitelist. Not perfect, but the code historically was for all areas within a particular MapIt type. It also makes the lookup quicker.

If I use your WHITELIST and set MAPIT_TYPES, but have no bodies in the database, then I am able to search for "Paris" and the "no contact information" text shows the four areas when I click on the map; also searching for Corsica or French Guyana seems to do what I would expect (I'm quite pleased French Guyana works in fact!)

We have had contacts from other people in France concerning reuse of FixMyStreet, would you like to be put in touch with them?

vvergnolle commented 11 years ago

Yes, this would be more practice for expressing myself.

Thanks again for your help.