Skip Navigation

[Resolved] Split: Search view is not showing correctly

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Waqar 1 year, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2381023

Tell us what you are trying to do?

I am also having trouble with another 2 view for a branches search. This is the original hidden link. I have copied the shortcodes to recreate in oxygen - not only does it look a bit messed up the search doesn't work at all.

#2381425

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I couldn't reproduce this issue on my test website, which suggests that something specific to your website is involved.

Do I have your permission to download a clone/snapshot of your website? This will help in investigating this on a different server.

regards,
Waqar

#2383655

Hi, yes, that's absolutely fine!

#2384617

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the permission and I've downloaded the website's clone.

I'll be running some tests on it and will share the findings, as soon as this testing completes.

Thank you for your patience.

#2385617

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for waiting.

While troubleshooting the clone of your staging website hidden link, I noticed that the incorrect custom field slugs were used in the view named "Branches", which is used on the page: hidden link

These 3 custom fields are using the underscore ( _ ), but in this view's code, dashes ( - ) were being used:

1. branch_area
2. branch_name
3. branch_address

I've made the following changes in the view and the map markers and the search seems to be working now:

a). Updated content in view's "Search and Pagination" section:


[wpv-filter-start hide="true"]
	[wpv-filter-controls]
		<div class="row">
			<div class="col-md-6" style="text-align:right;">
				<div class="form-group">
					[wpv-control-postmeta field="wpcf-branch_area" default_label="AREA" url_param="wpv-wpcf-branch-area"]
				</div>
			</div>
			<div class="col-md-6" style="text-align:left;">
				<div class="form-group">
					[wpv-control-postmeta display_values="AIM MALL,KARIOKOO,KENYATTA ROAD,MASAKI,VINGUNGUTI" field="wpcf-branch_name" type="select" source="custom" default_label="BRANCH" url_param="wpv-wpcf-branch-name" values="AIM MALL,KARIOKOO,KENYATTA ROAD,MASAKI,VINGUNGUTI"]
					<a class="reset" id="reset-branch" style="position:relative;top:-38px;left:300px;" href="#">X</a>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-6">
				<div class="form-group">
				 [wpv-control-distance distance_center_required="yes" compare_field="branch_address" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit" inputs_placeholder="%%DISTANCE%% %%CENTER%%"]
				</div>
			</div>
			<div class="col-md-2" style="margin-right:5px;">
				<div class="form-group">
					[wpv-filter-reset output="bootstrap"]
				</div>
			</div>
			<div class="col-md-3">
				[wpv-filter-spinner spinner="<em><u>hidden link</u></em>"][/wpv-filter-spinner]
			</div>
		</div>
  [/wpv-filter-controls]
[wpv-filter-end]

b). Updated content in view's "Loop Editor" section:


