Hi when I set one of the listing blocks (listing: Cities by State) active in a region I get this error message

Fatal error: Call to undefined function usamap() in ../sites/all/modules/listing/listing_location/listing_location.module on line 914

I have imported a zip codes table of South Africa.

The error message I get after restoring is : invalid State

After some more struggle i get this message: Invalid url. Please try again. Maybe this location is not in the database or maybe the province codes are invalid

And, this is where I went and cryed myself to sleep. My province codes was invalid. :(

Thanks
Posting this anyway as this breaks the site and might discourage other users that makes this stupid mistake.

Comments

vlooivlerke’s picture

Component: Miscellaneous » User interface
Category: support » bug
Status: Fixed » Active

No sorry, I still have this error when I activate (listing: Cities by State) block, and it breaks on the page I make it viable.

Also this block: ListingsListbyCity
Keeps showing: "No listings available. Please broaden your selection." even if a search returns content on the "listing-search/..." page.

My Working Blocks:
listing: Targeted Listings tag match
ListingsList: Block
listing: Targeted Listings city/state

Thanks

NewZeal’s picture

Thanks for the issue. I've fixed a small bug in the script which wasn't loading the usamap. Since this script is based on a module done for a USA site, there is not much provision yet for non-USA locations. However the map is just a backup and your block should be showing the provinces if the data is valid. Here I have it working for New Zealand: http://campus.sohtech.ac.nz/courses/nz/hawke%27s-bay/waimarama/all/all/25 .

The location module does not currently have New Zealand data for zipcodes and I got it from maxmind.com which required a little bit of editing to get right. The location module does not currently have the South Africa data and if you want it then that should be available from maxmind as well, but again some work will be required to get it right.

Download the dev to get the fix described above.

vlooivlerke’s picture

No, I still get the error with beta7,

But that is not my worry now, as all the other blocks work.

Why so many views, and why did you not incorporate all the page and block views in one view.
I had problems getting the map block to work but changing the Marker handling from Content type to Single Marker handling. This is due to me not installing the gmap locations module that gives you marker options per content type. Is the gmaplocation.module a must?

Also the distance selection does not work but will open a bug report on its own.
I am starting to like this module.

NewZeal’s picture

Thanks for the feedback. Try the latest dev version. I have fixed the distance bug and it now works.

I guess you could put all the views into one, but in the script I have to filter on the basis of the view and it is easier to filter on $view->name rather than a more complicated variable.

NewZeal’s picture

Status: Active » Fixed
vlooivlerke’s picture

ok, how about making a field where you can specify the $view->name 's to use your script.

In this way I can build a Feed view, a node reference view and more...

NewZeal’s picture

I have started doing something along those lines, which is to create functionality that allows users to select a different view display for different content types. As for being able to create a feed view or other views that is a different matter and would constitute a feature request.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.