[SOLVED] "null" being passed as element instance in plugin action?

A plug-in customer on Friday reported the following error after 5 months of no issues.

I’m not convinced the issue is with the plugin, however, for the following reasons:

  • I can’t reproduce the issue on any demo or test sites.
  • It’s the first ever report of a problem with this plugin.
  • The error inexplicably occurred on or around this past Friday after months of working just fine.
  • A close examination of the error seems to suggest a Bubble issue.

To elaborate on that last point, here is the actual console error:

The variable c is actually the minified form of the instance argument passed to all element actions.

Also note, circled in red is something called element_instance, which has a value of null.

And here is the un-minified JS code which constitutes the entirety of the plug-in action that invokes the navTo() function…

So obviously, if the instance argument is null, then of course navTo will not be a function.

What I’m not 100% certain about is whether element_instance referenced in the console error is in fact referring to the instance argument being passed to the plug-in action; but if so, then this seems to be a Bubble issue and not an issue with my plug-in.

I’m just throwing this out there in case any other plug-in devs have experienced anything similar or have any insights or comments to share before I submit a bug report.

RTE Empty Null displayed

I took the screen shot and forgot to send a bug report. Seems like something is off as I saw this in the RTE on page load.

1 Like

Interesting. Thanks for that. It may or may not be related to my issue, but I’ll be submitting a bug report for sure.

I’m really pleased (and rather embarrassed) to announce that this issue is resolved! Jeff Thill of Bubble support discovered what I was overlooking - that the plug-in element was in a group that was being hidden! :neutral_face:

The plug-in was part of a rather complex SPA (which I didn’t build), and I was completely overlooking the obvious. Simply moving the element to the page root solved the problem. What a forehead-slapper! :smile:

This topic was automatically closed after 14 days. New replies are no longer allowed.