-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to jQuery 3.x #687
base: master
Are you sure you want to change the base?
Conversation
- Update bundled jQuery to 3.4.1 - Add jQuery migrate plugin - Include jQuery migrate in all frontend and backend templates References #686
@yellowled How can I test this for you? I assume this is still something that should be merged? |
@onli Basically, see #686 and the comments there. I did some testing, as did @mmitch and @surrim, but there are (additional) plugins that will break, most notably I think the only way to be sure would be to test every plugin and/or functionality that requires jQuery to see if it requires an old version and/or if using the migrate plugin helps. In some cases (like commentedit) this seemed to require some familiarity with the – PHP – code or at least the plugin that I did not have. That's why I gave up testing. Also, the version should be bumped to jQuery 3.6.0. I'm not sure "how much" functonality just merging would break at this point. Probably not too too much in core, core plugins and core themes, but that's just a guess at this point. |
I gonna have a look at commentedit. It was probably too complicated for me at the time when I wrote it, but it's a feature I still want. Maybe I can clean it up and fix the bug at the same time. Most of the other plugin errors linked in that thread seem to be PHP issues. |
Intended to finally address make jQuery upgrade possible, see s9y/Serendipity#687 (comment)
Intended to finally address make jQuery upgrade possible, see s9y/Serendipity#687 (comment)
I think we can actually merge this now. This PR now contains the current jQuery version, plus the current migration plugin. With commentedit fixed I had a look at a few of the other plugins marked as problematic (livecomment, lightbox, linktrimmer), and they all worked - or had issues on the PHP level. PHP errors also explain some of the bugs opened via #686. I didn't even notice output from the jquery migration plugin, but I might have just been unlucky with the plugin selection for that - and either the backend JS code is completely compatible, or I'm misunderstanding how that plugin is supposed to work. In any case, I think merging this into master and testing it that way is the only path forward. Ok @garvinhicking ? |
Hm, theres a .orig file mixed in the commit. I also dont know what jquery-migrate is, I wonder if we could do without...?! |
I removed it, and added .orig to .gitignore.
https://github.com/jquery/jquery-migrate/#readme explains its function (and also why I did not see console warnings, the production version does not output them...). It paves over the breaking changes. I think we need it for now. We could try to rework the core JS for the changes, but then there would still be all the plugins left to fix... |
Note: This should be tested before merging! See referenced issue for a list of core themes and additional plugins depending on jQuery.
References #686