Skip to content

Issue with JS loading and localized scripts #250

@gabriel-glo

Description

@gabriel-glo

Describe your bug

I'm getting the following message in the browser console:

Uncaught Your project is missing global variable esFormsLocalization called from the enqueue script in the forms.

JS that handles the form submission process is not loading. It is located in src/Blocks/components/form/assets/index.js,
After the page loads, I can access the esFormsLocalization object in the browser console, but I don't have access to window.esForms object that handles the initialization of the form functionality (because of the error above).

This bug is occurring on two separate projects. For one project it is happening on staging site (1.4.2-alpha). and for other is happening only on production site (version 1.3.0). I can't reproduce the bug locally on any of these projects.

Steps to Reproduce

Install Eightshift Forms plugin (version on 1.3.0)
Check the browser console

Expected behavior

JS features that handle the form interactions and submission to be loaded or able to initialize

Screenshots, screen recording, code snippet

No response

Environment info

Server architecture | Linux 5.11.0-1019-aws x86_64
Web server | nginx/1.18.0
PHP version | 7.4.24

Please confirm that you have searched existing issues in this repo.

Yes

Please confirm that you have searched in our documentation and couldn't find the answer.

Yes

Please confirm that your bug occurs with all plugins uninstalled and with the default WordPress theme active.

Yes

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions