dalenguyen / firebase-wordpress-plugin

A plugin that helps to integrate Firebase to WordPress
https://firebase-wordpress-docs.readthedocs.io
GNU General Public License v2.0
110 stars 31 forks source link

"Uncaught ReferenceError: firebase is not defined" on new elementor widget #202

Closed AndronikosKon closed 1 year ago

AndronikosKon commented 1 year ago

Describe the bug I am writing a Wordpress plugin for a client that adds some elementor widgets, pulling data from Firestore and displaying charts. When editing the widget on elementor, there are no issues, I can pull data from firestore. However, when I preview the same page or access it directly on the front-end, I recieve the error "Uncaught ReferenceError: firebase is not defined".

To Reproduce Steps to reproduce the behavior:

  1. Create a plug-in adding custom elementor widgets.
  2. Make the widgets use firestore to retrieve data.
  3. Add the widget to a page (and verify that the data is recieved successfully).
  4. Access the same page from the front-end or as a preview (and recieve the error "Uncaught ReferenceError: firebase is not defined").

Expected behavior The firebase instance should behave the same, whether on the elementor "edit" page, or the preview and front-end page.

Screenshots Behavior on the Elementor editor. image

Behavior on preview. image image

Behavior on the front-end. image image

dalenguyen commented 1 year ago

Hi @AndronikosKon, do you have a test link I can look at? You can send it to me via dale@dalenguyen.me

dalenguyen commented 1 year ago

Resolved