When using the client-side API's addButton method, leaving out a parameter may result in a button not displaying correctly.
Instead of a working button appearing, with the correct label, a button may display "[object Object]". If using the Sage theme, a placeholder will appear in place of the button's image.
This issue is caused by incorrect parameters being passed to the addButton function. At the time of writing (February 2016), there is a small error in the addButton documentation available here:
The issue can be resolved by passing an image path as the first parameter. This still has to be done even if the Ergonomic theme is being used, since users may still be using the Sage theme.
The correct usage for addButton is as follows:
addButton ( imagePath, captionfamily, captioncode, linkURL, [Object.index] )
The function can be demonstrated in the example below:
The issue has been raised to the Documentation team for resolution.