'Getting started' Button extension doesn't work

Hi

I’m new to BitBucket development and am trying to get the basic ‘getting started’ samples to work - specifically the Button sample …

https://developer.atlassian.com/server/framework/clientside-extensions/reference/api/extension-factory/#button

The project builds just fine. However when I try and navigate to the pull-request overview page - there’s a ‘This page couldn’t be displayed’ graphic in the page. Reviewing the Javascript console - I can see the following error message …

“Warning: Failed prop type: The prop onRender is marked as required in ExtensionModal, but its value is undefined.”

What’s wrong and how do I fix it ?

Thanks
Dave

Hi @dave_ekhaus, welcome to the developer community. Are you using the example code from the template repository https://bitbucket.org/atlassianlabs/bitbucket-client-side-extensions-template?
Can you try cloning the repository again or pulling the latest changes?

From your message I can that you are using Modal extension type. If that’s correct you can check the documentation of how to add missing onRender attribute: https://developer.atlassian.com/server/framework/clientside-extensions/reference/api/extension-factories/modal/

Let me know if that helps.

Thanks,
Maciej Adamczak
Atlassian Developer

Hi Maciej

I was searching the Bitbucket site trying to get some help with a problem - specifically that a REST endpoint I’ve added to a Bitbucket plugin ( REST plugin module - https://developer.atlassian.com/server/framework/atlassian-sdk/rest-plugin-module/ ) is always generating a 404 when I try and access it.

I came across our exchange above and thought I’d email you to see if you could help.

Is there any sample code that shows a working web/http endpoint using the REST plugin module ?

Thanks
Dave

Hi @dave_ekhaus, I would recommend you posting a new question with details about the REST problem on the developer’s community forum.

I can also recommend looking at those links:

Thanks,
Maciej

Hello @madamczak, in response to your question to @dave_ekhaus, I used the example code from the template repository https://bitbucket.org/atlassianlabs/bitbucket-client-side-extensions-template, by cloning the repository and pulling the latest changes, following the instructions given in the README of this repository. It appears that an error occurs after typing the following command.

atlas-run -DskipTests

I opened this ticket describing the issue: Bitbucket Client-side Extensions template - Build failed

Let me know if you see something I did wrong.

Regards,
Eric