-
Notifications
You must be signed in to change notification settings - Fork 907
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
[Bug] Field Address Google with Javascript error #5721
Comments
Hello @mrinaldidfs thanks for the question. Make sure your API key has access to the following google API's: Maps Javascript API
Places API
Geocoding API I've just tested it, without any changes and everything is working as expected as long as my API has access to those 3 services. I've just added it to the docs to make it more clear: https://backpackforlaravel.com/docs/6.x/crud-fields#address_google-pro I am going to close this, please feel free to ping @karandatwani92 if you still experiencing issues and he can re-open this and help you out. 👍 |
Hi @pxpm I therefore ask @karandatwani92 to please reopen this issue and help me to solve the problem. |
Hey @mrinaldidfs I tested it now on my end, and it worked fine without affecting other select/relationship/etc fields. |
Bug report
By inserting the address_google field inside a crud all the other fields that use javascript (such as select2) stop working and in the console I find the following error:
The address Google Field work, but all other fields not
What I did
I inserted the address_google type field into a crud
What I expected to happen
to have the Google autocomplete suggestion in the field as soon as it is inserted
What happened
Google's suggestion works correctly but, following javascript errors, all the other fields are not displayed correctly
What I've already tried to fix it
I customized the field by placing it in the
vendor/backpack/crud/fields
folderI added below the line with
if(typeof google === "undefined") { return; }
the following line
if(typeof google.maps.places === "undefined") { return; }
I also had to remove from the basset the part of the javascript script that contains the init of the field by removing it from the baset block
@bassetBlock('backpack/pro/fields/address-google-field.js')
Is it a bug in the latest version of Backpack?
After I run
composer update backpack/crud
the bug... is it still there?yes
When I run
php artisan backpack:version
the output is:PHP VERSION:
8.2.19
PHP EXTENSIONS:
Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, random, readline, Reflection, session, standard, mysqlnd, tokenizer, zlib, libxml, dom, PDO, bz2, SimpleXML, xml, xmlreader, xmlwriter, openssl, curl, ftp, fileinfo, gd, intl, imap, mbstring, exif, mysqli, Phar, pdo_mysql, sodium, xsl, zip, redis, imagick, mongodb
LARAVEL VERSION:
11.33.2.0
BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.3.6
backpack/crud: 6.7.42
backpack/editable-columns: 3.0.10
backpack/generators: v4.0.7
backpack/pro: 2.2.25
backpack/theme-tabler: 1.2.15
The text was updated successfully, but these errors were encountered: