I have written the following code to access the video and its name from bubble app in plugin builder:
the code is written in the element action named ‘downloader’:

let content=properties.mainvideo;
let contentName=properties.nameofvideo;
instance.data.contentRef=content;
instance.data.contentNameRef=contentName;
console.log(‘update’,instance.data.contentNameRef,contentName);

but the console.log says - update,undefined,undefined

why is this happening?

Bubble Plugin editor catches me every time when I give it a camel case variable and it lowercases everything. Maybe that’s what’s happening here?

You gave it contentRef, but it became instance.data.contentref?

1 Like

Though this only happens with properties since we define instances in Bubble functions. I recently spent 3 hours troubleshooting code because of this…

@fede.bubble any idea when and if Bubble will improve the plugin editor?

1 Like

I tried tweaking here and there and it works now. I think I had written “instance.data.contentRef=content” twice by mistake.
Or maybe because the plugin element was hidden in page, which did not allow the code to work properly.

Idk what exactly caused it, but it works fine now

1 Like

A group of us had some meaningful discussion in BubbleCon about improving the plugin editor with some bubble engineers.

The good news is they know it urgently needs improvements, but the bad news is to properly provide us with a better experience they will need to take a step back and work on the other areas before it makes sense to improve the plugin editor. So this will take sometime

As for assigning values to instance.data and using these values I would share these tricks

  • Avoid using a newly initialized instance.data in the same function and just init a variable using let or const instead.
  • try to adding an instance.data.SOMETHING as early as possible in the function.
  • Try creating instance.data variables (with a null value) in the initialize section of the plugin.
  • Try adding logic to check if the key you appended to instance.data has a value before executing you code
1 Like

I would have to check the recording but I believe this question was asked during Bubblecon at the founders AMA and the answer was “not any time soon” ??? I think. Checking the recording would be good to make sure

1 Like