Skip to content
This repository has been archived by the owner. It is now read-only.

SignUpModal can't be extended by other extensions with user-management active #20

Closed
clarkwinkelmann opened this issue May 10, 2018 · 14 comments

Comments

@clarkwinkelmann
Copy link

@clarkwinkelmann clarkwinkelmann commented May 10, 2018

This extension overrides the prototype methods of SignUpModal, making it impossible to extend by any other extension. In particular this breaks compatibility with Flagrow Terms.

The faulty code is around here in the main.js file

SignUpModal.prototype.body = function() {

If an extension like Flagrow Terms is loaded before User Management and extending the init, body or onsubmit methods the changes will be wiped out.

I suggest you use similar hacking to what I did in Terms https://github.com/flagrow/terms/blob/master/js/forum/src/addFieldsToRegister.js so you don't break extensibility for other extensions.

Of course once merged there will be a prettier way to do it in beta8 as already discussed on the forum flarum/core#1420

I can submit a pull request if you want.

@Ralkage
Copy link
Member

@Ralkage Ralkage commented May 10, 2018

We're planning to remove the registration related features that's currently in this extension. A Strikes extension will handle the strikes portion and "Reggy" will handle the registration modal related plans we have once your fix as well as Flarum Beta 8 become available.

@Ralkage
Copy link
Member

@Ralkage Ralkage commented May 10, 2018

This removal will happen anytime between the end of this week and next week. We will release these breaking changes in User Management version 0.1.0.

@clarkwinkelmann
Copy link
Author

@clarkwinkelmann clarkwinkelmann commented May 10, 2018

So do we just say the extensions are incompatible for now ?

@Ralkage
Copy link
Member

@Ralkage Ralkage commented May 10, 2018

Yessir.

I'll update the User Management compser.json and add the following line until we can get this issue resolved:

"conflict": {
        "flagrow/terms": "^0.1.2"

or should I be using * instead of the latest version number and up just in case other users are using an older version?

@Ralkage
Copy link
Member

@Ralkage Ralkage commented May 10, 2018

I will also let the users know why these two extensions aren't compatible in this quick patch update via release description and Flarum discussion.

@Ralkage
Copy link
Member

@Ralkage Ralkage commented May 10, 2018

As discussed and as a temp fix, I will add the following to the composer.json file for this extension.

"conflict": {
        "flagrow/terms": ">=0.1.0"
Ralkage added a commit that referenced this issue May 13, 2018
See #20
Ralkage added a commit that referenced this issue May 13, 2018
- Fixed spelling.
- Added compatibility list (see #20 to why this was added).
- Changed GitLab links to GitHub.
- Fixed shields.
@Ralkage Ralkage mentioned this issue May 13, 2018
@Ralkage
Copy link
Member

@Ralkage Ralkage commented May 13, 2018

@clarkwinkelmann this issue is being addressed with a temporary solution in our next patch release via #21.

@Kenner-G
Copy link

@Kenner-G Kenner-G commented Jul 4, 2018

hey. fixed?

@Ralkage
Copy link
Member

@Ralkage Ralkage commented Jul 27, 2018

@Kenner-G this issue will be fixed in Beta 8, but by then, User Management will no longer have user registration tweaks or Strikes. Those will be their own extensions :)

@Padrio
Copy link

@Padrio Padrio commented Mar 16, 2019

So, since 2018 nothing seems to happened here. Are there any new information on this? I really woul'd appreciate to use this plugin along with the terms.

@clarkwinkelmann
Copy link
Author

@clarkwinkelmann clarkwinkelmann commented Mar 17, 2019

Beta 8 includes the new registration extension options that won't create conflicts. Terms uses that since its beta 8 release, so no longer an issue on our side.

The question is more about if ReFlar plans to update this extension to beta 8

@Ralkage
Copy link
Member

@Ralkage Ralkage commented Mar 18, 2019

@Padrio this will not be updated for Beta 8, we are taking the route to which the combination of the planned merger of flagrow/user-directory and flagrow/users-list (if that's still something that's happening ofc, @clarkwinkelmann ;) )

@clarkwinkelmann
Copy link
Author

@clarkwinkelmann clarkwinkelmann commented Mar 18, 2019

@Ralkage it is still planned and @luceos started working on it but I'm not sure who will finish it and when. User Directory received its own beta 8 update in the meantime.

Maybe worth to archive repo or close issues as won't fix in this situation ?

@Ralkage
Copy link
Member

@Ralkage Ralkage commented Mar 18, 2019

Thank you for verifying @clarkwinkelmann 👍

To everyone else who stood by us and supported one of our very first successful extensions in ReFlar Land:

We are about to archive this extension as abandoned in favor of the planned merged extensions via Flagrow space. With that being said, we are no longer supporting this extension or providing any new bug fixes.

Please consider upgrading your Flarum version to support future development of newer and updated extensions :)

@Ralkage Ralkage closed this Mar 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants