Yes, WebPanel
was the only WebFragment
that never extended. This is why I mention that all ModuleDescriptor
s have this method.
I can’t give you a recommendation until I understand this though, the possible solutions would differ
Yes, WebPanel
was the only WebFragment
that never extended. This is why I mention that all ModuleDescriptor
s have this method.
I can’t give you a recommendation until I understand this though, the possible solutions would differ
However, the
systemInformationService
protected field doesn’t exist in 7.x, and perhaps even pre 8.5.5
Hey @metin
If 7.19 compat is strictly needed for your app, I would recommend you inject systemInformationService directly into your Action rather than using it from parent. Later once 7.19 is EOL, you can clean the code up and start using from the parent directly again.
For current removals, you can look at the removal of ConfluenceActionSupport methods under: Deprecated code paths removed in 9.0 | Confluence Data Center 8.9 | Atlassian Documentation
Thanks,
Ganesh
Hi @scott.dudley and @jens! I wanted to ask if you are still experiencing this problem on the latest Confluence milestone and QuickReload versions? (Chatting to @mkemp some QuickReload issues such as the one with the underscore library have been fixed on v5.0.6).
If the space tools button is still broken for you, are you able to provide more information about how you’re using QuickReload or any other details that might help? I wasn’t able to reproduce the problem on Confluence v9.0.0-m48 using QuickReload v5.0.4 in dev mode, or on the latest version of Confluence.
We haven’t seen this one before. What version of Confluence did you get this error from (include the exact version, please, including any milestones)? Can you give me a more complete stack trace?
Hi @anastoumi.
LocalNotificationService
is still there and should still be available. There were issues with it in earlier milestones, but they should’ve been fixed up by now. If you’re still experiencing issues with the latest EAP, could you describe them?
Hi @clouless,
Yes, UserAccessor
is deprecated, but it has been decomposed into several smaller interfaces which should be used in preference.
In your example, UserPreferencesAccessor
should be used.
Elias, Can you please share server error if the plugin is getting enabled or not
Hi @NikhilJain,
Thank you for getting back. The plugin is enabled, all servlets are working.
The modules for rest-v2 endpoints are enabled.
Then when I try calling the endpoints I get a 404. Debugging the rest-v2 source code shows me that the endpoint is enabled and the filter gets spawned. At some point in the call chain we end up with the 404 filter. I haven’t yet figured out why, even debugging the filter chain in the Confluence source code. I consistently get 404 for all Rest-v2 endpoints. I’ll dig and get you some more details soon.
Hey @Digi,
I can no longer reproduce the problem with Confluence 9.0.0-beta2 and QuickReload 5.0.6, but I can’t tell what upgrade exactly fixed it.
Thanks for looking into it
Thanks for your questions @remie and @VitorPelizza, I understand that getting accurate timelines from us will help inform you around how much runway there is before we go live. We want the ecosystem to be successful with this change so I’ll try to be as transparent as possible but please appreciate that things can always change.
As you’d know, we released our first 9.0 beta yesterday. The basic plan today barring any unforeseen changes is that we aim to ship another beta after this first one. We we also provide RCs for testing before we go live around the very end of the month.
I hope this helps!
Thanks @Clark for the reproduction plugin and others for reporting
We’ve diagnosed the bug and will be merging a fix very soon
@Kusal would it be possible to publish this fix before next Monday?
This is currently a hard blocker for my compatibility work on most of our apps and it also prevents me from testing other areas that have changed in Confluence 9.0.0-beta2 because a lot of functionality relies on the information from the web panels.
Actually, we have this error with the beta2 and previous milestones, regarding localNotificationService, we use config file to instantiate the managers beans.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localNotificationService' defined in com.company1.example1.plugins.ConfigBeans: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.mywork.service.LocalNotificationService]: Factory method 'localNotificationService' threw exception; nested exception is java.lang.NoClassDefFoundError: org/codehaus/jackson/node/ObjectNode
Do you have a full stack trace? LocalNotificationService
has no dependencies on org.codehaus.jackson
any more, so I’m not sure where that’s coming from. Can I also see the config file that uses it.
@ggautam Thank you for your answer.
I tried to use the different approaches. Now I removed editor-templates
. There is no putMetadata
error, but it still doesn’t work.
Now I have this error:
I tried to pass this parameter actionLocale
like that in my velocity template:
First:
#set ($actionLocale = $action.locale.toLanguageTag)
Second:
#set ($actionLocale = $action.locale)
Both approaches don’t work.
Can you help with it? Should I try to render the different velocity template (not atlassian-editor.vm
)? Should I try to render some soy template?
Any help or docs will be appreciated.
@mkemp This is a script to generate the HTML, so at registration time we need to pass the Groovy script/file location as a <param>
in the XML for the module, our WebPanel
implementation will then execute the code during com.atlassian.plugin.web.model.WebPanel#getHtml
This could either be an inline string containing the script eg return "MyWebPanel"
or a file location e.g MyWebPanel.groovy
, so being able to pass an arbitrary string is our need, and we’d format the data appropriately.
The WebPanel
interface itself has no knowledge of which SR configuration it was generated from, so we need to be able to pass that data via the XML for the module, in a way that the interface can then access.
Does that make sense? Cheers!
Follow-up on the strange 404 errors on rest-v2. I have twice fallen in the trap with the jakarta versions during the rest-v2 migration (since the guide doesn’t specify any version and I had to guess). I used a new version of jakarta (4.x which has migrated the namespace), and I had at some point kept a version 2.x of javax.ws.rs:javax.ws.rs-api in my pom. When this was the source of my annotations instead of 2.x of jakarta.ws.rs:jakarta.ws.rs-api, I got these subtle 404 errors in runtime. Removing javax.ws.rs and changing the version of jakarta.ws.rs:jakarta.ws.rs-api to 2.1.6 fixed my issue (however the namespace in the packages is still the same)
Hi @mkemp
Just wanted to mention that we figured out how to do this now with a ContextProvider. Not sure if it is the best way, but it works for WebPanel’s so far.
Basic idea:
To get params from the web panel XML definition into the WebPanel provider class, we can create a custom com.atlassian.plugin.web.ContextProvider
implementation. This implementation receives the params via the init method, and then we push those through the context map into the WebPanel provider class.
Thanks.
I’ve used it without the DefaultUser this way:
User userTemplate = new User()
{
@Override
public String getEmail()
{
return "email";
}
@Override
public String getFullName()
{
return "desc";
}
@Override
public String getName()
{
return "name";
}
};
userAccessor.createUser(userTemplate, Credential.unencrypted(generator.generate(20)));
Is that correct?
Also, my issue now is with permissions. I’m creating the user without a logged user. Now, with Confluence 9, I’m getting com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges.
Any idea how to create a new user without another one?
Thanks
I was under the impression that the ContextProvider will only get their own parameters. In this example, I would expect the ContextProvider to only get parameter abc
and not ghi
:
<web-panel ...>
<context-provider ...>
<param name="abc" value="def" />
</context-provider>
<param name="ghi" value="jkl" />
</web-panel>