[wpv-layout-start]
	[wpv-items-found]
		<div class="w3-bar w3-black">
			<button id="map-tab" class="w3-bar-item w3-button tablink w3-red" onclick="openCity(event,'Map')">
				<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-map" fill="currentColor" xmlns="<em><u>hidden link</u></em>">
					<path fill-rule="evenodd" d="M15.817.113A.5.5 0 0 1 16 .5v14a.5.5 0 0 1-.402.49l-5 1a.502.502 0 0 1-.196 0L5.5 15.01l-4.902.98A.5.5 0 0 1 0 15.5v-14a.5.5 0 0 1 .402-.49l5-1a.5.5 0 0 1 .196 0L10.5.99l4.902-.98a.5.5 0 0 1 .415.103zM10 1.91l-4-.8v12.98l4 .8V1.91zm1 12.98l4-.8V1.11l-4 .8v12.98zm-6-.8V1.11l-4 .8v12.98l4-.8z"/>
				</svg>
				&nbsp;&nbsp;MAP
			</button>
			<button id="branch-tab" class="w3-bar-item w3-button tablink" onclick="openCity(event,'Branch')">
				<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-shop" fill="currentColor" xmlns="<em><u>hidden link</u></em>">
					<path fill-rule="evenodd" d="M2.97 1.35A1 1 0 0 1 3.73 1h8.54a1 1 0 0 1 .76.35l2.609 3.044A1.5 1.5 0 0 1 16 5.37v.255a2.375 2.375 0 0 1-4.25 1.458A2.371 2.371 0 0 1 9.875 8 2.37 2.37 0 0 1 8 7.083 2.37 2.37 0 0 1 6.125 8a2.37 2.37 0 0 1-1.875-.917A2.375 2.375 0 0 1 0 5.625V5.37a1.5 1.5 0 0 1 .361-.976l2.61-3.045zm1.78 4.275a1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0 1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0 1.375 1.375 0 1 0 2.75 0V5.37a.5.5 0 0 0-.12-.325L12.27 2H3.73L1.12 5.045A.5.5 0 0 0 1 5.37v.255a1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0zM1.5 8.5A.5.5 0 0 1 2 9v6h1v-5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v5h6V9a.5.5 0 0 1 1 0v6h.5a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1H1V9a.5.5 0 0 1 .5-.5zM4 15h3v-5H4v5zm5-5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3zm3 0h-2v3h2v-3z"/>
				</svg>
				&nbsp;&nbsp;BRANCH DETAILS
			</button>
		</div>

		<div id="Map" class="w3-container w3-border city">
			[wpv-map-render map_id="map-3" map_height="500px" spiderfy="on"][/wpv-map-render]
		</div>

		<div id="Branch" class="w3-container w3-border city" style="display:none">
			[wpv-view name="branch-selection" view_display="layout"]
		</div>
		<!-- wpv-loop-start -->
			<wpv-loop>
				[wpv-map-marker map_id='map-3' marker_id='marker-[wpv-post-id]' marker_field='wpcf-branch_address']
					<a href="<em><u>hidden link</u></em> field='branch_name'][/types]">[types field='branch_name'][/types]</a><br>
					[types field='branch_area'][/types]<br>
					[types field='branch-hours'][/types]
					<a href="[types field='directions-link' output='raw'][/types]" target="_blank">Directions</a>
				[/wpv-map-marker]     
			</wpv-loop>
		<!-- wpv-loop-end -->
	[/wpv-items-found]
	
	[wpv-no-items-found]
		<div class="w3-bar w3-black">
			<button id="map-tab" class="w3-bar-item w3-button tablink w3-red" onclick="openCity(event,'Map')">
				<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-map" fill="currentColor" xmlns="<em><u>hidden link</u></em>">
					<path fill-rule="evenodd" d="M15.817.113A.5.5 0 0 1 16 .5v14a.5.5 0 0 1-.402.49l-5 1a.502.502 0 0 1-.196 0L5.5 15.01l-4.902.98A.5.5 0 0 1 0 15.5v-14a.5.5 0 0 1 .402-.49l5-1a.5.5 0 0 1 .196 0L10.5.99l4.902-.98a.5.5 0 0 1 .415.103zM10 1.91l-4-.8v12.98l4 .8V1.91zm1 12.98l4-.8V1.11l-4 .8v12.98zm-6-.8V1.11l-4 .8v12.98l4-.8z"/>
				</svg>
				&nbsp;&nbsp;MAP
			</button>
			<button id="branch-tab" class="w3-bar-item w3-button tablink" onclick="openCity(event,'Branch')">
				<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-shop" fill="currentColor" xmlns="<em><u>hidden link</u></em>">
					<path fill-rule="evenodd" d="M2.97 1.35A1 1 0 0 1 3.73 1h8.54a1 1 0 0 1 .76.35l2.609 3.044A1.5 1.5 0 0 1 16 5.37v.255a2.375 2.375 0 0 1-4.25 1.458A2.371 2.371 0 0 1 9.875 8 2.37 2.37 0 0 1 8 7.083 2.37 2.37 0 0 1 6.125 8a2.37 2.37 0 0 1-1.875-.917A2.375 2.375 0 0 1 0 5.625V5.37a1.5 1.5 0 0 1 .361-.976l2.61-3.045zm1.78 4.275a1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0 1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0 1.375 1.375 0 1 0 2.75 0V5.37a.5.5 0 0 0-.12-.325L12.27 2H3.73L1.12 5.045A.5.5 0 0 0 1 5.37v.255a1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0zM1.5 8.5A.5.5 0 0 1 2 9v6h1v-5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v5h6V9a.5.5 0 0 1 1 0v6h.5a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1H1V9a.5.5 0 0 1 .5-.5zM4 15h3v-5H4v5zm5-5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3zm3 0h-2v3h2v-3z"/>
				</svg>
				&nbsp;&nbsp;BRANCH DETAILS
			</button>
		</div>

		<div id="Map" class="w3-container w3-border city">
			[wpv-map-render map_id="map-3" map_height="500px" spiderfy="on"][/wpv-map-render]
		</div>

		<div id="Branch" class="w3-container w3-border city" style="display:none">
			[wpv-view name="branch-selection" view_display="layout"]
		</div>

		[wpv-map-marker map_id='map-3' marker_id='marker-[wpv-post-id]' marker_field='wpcf-branch_address']
			<a href="<em><u>hidden link</u></em> field='branch_name'][/types]">[types field='branch_name'][/types]</a><br>
			[types field='branch_area'][/types]<br>
			[types field='branch-hours'][/types]
			<a href="[types field='directions-link' output='raw'][/types]" target="_blank">Directions</a>
		[/wpv-map-marker]   
	[/wpv-no-items-found]
[wpv-layout-end]

Note: the affect of these changes can be seen at the page: hidden link

#2401893

Thank you Waqar, that's interesting. It's strange it's working on the original site. That's great though, thanks for your help!

#2401897

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

You're very welcome and let me know if you have any follow-up questions about this.

For a new question or concern, you can start a new ticket.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.