Lift 3.0-RC4.

89 views
Skip to first unread message

Antonio Salazar Cardozo

unread,
Oct 2, 2016, 10:02:37 PM10/2/16
to Lift
Hello folks,
Diego published the latest RC for Lift 3.0, RC4, on Friday evening.

Andreas Krogh reported an issue several weeks ago where Lift 3 broke some
existing apps when certain HTML-appending AJAX responses interacted with
the new event extraction in Lift 3. We considered this a severe enough regression
to block the release of 3.0-final without a fix.

Rather than introduce additional complications into event extraction this
late in the RC cycle, we've chosen to add a flag to Lift 3.0 that will allow
enabling event extraction. Contrary to the behavior of Lift 3 prior to this
release candidate, event extraction is now disabled by default. If you
have been using Lift 3 pre-release builds without issues and want to
continue using event extraction, you must explicitly set this in Boot:

    LiftRules.extractInlineJavaScript = true

We decided to do this as our goal is to make it as painless as possible
to upgrade from Lift 2.6 to Lift 3, since the 2.x series is receiving minimal
release attention (beyond critical security fixes). We're hoping that additional
improvements will allow us to enable event extraction by default in a later
Lift 3 point release.

As per usual, big thanks to Buildmaster Diego, and to Andreas for promptly
reporting this issue and helping to explore solutions to it.

With that, the release notes:

RC3 (and previous pre-release versions of Lift 3 that do event extraction for
content security policy purposes) had an issue where AJAX responses containing
HTML that in turn contained embedded event handlers could in certain cases turn
into attempts to attach events before the associated HTML elements were in
the DOM. This caused failures with existing apps.

Due to the lateness in the RC cycle of this bug, we've opted to allow for
disabling event extraction altogether, and disabled it by default. This
means that apps that have been using event extraction will want to enable it
explicitly by setting:

LiftRules.extractInlineJavaScript = true

We will enable it by default in a future Lift 3 point release once we're confident
of its correct behavior.

We expect this to be the last RC before Lift 3 goes final.

Breaking Changes

  • (#1809) You must now explicitly enable event extraction (which turns on*-style event attributes in HTML and javascript:-style form submission and link URLs into out-of-band JavaScript that attaches event handlers, making HTML like this generated by Lift compatible with restrictive content security policies) in order for Lift to do this. This was done in response to noticing some issues with event extraction and HTML-appending AJAX responses, which could in some cases attempt to bind event handlers before the relevant nodes were in the DOM, and thus failed to bind those handlers. Users of Lift 3 before RC4 will want to explicitly enableLiftRules.extractInlineJavaScript to preserve prior behavior.

Thanks,
Antonio

Diego Medina

unread,
Oct 2, 2016, 10:44:55 PM10/2/16
to Lift
Thanks for all the help getting RC4 ready!

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
http://blog.fmpwizard.com/

Saiki Tanabe

unread,
Oct 7, 2016, 6:50:14 AM10/7/16
to Lift
Thank you for the RC4 and a way to disable new event extraction behaviour!

Few days ago deployed a version with Lift 3 RC3. Everything works mostly great, but just started to look a bug of less used feature, where html is loaded dynamically and uses SHtml.ajaxInvoke in it, events were not fired for those. RC4 fixed this behaviour.

Perfect timing!

Saiki
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Diego Medina

unread,
Oct 7, 2016, 7:59:05 AM10/7/16
to Lift
that's great!

To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Antonio Salazar Cardozo

unread,
Oct 7, 2016, 12:37:17 PM10/7/16
to Lift
Ah, I think this is an instance of #1807, which I'll be looking at in the 3.1
release cycle.

Glad this helped!
Thanks,
Antonio

Saiki Tanabe

unread,
Oct 8, 2016, 7:43:18 AM10/8/16
to Lift
Oh yes, looks like this would fix this scenario! Currently using couple of angularjs partials that are not full html pages. I can test this behavior if you have chance to work with it on 3.1.

Saiki

Antonio Salazar Cardozo

unread,
Oct 10, 2016, 2:25:08 PM10/10/16
to Lift
Sweet, thanks! Will try to reach out when that's done :)
Thanks,
Antonio

Antonio Salazar Cardozo

unread,
Apr 23, 2017, 8:51:25 PM4/23/17
to Lift
Hey Saiki,
Just accidentally happened to notice this post and realize you were waiting
on a fix for 1807; PR 1841 should fix that for you if you still need it and want
to give the PR a test whirl and report back in there whether it helped or not!
Thanks,
Antonio

Saiki Tanabe

unread,
Apr 24, 2017, 8:01:18 AM4/24/17
to lif...@googlegroups.com
Thanks, Antonio! Yes, it is still relevant. Now need to figure out how to test a pull request :) Is it enough to make a local build with the eventful-merger branch?

Saiki


You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/yL2oiuk7lC0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Saiki Tanabe
https://sketchboard.io -- Make a complex problem simple. Sketch.

Antonio Salazar Cardozo

unread,
Apr 24, 2017, 8:16:04 AM4/24/17
to Lift
If you publish-local from a local version of the branch and are using 3.1-SNAPSHOT, your build should get picked up, yep!
Reply all
Reply to author
Forward
0 new messages