I would like to remove the map option

There is a need to remove the map option from the sharetribe platform.
Could you please advise how to do it?
Thank you in advance.

That should be easy, removing map from homepage, listings and profiles:

diff --git a/app/controllers/homepage_controller.rb b/app/controllers/homepage_controller.rb
index a1bba754a..6e7438ae5 100644
--- a/app/controllers/homepage_controller.rb
+++ b/app/controllers/homepage_controller.rb
@@ -4,7 +4,7 @@ class HomepageController < ApplicationController
   before_action :save_current_path, :except => :sign_in
 
   APP_DEFAULT_VIEW_TYPE = "grid"
-  VIEW_TYPES = ["grid", "list", "map"]
+  VIEW_TYPES = ["grid", "list"]
 
   # rubocop:disable AbcSize
   # rubocop:disable MethodLength
diff --git a/app/views/homepage/index.haml b/app/views/homepage/index.haml
index e5c50bc15..776830eb3 100644
--- a/app/views/homepage/index.haml
+++ b/app/views/homepage/index.haml
@@ -61,7 +61,7 @@
           = t(".filter")
 
     .home-toolbar-button-group{:class => listing_shape_menu_enabled || @category_menu_enabled ? "filters-enabled" : ""}
-      - ["grid", "list", "map"].each do |view_type|
+      - ["grid", "list"].each do |view_type|
         - selected_class = @view_type == view_type ? "selected" : ""
         = link_to search_path(search_params.merge(view: view_type)), :class => "home-toolbar-button-group-button #{selected_class}", :title => t("homepage.filters.#{view_type}_button") do
           = icon_tag(view_type, ["icon-fix", "home-button-group-icon"])
diff --git a/app/views/listings/form/_form_content.haml b/app/views/listings/form/_form_content.haml
index f38668a81..2723150bf 100644
--- a/app/views/listings/form/_form_content.haml
+++ b/app/views/listings/form/_form_content.haml
@@ -7,8 +7,6 @@
   = render :partial => "listings/form/description", :locals => { :form => form }
   = render :partial => "listings/form/custom_fields", :locals => { :form => form }
   = render :partial => "listings/form/valid_until", :locals => { :form => form }
-  = render :partial => "listings/form/origin", :locals => { :form => form }
-  = render :partial => "listings/form/googlemap", :locals => { :form => form, :run_js_immediately => run_js_immediately}
   = render :partial => "listings/form/images", :locals => { :form => form, :run_js_immediately => run_js_immediately }
   = render :partial => "listings/form/send_button", :locals => { :form => form }
   = hidden_field_tag 'listing_ordered_images'
diff --git a/app/views/listings/show.haml b/app/views/listings/show.haml
index 9cf901155..baf84e396 100644
--- a/app/views/listings/show.haml
+++ b/app/views/listings/show.haml
@@ -170,7 +170,7 @@
             .listing-author-activity-description
               = t(".feedback")
 
-    - if @listing.origin_loc && @listing.origin_loc.address != ""
+    - if @listing.origin_loc && @listing.origin_loc.address != "" && false
       .row
         .col-12
           #googlemap
diff --git a/app/views/settings/show.haml b/app/views/settings/show.haml
index 30c9d19f8..27b41d323 100644
--- a/app/views/settings/show.haml
+++ b/app/views/settings/show.haml
@@ -36,24 +36,6 @@
       = t("settings.profile.display_name_description")
     = form.text_field :display_name, class: "text_field", :maxlength => "30"
 
-    -# Location
-    .inline-label-container
-      = form.label :street_address, t("settings.profile.street_address"), :class => "inline"
-      %small
-        = t('settings.profile.default_in_listing')
-    %span.alert-box-icon
-      = icon_tag("information", ["icon-fix"])
-    %small
-      = t("settings.profile.location_description")
-    = form.text_field :street_address, :class => "text_field", :onkeyup => "timed_input(this)"
-    #settings_map_canvas.map
-      - content_for :extra_javascript do
-        :javascript
-          source = document.getElementById("person_street_address");
-          $(document).ready(function(){
-            googlemapMarkerInit("settings_map_canvas","person_location","person_street_address", true, #{tribe_latitude}, #{tribe_longitude});
-            });
-
     -# Phone number
     .inline-label-container
       = form.label :phone_number, t("settings.profile.phone_number"), :class => "inline"

Thank you Zenik for the quick response .

I followed you instructions but get ā€œMarketplace temporarily unavailableā€ message…

1 Like

seems there can be few other places to clean, like:

--- a/app/controllers/listings_controller.rb
+++ b/app/controllers/listings_controller.rb
@@ -121,7 +121,6 @@ class ListingsController < ApplicationController
   end
 
   def create
-    params[:listing].delete("origin_loc_attributes") if params[:listing][:origin_loc_attributes][:address].blank?
 
     shape = get_shape(Maybe(params)[:listing][:listing_shape_id].to_i.or_else(nil))
     listing_uuid = UUIDUtils.create
@@ -184,12 +183,6 @@ class ListingsController < ApplicationController
   end
 
   def update
-    if (params[:listing][:origin] && (params[:listing][:origin_loc_attributes][:address].empty? || params[:listing][:origin].blank?))
-      params[:listing].delete("origin_loc_attributes")
-      if @listing.origin_loc
-        @listing.origin_loc.delete
-      end
-    end
 
     shape = get_shape(params[:listing][:listing_shape_id])

And always when you get internal server error message, first check full error details and backtrace in application log to fix it.