physicaltherapistcom
Forum Replies Created
-
AuthorPosts
-
July 23, 2014 at 6:49 pm in reply to: Imported Listings, now they all show 404 unless I update each individually?? #9640This reply has been marked as private.July 23, 2014 at 5:30 pm in reply to: Imported Listings, now they all show 404 unless I update each individually?? #9619This reply has been marked as private.
Hi Paolo,
Where exactly with the “new update” is this fixed? Where can I edit this information? Please let me know.
Thanks.
Now I see…
It looks like with a default install of just the GEODirectory plugin, the default location gets a location_id equal to 0. Which causes the first if statement listed above to be true which then, based on the logic, will causes any imported places to fail if they are not at the default location.
When the GEODirectory Location Manager is installed, the default location’s location_id gets set to 1 which skips that check.
I would propose either the message generated from the import when not using the Location Manager is revised and notify the user that the imported items were not at the default location and possibly give them a hint to install the location manager.
You may also want to give some type of hint near the sample csv download to let users know it only works if the location manager is installed.
Stepping through the debugger, it’s actually happening here (lines 1218-1247):
$location_result = geodir_get_default_location(); if($location_result->location_id == 0 ){ if((!isset($gd_post_info['post_city']) || strtolower($gd_post_info['post_city']) != strtolower($location_result->city)) || (!isset($gd_post_info['post_region']) || strtolower($gd_post_info['post_region']) != strtolower($location_result->region)) || (!isset($gd_post_info['post_country']) || strtolower($gd_post_info['post_country']) != strtolower($location_result->country)) || (!isset($gd_post_info['post_address']) || $gd_post_info['post_address']=='') || (!isset($gd_post_info['post_latitude']) || $gd_post_info['post_latitude'] == '') || (!isset($gd_post_info['post_longitude']) || $gd_post_info['post_longitude'] == '')){ $address_invalid++; continue; } }else{ if((!isset($gd_post_info['post_city']) || $gd_post_info['post_city'] == '') || (!isset($gd_post_info['post_region']) || $gd_post_info['post_region'] == '') || (!isset($gd_post_info['post_country']) || $gd_post_info['post_country'] == '') || (!isset($gd_post_info['post_address']) || $gd_post_info['post_address']=='') || (!isset($gd_post_info['post_latitude']) || $gd_post_info['post_latitude'] == '') || (!isset($gd_post_info['post_longitude']) || $gd_post_info['post_longitude'] == '')){ $address_invalid++; continue; } }
The sample upload matched the first long “if isset” conditional, increments $address_invalid and continues.
If I’m looking at it correctly, talking about the sample file:
It pulls the default location, which I have set.
Then it compares data pulled from the csv and fails if one of the location keys do not exists (which they do) or if the city, region or country key does not equal the default location.Pretty sure thats whats getting it. Why does each imported record need to match the default location?
Hello,
Thanks for your response. Yes, I understand there are no search results, but it should let you know that there are no results for “something.” Can you let me know where this can be fixed in the code or add it in a release?
Please advise.
Thanks!
I replaced the admin_funcitons.php but still get the same results.
Any other options?
*Edit* – As a side note, the admin_functions.php file from the post is identical to the one shipped with v1.1.6
Hello,
This did fix the problem. You might want to release this so people know that they now must make a folder and name it /child-theme/geodirectory.
Thanks!
This reply has been marked as private.Hi Paolo,
I now have the map working, but it’s odd how it works.
1. In Design > Maps I have two custom post types:
— Places
— Find PT/Clinic2. The map will ONLY show if I have places selected. Why is this?
3. Also, if I select BOTH “placs” and “find pt/clinic” no map shows. Why is this?
This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.June 24, 2014 at 10:19 pm in reply to: Internal Server Error when adding code to existing template #5975Hello Paolo,
How do I get and install the new template system? These are files that will work on an existing theme correct?
Please advise.
Thanks.
-
AuthorPosts