Actions in app definitions.

16 views
Skip to first unread message

Michiel Meeuwissen

unread,
Jan 13, 2022, 5:19:36 AMJan 13
to Magnolia User Mailing List
I'm trying to migrate a custom app to magnolia 6.

One of the things which is hard, is that some things seem to simply fail without any feed back whatsoever.

E.g. I defined an action, and annotated it with @ActionType.  If a try to use it in an app yaml, it will simply completely fail to see this action. I have no idea why, and more importantly I have no idea how to debug it. Nothing in the log, no notification. It just is gone, and that it does say: 

 WARN  a.ui.contentapp.browser.actions.ActionbarPresenter: Action publishTip defined in group publishActions not found

If  I change the $type to something which is known. ('deleteNodesConfirmationAction' or so), the warning disappears, and I get the button, but well, it does the wrong thing then....

How would I debug this? What could be the problem?

Greetings,

 Michiel


Michiel Meeuwissen

unread,
Jan 13, 2022, 6:09:54 AMJan 13
to Magnolia User Mailing List, Michiel Meeuwissen
I finally found I I annotated the action itself, and not the definition.  The definitions are pretty much empty btw, so I think  I mentally just didn't see their raison d'être. Anyhow, why does it not simply log fat error when I'm doing something like that?

Michiel


samuli....@gmail.com

unread,
Jan 13, 2022, 6:23:14 AMJan 13
to user...@magnolia-cms.com

It logged a warning that it could not find the action because you annotated the wrong class.  It might not be totally trivial to figure out all the possible cases why the action is actually missing.

 

And to be honest it’s pretty good info compared to for example some cases I have debugged NPE:s flying around when building Magnolia UIs caused by wrong yaml indentation or something similar.

 

BR, Samuli

--
You received this message because you are subscribed to the Google Groups "Magnolia User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to user-list+...@magnolia-cms.com.
To view this discussion on the web, visit https://groups.google.com/a/magnolia-cms.com/d/msgid/user-list/0a2f8557-d7b5-4252-8539-817ad728eff7n%40magnolia-cms.com.

Michiel Meeuwissen

unread,
Jan 13, 2022, 8:00:32 AMJan 13
to Magnolia User Mailing List, samuli....@gmail.com
On Thursday, January 13, 2022 at 12:23:14 PM UTC+1 samuli....@gmail.com wrote:

It logged a warning that it could not find the action because you annotated the wrong class.  It might not be totally trivial to figure out all the possible cases why the action is actually missing.



I don't agree. The action was actually present in the yaml, it wasn't missing at all. The warning said it wasn't,  which was simply untrue.   Something should have said why, or at least that, it could not be parsed.

And to be honest it’s pretty good info compared to for example some cases I have debugged NPE:s flying around when building Magnolia UIs caused by wrong yaml indentation or something similar.

 
That something else is even worse, is hardly an argument.

Michiel


Reply all
Reply to author
Forward
0 new messages