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

php 8 breaks google map and Geocode in backend, WP 6.5.2 php > 7.4, PODs.io V. 3.2.1, pods-address-maps GitHub-Version #17

Open
oligoform opened this issue Apr 24, 2024 · 2 comments

Comments

@oligoform
Copy link
Contributor

The input fields for the address are shown in WP Backend but then a lot of warnings „Undefined variable“:
Warning: Undefined variable $form_field_type in /wp-content/plugins/pods-address-field/ui/fields/address.php on lines 12, 34, 39, 44, 49, 54, 63, 73

The Map and of course then, the Address-Lookup isn’t there.

The Errors/Warnings are gone If I define the Variable in /wp-content/plugins/pods-address-field/ui/fields/address.php on line ~ 6 like this:

//fix for php8
if ( empty( $form_field_type ) ) {
	$form_field_type = '';
}
//added before this line:
$attributes             = PodsForm::merge_attributes( $attributes, $name, $form_field_type, $options );

but unfortunately no Map or Lookup.

Do you have a hint where to look for a fix?

  • WP 6.5.2,
  • php > 7.4,
  • PODs.io V. 3.2.1,
  • pods-address-maps new GitHub-Version
@oligoform oligoform changed the title php 8 breaks google map and Address-Lookup in backend, WP 6.5.2 php > 7.4, PODs.io V. 3.2.1, pods-address-maps GitHub-Version php 8 breaks google map and Geocode in backend, WP 6.5.2 php > 7.4, PODs.io V. 3.2.1, pods-address-maps GitHub-Version Apr 24, 2024
@JoryHogeveen
Copy link
Owner

Hi @oligoform

This plugin stems from pre-React fields in Pods and needs a big refactor to be properly integrated in Pods 2.8+.
However, I use it myself on a website which works find there. Did you fill in your Google Maps API information?

As for the fix for PHP8, please make a PR so I can check and merge :)

Cheers, Jory

@oligoform
Copy link
Contributor Author

Hi @JoryHogeveen
of course I have filled the google maps key (now with the needed payment-information for google)!

I´ll prepare the PR but it's only a quick-fix for the errors. No Map and no geocoding possible

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

2 participants