Forums de discussion

Can't get the new configuration to work

Thomas Kellerer, modifié il y a 6 années.

Can't get the new configuration to work

Expert Publications: 490 Date d'inscription: 09/06/08 Publications récentes
I am trying to migrate my portlets from 6.0 to 7.0 and another roadblock I am hitting is the "Configure" action.

The old way does not seem to work any more, so I'm following the tutorial in the Wiki:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/making-your-applications-configurable to make my portlets configurable.

However I also couldn't get that to work, so I tried the "configurationaction" portlet from the "Blade Samples" https://github.com/liferay/liferay-blade-samples

But when I build and deploy the "blade.configurationaction" portlet, it gets deployed successfully, but nothing shows up in the system settings.

Do I need to configure something in Liferay to make that work?
Is the Blade Sample simply de-funct?
How can I find out why that isn't working? There are no error messages in the Liferay logfile.
thumbnail
David H Nebinger, modifié il y a 6 années.

RE: Can't get the new configuration to work

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
No, the configuration action stuff works, but I think it often depends upon scope and access.

Without seeing any of your code, it would be impossible to point out what might not be working, but I can confirm that the CA stuff definitely works, having used it myself.








Come meet me at the 2017 LSNA!
Thomas Kellerer, modifié il y a 6 années.

RE: Can't get the new configuration to work

Expert Publications: 490 Date d'inscription: 09/06/08 Publications récentes
David H Nebinger:
No, the configuration action stuff works, but I think it often depends upon scope and access.

Without seeing any of your code, it would be impossible to point out what might not be working, but I can confirm that the CA stuff definitely works, having used it myself.


This is the code that doesn't work:
https://github.com/liferay/liferay-blade-samples/tree/master/maven/blade.configurationaction

But my actual question is still open: How can I find out why my own code doesn't work? Is there any logging that needs to be turned on?
Currently Liferay simply states that the bundle was started, but nothing happens. No error, no exception no log message nothing. So I have no clue why Liferay thinks I have done something wrong, and it's giving me no help to find out what I did wrong. So how should I approach this? How can I debug the code to find the missing piece or wrong scope or wrong access (if I find out eventually where to change that).
thumbnail
David H Nebinger, modifié il y a 6 années.

RE: Can't get the new configuration to work

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
That code does work, however. That is for portlet configuration, it won't add to the system settings control panel if that's what you're looking for.









Come meet me at the 2017 LSNA!
thumbnail
Christoph Rabel, modifié il y a 6 années.

RE: Can't get the new configuration to work

Liferay Legend Publications: 1554 Date d'inscription: 24/09/09 Publications récentes
I remember that I have battled with configuration a day or so too. Something has to be wrong on the wiki page or misleading. It didn't couldn't get it to work.
I remember, I went then to github, looked into Liferay sourcecode, into a module (not sure which one) and "copied" what they did. And then it worked instantly.

No idea what the difference was, but something went wrong when I followed the wiki example.

I am also unsure how correct the wiki is, since Liferay code does some things differently. e.g. They don't add "-metatype: *" to the bnd.bnd file for example. So, do we need that? Or not?


What annoys me is that it is far more work than previously. Sure, there is this global configuration, that's nice. But I still have to write a per portlet configuration.jsp myself. Why? Why can't it just generate the configuration page on all relevant scopes automatically?
At least preferences-- still works, so I don't have to implement the ConfigurationAction.
Thomas Kellerer, modifié il y a 6 années.

RE: Can't get the new configuration to work

Expert Publications: 490 Date d'inscription: 09/06/08 Publications récentes
I stopped Liferay, deleted the contents from the folders $LIFERAY_HOME/osgi/state, $LIFERAY_HOME/work, $LIFERAY_HOME/tomcat-8.0.32/temp, $LIFERAY_HOME/tomcat-8.0.32/work and from my user's temp directory all those gazillions of BridJExtractedLibrariesXXXX directories that are created on every deploy.

Then I restarted Liferay deployed my portlet again, and now the configuration shows up in the system settings. I don't know what was messed up.