migrating to 3.0.1: lift:Msgs class not found

30 views
Skip to first unread message

Boris Chazalet

unread,
Jan 13, 2017, 7:35:45 AM1/13/17
to Lift
Hi everyone,

I am in the process of migrating a lift app to lift 3.0.1 and I am currently stuck on a view that doesn't want to render. I get the message below: 

Error processing snippet: lift:Msgs 
Reason: Class Not Found 
XML causing this error: 
          <lift:lift:Msgs showAll="true"><div class="row span24">
      <lift:error_class>alert alert-error alert-block</lift:error_class>
      <lift:warning_class>alert alert-success alert-block</lift:warning_class>
      <lift:notice_class>alert alert-info alert-block</lift:notice_class>
    </div></lift:lift:Msgs>
        
note: this error is displayed in the browser because your application is running in "development" or "test" mode.If you set the system property run.mode=production, this error will not be displayed, but there will be errors in the output logs.

What am I missing? Is it the Msgs class that is not found? Has it changed name/package?

Thanks a lot,
Boris

Antonio Salazar Cardozo

unread,
Jan 13, 2017, 8:10:30 AM1/13/17
to Lift
Not sure why this worked before, but that should probably be `lift:Msgs`, not `lift:lift:Msgs`.
See if that fixes it and if not we'll take a deeper look.
Thanks,
Anotnio

Antonio Salazar Cardozo

unread,
Jan 13, 2017, 8:10:44 AM1/13/17
to Lift
(That awkward moment when you misspelled your own name…)
Antonio

Boris Chazalet

unread,
Jan 16, 2017, 3:41:50 AM1/16/17
to Lift
Thanks for your swift reply Antonio.

The 'lift:lift:Msgs' is what I see rendered, but the original html from the template is :

<div class="row span24" data-lift="lift:Msgs?showAll=true">

     
<lift:error_class>alert alert-error alert-block</lift:error_class>
     
<lift:warning_class>alert alert-success alert-block</lift:warning_class>
     
<lift:notice_class>alert alert-info alert-block</lift:notice_class>
   
</div>


Thanks to your hint, I have changed data-lift="lift:Msgs?showAll=true" to data-lift="Msgs?showAll=true" and it looks like it has fixed it.

I have got that pattern, e.g. data-lift="lift:..." in other places in the application I am migrating: am I supposed to remove the lift prefix everywhere then?

Boris

Antonio Salazar Cardozo

unread,
Jan 16, 2017, 12:40:59 PM1/16/17
to Lift
Yes, definitely. I'm actually not sure why that used to work to begin with, but
the `data-lift` prefix replaces the `lift:` prefix that you would use if you were using
a class instead.
Thanks,
Antonio

Boris Chazalet

unread,
Jan 17, 2017, 3:32:02 AM1/17/17
to Lift
Thanks for your help Antonio!

Antonio Salazar Cardozo

unread,
Jan 18, 2017, 11:46:59 AM1/18/17
to Lift
My pleasure!
Antonio
Reply all
Reply to author
Forward
0 new messages