Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin stopped working in version 1.5.4. #107

Open
noografo opened this issue Nov 12, 2023 · 11 comments
Open

The plugin stopped working in version 1.5.4. #107

noografo opened this issue Nov 12, 2023 · 11 comments

Comments

@noografo
Copy link

Hi, as I said in the Wordpress forums, I upgraded from 1.5.0. to 1.5.4. and the plugin doesn't work in the backend. I uninstalled some plugins to see if there was any incompatibility, but I noticed that in a similar website the plugin doesn't show the map and doesn't allow to enter locations either. The solution I've read, and it works, is to downgrade back to 1.5.0.

I hope you find an effective solution. I'm using your plugin on two sites with a lot of data load and it worked perfectly until now. Thank you very much in advance

Translated with www.DeepL.com/Translator (free version)

@paragonconsultants
Copy link

paragonconsultants commented Nov 14, 2023

Same issue here

@mcguffin
Copy link
Owner

@paragonconsultants @noografo I found some major issues in acf repeater and flexible content...
Is it fixed in the attached zip?

acf-openstreetmap-field.zip

@paragonconsultants
Copy link

@paragonconsultants @noografo I found some major issues in acf repeater and flexible content... Is it fixed in the attached zip?

acf-openstreetmap-field.zip

Just tried this but the problem remains

@mcguffin
Copy link
Owner

@paragonconsultants
Okay, then I need some specifics to reproduce it:

  • Block or Classic Editor? Maybe on an Options page?
  • Is the map inside an ACF Block, a Repeater, Flexible Content?

... and I'm really afraid to ask, but: Did you clear the Browser cache?

@paragonconsultants
Copy link

paragonconsultants commented Nov 16, 2023

@paragonconsultants Okay, then I need some specifics to reproduce it:

  • Block or Classic Editor? Maybe on an Options page?
  • Is the map inside an ACF Block, a Repeater, Flexible Content?

... and I'm really afraid to ask, but: Did you clear the Browser cache?

No worries, did clear the cache. Its in the classic editor and looks like the attached image. If the layers button is click top right and then an option is selected the map loads, however on the front of the website the zoom level is ignored and always shows zoomed right out.
map

@neo-archaic
Copy link

Same issue here, with block editor. The plugin throws the error "Undefined index: layers" in the following file:
\wp-content\plugins\acf-openstreetmap-field\include\ACFFieldOpenstreetmap\Field\OpenStreetMap.php

I can fix it by modifying line 602:
if ( ! is_array( $value['layers'] ) || ! count( $value['layers'] ) || ! $field['allow_map_layers'] ) {

with
if (empty( $value['layers'] ) || ! is_array( $value['layers'] ) || ! count( $value['layers'] ) || ! $field['allow_map_layers'] ) {

Hope this helps to patch it up.

@noografo
Copy link
Author

noografo commented Dec 4, 2023

@paragonconsultants Okay, then I need some specifics to reproduce it:

* Block or Classic Editor? Maybe on an Options page?

* Is the map inside an ACF Block, a Repeater, Flexible Content?

... and I'm really afraid to ask, but: Did you clear the Browser cache?

Ok, details: I'm using the field in two custom post types, in two different projects. The cache is disabled. They are not options pages and I don't use blocks. I'm doing it with Oxygen Builder. In one of the CPTs I need more than one marker, but it was impossible, so I thought it would be, as you indicate in the plugin page on wordpress.org, because I chose to use iFrame instead of Leaflet JS. But once you change the return format, the possibility of using the browser disappears and the map disappears. And there's no going back. It happens that in the first project, where there are more than 2000 content entries, t has been working perfectly all these years ago, but from 1.5.0 onwards it's been screwed up.
I hope you find the solution, and I take note of what @neo-archaic has done.

@neo-archaic
Copy link

@noografo Have you tried the latest update (it's using !isset() instead of empty() )? It's working on my end.

@paragonconsultants
Copy link

Any idea when this will be fixed?

@neo-archaic
Copy link

It's working for me

@dervelli
Copy link

dervelli commented Jan 15, 2024

Still not working for me. WP Version 6.4.2 - PHP-Version 8.1.27 - ACF OpenStreetMap Field Version 1.5.6
Also tried the patch from @neo-archaic - no changes
tried different browser - no changes
tried old 1.5.0 verion - no changes ...
:-(

Whats weird: i use the Admin Columns for ACF Fields plugin to display the map in the admin panel - and here it works!! (??)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants