Closed (fixed)
Project:
Registration Link
Version:
8.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2016 at 13:15 UTC
Updated:
13 Nov 2019 at 07:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
d.popov commentedHi,
I will test and try to reproduce the issue. In the meantime you can just manually delete the menu links (they should be editable and delitable) and then install the module to only have one registration link.
Comment #3
Ivo.Radulovski commentedwas it possible to reproduce the issue?
Comment #4
d.popov commentedI could not reproduce the issue. Need more info!
Comment #5
sheise commentedI was able to reproduce the issue. Every time database updates (drush updb) are run, a new link for "Register an Account" gets added.
Comment #6
sheise commentedComment #7
Elmar Kleikamp commentedI have a one week old, fresh Drupal 8.31 install. I also enabled Forums Module from the core recently and added the Registration Link module. I installed also Zymphonies Theme.
Since I have enabled the Registration Link module, unwanted Links are automatically created from the system.
A simple click on Configuration, and then "Back to site" is enough for an additional menu link "Register an Account" appearing in my main Navigation Menu.
Also multiple menu links are added to the existing one when I look for system status report or undertake similar actions like confinguring user roles e.t.c.
Removing all the unessecary links is not fun at all. Unfortunately I need the "Register an Account" link on the frontpage of my website.
The Registration Link module most definitely has a bug that needs to be solved.
I´m not a programmer but when requested I can give access to my website if anyone has an interest in solving the issue.
Comment #8
KrypticBit commentedI can confirm that this issue exists, until it's fixed it makes the module unusable in my opinion. I've also looked at the code and to me it appears obvious why it's doing this. The PHP script needs to be in an if/else statement,
`if menu block = correct values then don't run PHP else Run PHP and add the registration link.`
If I have the time I might look into fixing it, don't count on it though I'm pretty busy right now.
Comment #9
rootworkUpdating status. Agreed that this makes the module unusable.
Comment #10
boromino commentedComment #11
useernamee commentedHey boronimo.
Your patch sadly doesn't work for administrator role since
_access_user_registeronly allows anonymous access (checkDrupal\user\Access\RegisterAccessCheck).Otherwise your #10 patch solves the problem of multiplication of registration link after
drush updb.Comment #12
useernamee commentedHi.
I have written a custom access check for user.register route, which allows administrator to access this route. I have worked on the @boronimo's patch so I have included his patch in mine.
Comment #13
useernamee commentedThere is a problem with patch #12 - it does not apply.
Here is working patch:
Comment #14
alesbencina commentedHi, @useernamee,
I have tested your patch and it does apply nicely.
It works when admin change configuration who can register (only admin or also anonymous.)
Comment #15
nkoporecHey @useernamee, tried to test the latest patch but it doesn't apply.
Getting this error
I'm using Drupal 8.5 and 8.x-1.x branch.
Comment #16
useernamee commentedI was working on 8.x-1.x-dev version which I got from composer. After cloning this repo from git the patch did not apply to me.
So here is the patch that should apply.
Comment #17
nkoporecHi, tested the patch and it applies cleanly also it fixes the issue.
Note: To get the patch to work you must uninstall the module, apply the patch and then reinstall the module.
Comment #18
superbole commentedI had this problem on 8.x-1.0 version and patch 16 fixed the issue for me.
I did a manual patch.
I also followed the note in #17, I cannot confirm it is necessary, I can confirm it works.
Comment #19
KrypticBit commented#16 Worked for me. Thanks!
Comment #20
i-trokhanenkoPatch #16 looks good for me, but need to rewrite it.
But given that it would change a bit the module structure, I would suggest to release in a 2.x branch.
Comment #21
i-trokhanenkoComment #22
i-trokhanenkoComment #23
i-trokhanenkoCommitted to 8.x-2.x
https://git.drupalcode.org/project/registration_link/tree/8.x-2.x
Thanks!
Comment #24
i-trokhanenko