Skip Navigation

[Resolved] I found another issue with distance

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 5 replies, has 2 voices.

Last updated by Waqar 2 years ago.

Assisted by: Waqar.

Author
Posts
#2333203

Hi Luo Yang
I found another issue with distance: In a block view I tried to place the distance value of the current post address to the user location. I set the Field and Views block, then selected the Distance Value as field and then set the distance parameters. Ok so far, but when I try to click on the Insert Shortcode button nothing happens, no way to confirm the operation and create the field. Did I miss anything ? Please check the short video here:
hidden link
Same field in a traditional view works ok.

I also noticed that images in block views are resized proportionally while they aren't in a traditional view even though the resize parameter is set to proportional
<div style="border-radius: 50%;">[types field='user-image' title='%%TITLE%%' alt='%%ALT%%' align='center' size='medium' resize='proportional'][/types]</div>
Any clue ? Pls compare images in my homepage (not proportional) with images in test page named aaa (proportional)

thanks

New threads created by Waqar and linked to this one are listed below:

https://toolset.com/forums/topic/split-proportional-resizing-of-images/

#2333659

Waqar
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting us and I'd be happy to assist.

As per the video, you're trying to insert the distance value shortcode in the view "Homepage classified", which is set to show the posts from the "Classified" post type.

But, in the custom field group "Field Group for Classified", there is no address type custom field attached to this post type.
( there is an address type custom field "Address", but that is attached to the post type "Profili", through field group "Field Group for Profili" )

To use the distance value shortcode in this view, you'll first need to add an address type custom field with the post type "Classified".

Note: Please also use the distance value shortcode, within the "wpv-geolocation" shortcode, when the current visitor's location is set as one of the sources:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#toolset-maps-distance-value

Example:


[wpv-geolocation]
[toolset-maps-distance-value origin_source='visitor_location' postmeta='wpcf-address-slug']
[/wpv-geolocation]

You'll replace "address-slug" with the actual slug of your address type custom field.

I've created a separate ticket for your question about the proportional resizing of images and will reply to it, shortly.
( ref: https://toolset.com/forums/topic/split-proportional-resizing-of-images/ )

regards,
Waqar

#2333715

Hi Waqar,
The video refers to Profiles not Classifieds, of course they have an address field that you can see in the video. I isolated the block in the temp page called "aaa", if you still have the access to my site you can try it yourself, if not let me know.
Regards
Nicola

#2334407

Waqar
Supporter

Languages: English (English )

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

I'm not able to make any change on the page "aaa", as there are a number of "invalid JSON response" errors shown in the browser's console.

Something on your website is limiting or blocking the REST API calls, which are needed for the blocks-based Gutenberg editor to function as well.

You'll also see an error about this in the website's "site health" section at WP Admin -> Tools -> Site Health.
( screenshot: hidden link )

The server also shows the "error 503 - service unavailable" message, while trying to access different sections of the website's admin area.


Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

I'll recommend getting in touch with the hosting support team to see if they have added any security or performance measures, which can interfere with the REST API calls.

#2334413

Hi
yes, it's happening to me as well. Try again now, it seems fine. If it happens again I will contact my hosting provider.
thanks

#2336447

Waqar
Supporter

Languages: English (English )

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

Thank you for waiting.

During testing on my website, I was able to reproduce this issue with the distance value shortcode. If the post/page is being edited using the blocks/Gutenberg editor and it doesn't include any "Address" type custom field, the wizard in the "Fields and Text" block to insert the map distance value shortcode, doesn't work.

The shortcode itself works if added manually, as you can see the following shortcode working on the test "aaa" page:


[wpv-geolocation]
[toolset-maps-distance-value origin_source='visitor_location' postmeta='wpcf-user-address'] km
[/wpv-geolocation]

Note: The post type for the view "Profili", does have the address type field, but the view is being edited on a "page" post type, which doesn't have one.

I'm going to pass on this limitation internally and meanwhile, the workaround is to insert this shortcode manually.
( ref: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#toolset-maps-distance-value )

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