Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Migrate to jQuery 3.x #687

wants to merge 6 commits into from

Conversation

yellowled
Copy link
Member

Note: This should be tested before merging! See referenced issue for a list of core themes and additional plugins depending on jQuery.

  • Update bundled jQuery to 3.4.1
  • Add jQuery migrate plugin
  • Include jQuery migrate in all frontend and backend templates

References #686

- Update bundled jQuery to 3.4.1
- Add jQuery migrate plugin
- Include jQuery migrate in all frontend and backend templates

References #686
@onli
Copy link
Member

onli commented Mar 14, 2021

@yellowled How can I test this for you? I assume this is still something that should be merged?

@yellowled
Copy link
Member Author

@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 serendipity_event_commentedit.

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.

@onli
Copy link
Member

onli commented Mar 14, 2021

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.

onli added a commit to s9y/additional_plugins that referenced this pull request Jan 18, 2025
Intended to finally address  make jQuery upgrade possible, see s9y/Serendipity#687 (comment)
onli added a commit to s9y/additional_plugins that referenced this pull request Jan 18, 2025
Intended to finally address  make jQuery upgrade possible, see s9y/Serendipity#687 (comment)
@onli
Copy link
Member

onli commented Jan 20, 2025

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 ?

@fe-hicking
Copy link
Contributor

Hm, theres a .orig file mixed in the commit.

I also dont know what jquery-migrate is, I wonder if we could do without...?!

@onli
Copy link
Member

onli commented Jan 21, 2025

Hm, theres a .orig file mixed in the commit.

I removed it, and added .orig to .gitignore.

I also dont know what jquery-migrate is, I wonder if we could do without...?!

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants