Skip Navigation

[Resuelto] Content Templates and the Divi map module

This support ticket is created hace 6 años, 11 meses. There's a good chance that you are reading advice that it now obsolete.

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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Este tema contiene 10 respuestas, tiene 2 mensajes.

Última actualización por Stephen Vaughan hace 6 años, 11 meses.

Asistido por: Beda.

Autor
Mensajes
#595933

Hi,

I want to keep you in the loop with my feedback to the Divi team posted below. It relates to using field shortcodes in the map module. Read on:

Hi,

I have recently changed my workflow to using the new version of Toolset Types Views to manage the application of content templates to custom post types using the Divi Builder.

This approach works very well, without the need to work with Divi's current implementation of global elements, which in my experience has been cumbersome, with global functionality being applied at the level of modules, rows and sections but not on complete layouts. In addition to this some of the conditional logic provided by the Views plugin does not work when global is applied, presenting the code on the front end and not the content rendered properly.

Your can review the Views solution here:

https://toolset.com/documentation/reco ... -toolset/f

As you will see quite a lot can be done by adding the the Toolset Types shortcodes to Divi Builder modules.

There is one place they do not work though and that is in the map module. I tested using the shortcode generated for a postcode field. Dropping the shortcode into the field for the pin address triggers various dialogue alerts on save. Sometimes you can fox the map module to accept the shortcode but it seems to default to the same location, somewhere in Canada.

I will leave it with you to investigate if their is a solution to this. Perhaps not so trivial to re-engineer so I will be patient. Nice if you can fix though as the Toolset Types Map plugin does a great job as well but would not be anywhere as UX friendly for end users as the Divi map module.

#595938

Thanks for the feedback.

Can you re-share the URL you posted? It seems it got stripped.

Related to the Maps, are you referring to the Toolset Maps?

Can you quickly elaborate the steps you take? Then I can replicate them and take action.

Thank you very much.

#595945

Hi Beda,

here is the link again. I updated it on my DIvi ticket so the guys in Elegant themes can see how Views works.

https://toolset.com/documentation/recommended-themes/toolset-divi-integration/create-templates-for-custom-post-types-with-divi-builder-and-toolset/

The scenario:
Normally in the Divi map module you can add a post code (as an alternative to the address) into the Map Centre Address and it will generate a map, centred on the location specified. You do the same when adding pins. This is the normal use case when laying
out with Divi on a page per page basis. But things are different if I want to use the map module in a template that will be used globally.

I make a CPT and include a field where the user can drop in a post code. Then I set up a template in Views using the Divi page builder. When the shortcode is added to the Map Center Address and pin fields though, an alert is issued that either the Geocode was not successful or the field was left empty. As I already mentioned the shortcode is sometimes accepted but the map will always default to a location in Canada.

This maybe something that only Elegant Themes can fix, if at all.

I can also see potential for the pin content area to be the address, concatenated with the short codes for custom address fields.

#595949

Yes, if I understand this correctly, you have a Field provided by the Divi map module and that Field expects a certain value type.
As it seems according to your description it will expect numbers - no brackets and other characters.

Since ShortCodes will be executed only in the front end, the field will fail at least in the backend.

We allow to nest our ShortCodes, any you can also register other ShortCodes to be nested within Toolset ShortCodes in Toolset > Settings > Front End Content > Third-party shortcode arguments.

But I fear this will not solve this problem, since it seems the issue surges on what kind of input that field expects.

Could you confirm with the Developers of DIVI in your ticket that this field accepts only a certain value type?

#595962

Hi Beda,

Not a 100% sure what you mean. I will look at how that setting for Third-party shortcode arguments works.

The map module map and pin fields should work with any alphanumeric entry, an address or post code. So entering either:

R98 RX27 (We only got post codes in Ireland last year. Go figure!)

or

somwhere,
Thomastown,
Co. Kilkenny,
Ireland

will work with the map module which is using the Google map API. It seems that the map module won't work with a shortcode as a placeholder in a template.

I confirm with the Divi team which value types are accepted.

#595969

The map module map and pin fields should work with any alphanumeric entry, an address or post code. So entering either:

Exactly.

But you enter a ShortCode, and on the moment you want to populate the Field it fails, correct?

So, this is because you do not enter a valid post code or similar.

If the issue is different please do not hesitate to inform me.

To confirm again - you are not using Toolset Maps, but the module provided by DIVI, right?

#595970

Hi Beda,

R98 RX27 ( not my real address ) will end you up in Brazil in the event that you test it
You sometimes have to add Ireland to the end: R98 RX27 Ireland which brings you to somewhere in the backend of Ireland.

I guess Google has not fully got to grips with our quirky new post code system.

#595993

Yes, sure. Whatever value the Module accepts and uses - you try to insert it in the backend with a ShortCode, and if this works similarly to our Maps Plugin, then this will fail as that is not a ShortCode but a module you use.
Hence, it expects valid values in the backend, and you do not get them with a ShortCode in the backend, since those are executed on the front end only.

Can you confirm that this issue happens only within the DIVI Maps module, who you try to populate Maps values with Types / Toolset ShortCodes, in the backend?

Thank you

#596002

It happens with the Divi Map module when setting it up in a content template using the new divi builder integration method. As it is a template, to be used at a later date in a custom post type one has to supply something for the map centre and pin fields as a place holder, the place holder in this case being a short code for my post code field.

#597129

Yes, I understand this.

To check if what I stated previously is right, can you please perform this test and show me the screenshot.

1. Add the Module as you are used to and pass the ShortCode you use. Please send me the screenshot of where you see the problem, when you do so.

2. Then repeat those steps but this time, insert a value as expected by the Module, hence no ShortCode
Please take a screenshot of the output of this as well.

I suspect, this module needs to hav the information ready in the backend and that is not possible with a ShortCode.
If this module expects the value to exist already in the backend, you must pass a real numeric value, a ShortCode will not work.

#597135

Hi Beda,

I think we might be going around in circles here. Of course it won't work, which is why the ball is in Elegant Themes court regarding a fix (as stated in my opening post). A sulution may not be possible at all.