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

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

Open
clarkwinkelmann opened this Issue May 10, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@clarkwinkelmann
Copy link

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

clarkwinkelmann commented May 10, 2018

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

@Ralkage

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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 Ralkage added todo bug labels May 10, 2018

@Ralkage

This comment has been minimized.

Copy link
Member

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

Ralkage added a commit that referenced this issue May 13, 2018

Tidy up README.md
- Fixed spelling.
- Added compatibility list (see #20 to why this was added).
- Changed GitLab links to GitHub.
- Fixed shields.

@Ralkage Ralkage referenced this issue May 13, 2018

Merged

0.1.5 #21

@Ralkage

This comment has been minimized.

Copy link
Member

Ralkage commented May 13, 2018

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

@Kenner-G

This comment has been minimized.

Copy link

Kenner-G commented Jul 4, 2018

hey. fixed?

@Ralkage

This comment has been minimized.

Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment