Discussions

Ask a Question
ANSWERED

Where can I report bug in COYO's REST API and its documentation?

ANSWERED

Is there a maximum overall configuration size?

We can add any number of configuration fields and there are f.e. textarea type fields which could contain excessive amount of text. All those values will make it into the JWT that get sent thru the message-api / plugin-adapter. Do you know of an overall size limitation? (Asking for a friend who plans to put 1mb into a textarea field :)
ANSWERED

User authentication and authorization in the plugin

In our plugin we need to know, if a user is permitted to access the plugins content. I went through the plugin tutorial and got a pretty good impression how to write a plugin for COYO. However, what is still a bit unclear to me is how the authentication and authorization works in the plugin. I saw in the tutorial that you get passed a JWT token from COYO with the plugin adapter. For me it looks like the authentication and authorization in the plugin can be done with this token and the email address of the user, because the JWT is signed with the COYO certificate. Am I right in assuming that I can use the signed JWT for authentication?

Scrolling behavior for navigation with different content height

I am using the "observeHeight" function provided by the plugin adapter. And have noticed the following: Given: I have a plugin whose content causes the COYO page to display a scrollbar. Now, if I navigate between two pages within my plugin without scrolling on the COYO page, the COYO page scrolls down to the point where the top of the plugin is the top edge of the COYO page. Correct and expected behavior. However, if I now scroll down a bit on the COYO page itself and navigate back and forth between the two pages, the top edge of the COYO page is suddenly somewhere in the middle of my plugin. However, it should also start at the top as if I hadn't scrolled at all. My questions now are: is it the desired behavior? Or is it a known issue and is there a workaround? Best Regards André
ANSWERED

Is it possible to pass parameters when installing a plugin?

Hello everyone! In the current version it is only possible to pass config parameters to plugin instances. But in our use case it would be great to have the possibility to pass parameters when installing a plugin in COYO (in the administration area) and then for example pass it together with the rest to the lifecycle endoint "install". Is it intended to have such a feature in the future? Or are there maybe other possibilities which we did not see? The workaround we are currently aiming for is the following: Provide an initial plugin view where the user (has to be an admin or someone who has access to the values which have to be passed) has to fill out a form at least on the first time a plugin instance gets created. Then when another plugin instance is created the user has the choice to change or not to change the parameters. Best regards Alexander
ANSWERED

Sometimes the plugin cannot be initialized ERR6 after Cannot read properties of null (reading 'contentwindow')

This ticket refers to the customer ticket 56816. In a Haiilo instance of our customer, sometimes the Haiilo plugin cannot be initialized. In the console you can see an ERR6 with the error message "ERROR PluginError: Initialization timed out after 60000ms (ERR6) at 672.5ce4467c03910880.js:1:15927". If the page is reloaded in such cases, the plugin is initialized correctly afterwards. Noticeable is that before that another error message "Uncaught TypeError: Cannot read properties of null (reading 'contentwindow') at init.js?id=0fa78adf...7&lang=en-US:185:78" appears and then after 60000ms the ERR6 code appears. I have two screenshots showing the behavior. I myself, cannot reproduce in our Haiilo test instance the problem. Here the plugin is always loaded. Where does the error "Uncaught TypeError: Cannot read properties of null (reading 'contentwindow') at init.js?id=0fa78adf...7&lang=en-US:185:78" and do you think this error is related to ERR6? Thanks, Simon
ANSWERED

Plug-in Sizing & White padding problem

We are currently working on developing a plugin for COYO. As it should be addable to the different panels (e.g. small side panel, middle panel etc.) of the platform, we experienced some problems with sizing and padding. To give you the explicit problems: - When visualizing the plug-in on the side panel of the platform, there is white padding around the iframe. We would like the iframe to have the full width of the panel, or at least reduce the padding to a minimum - Also, we would like to change the height of the side panel block, since currently the content of the plugin is limited by the panel size. Could someone help us with this? Thanks a lot.
ANSWERED

How to correlate the "src" parameter to a plugin "instanceId"?

Hi! After some initial implementation we found out that the "instanceId" which is delivered on the lifecycle event "instance_add" seems to be different from the "src" parameter which is later on send by the plugin instance. It is a bit confusing because in this questions https://dev.coyoapp.com/discuss/6000b682c87152001e71e0de it is said that these should be the same. But we definitely get different ids which is leading to extra implementation work, because the requests have to be mapped to the plugin object created/persisted beforehand in the lifecyle event "instance_add". Right now we do an extra window.postMessage with sub "init" to get the "instanceId" from the "scr" parameter. Would it not be simpler if src == instanceId? COYO: 33.0.2-RELEASE manifest: 2.0.0 Best regards Alexander
ANSWERED

REST API question: finding out if a user has subscribed to a page

Hello, I'm about to write a little Browser Add-On that hooks into the COYO web frontend with a button and allows to collect all the comments of a blog post. We need this because we offer raffles for all employees via a blog post and the employees need to make a comment below that post to be able to win. However, to be eligable the commenting users also need to follow our page. So I want to test for every commenter if he/she follows/has subscribed to our page. In the REST API documentation I found this endpoint: `/users/<user ID>/subscriptions?targetId=<ID of page>` However, this only seems to work for my own user ID. If I use a commenter's user ID I always get a "404" result. Now, because I'm writing a Browser Add-On here I'm "only" authenticated via my own user account agains the API (I'm getting the neccessary token for each REST API call from the `/web/authorization/token` endpoint; this works fine). Is there any way in this constellation to check if a user follows a page? Or is it by design that I can only check for my own subscriptions when using the REST API this way? Thanks, Stefan.
ANSWERED

Is there a way to get the Role of the current User

Hi :) We build a plugin which has a elaborate configuration. To get to the configuration page, we added a button to our app. The Problem is, that every user can see this button for now, but the plan is to display this button only to moderators and admins. I looked at the manifest file if we could get the role from the context, but all i could find were "username", "usermail" and "userlanguage". So how could we determine if a user is a "normal" user or an mod/admin. Thx in advance Chris