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

Js errors on field creation #165

Closed
jlachancekffein opened this issue Jun 18, 2019 · 8 comments
Closed

Js errors on field creation #165

jlachancekffein opened this issue Jun 18, 2019 · 8 comments

Comments

@jlachancekffein
Copy link

jlachancekffein commented Jun 18, 2019

Description

Several javascript errors occur when creating a field in the admin.

  1. You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.

  2. Uncaught TypeError: Can not read property 'call' of undefined

Disabling the plugin fixes the problem.

The configuration of the plugin is:

Map: Google Maps: Roadmap
Geo-coding: Google Map

Error # 1 does not seem too much problem. However, error # 2 prevents the saving of some fields requiring javascript.

Steps to reproduce

  1. Connect to CP panel
  2. Settings -> fields

Additional info

  • Craft version: 3.1.30

  • Maps version: 3.5.0

  • PHP version: 7.2

  • Database driver & version: mysql

  • Other Plugins:

    "craftcms/cms": "^3.1.0",
    "vlucas/phpdotenv": "^2.4.0",
    "craftcms/redactor": "^2.0.1",
    "studioespresso/craft-navigate": "^1.2",
    "nesbot/carbon": "^1.36",
    "firebase/php-jwt": "^5.0",
    "ether/simplemap": "^3.3.4",
    "verbb/expanded-singles": "^1.0",
    "spicyweb/craft-neo": "^2.2",
    "nystudio107/craft-imageoptimize": "^1.5",
    "chasegiunta/craft-jason": "1.0.1"

Capture d’écran 2019-06-18 à 11 25 21

@Tam
Copy link
Member

Tam commented Jun 19, 2019

@jlachancekffein Can you try disabling all other plugins to see if that fixes the issue? If it does, try re-enabling the other plugins one by one to determine which one is causing the issue. If not, are you using a module or other custom code that that could be injecting the Google Maps API?

@jlachancekffein
Copy link
Author

jlachancekffein commented Jun 19, 2019

@Tam
I did what was asked. I disable all plugins and activate them one by one.

Then I disabled all customs modules.

The js errors appears only when the simpleMap plugin is enabled.

So it's not related to another plugin or a module.

This is an old project that used an old version of the simpleMap plugin (about 3 months). Is it possible that an asset build problem is causing this problem?

Thank you for your help.

@elfacht
Copy link

elfacht commented Jun 23, 2019

I have the same error, but on existing fields and only when the field is inside and opened entry modal:

Screenshot 2019-06-23 um 16 06 55

@elfacht
Copy link

elfacht commented Jun 23, 2019

And: Resaving entries inside this modal will break the field and output:

Screenshot 2019-06-23 um 21 29 41 Kopie

LABOR was resaved, the entry above HOPS & BARLEY not.

@elfacht
Copy link

elfacht commented Jul 10, 2019

This bug still occurs in Craft 3.2

@alexjcollins
Copy link
Member

@elfacht Does the error only exist when editing the entries in the 'Quick Edit' view? If you edit the entry directly is it ok?

@elfacht
Copy link

elfacht commented Jul 10, 2019

@alexjcollins Right now, after updating to 3.2, it seems that the error only occurs in the quick edit view. Editing it directly works since then. Before the update #160 happened.

@elfacht
Copy link

elfacht commented Jul 15, 2019

@alexjcollins It happens again after update to 3.6.0: either direct edit or quick edit will empty the fields after saving the entry without explicit using the map search field.

@Tam Tam closed this as completed in b8cce72 Jul 19, 2019
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

4 participants