No Code Attached Yet bug
avatar jjnxpct
jjnxpct
14 Jan 2025

Steps to reproduce the issue

Settings -> User registration: Enabled, Account activation by admin

Register as new user and use the link that is send to this user to first confirm the registration.

Admin then receives an email with a link to activate the user.
COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY -> {ACTIVATE}

Log in to the frontend with the admin account (in our case not superuser)
Click on the link in the email. This will take you to the frontend.

Expected result

User should be activated and a notification message about that should show.

Actual result

The user is not activated and no message is shown. The user that is logged in to activate the new user is in stead redirected to the user profile view.

System information (as much as possible)

Joomla 5.2.3
PHP 8.3.14
10.6.20-MariaDB-cll-lve

Additional comments

This has worked before on the site we are experiencing issues now. So something must have changed?

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar jjnxpct jjnxpct - open - 14 Jan 2025
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jan 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Jan 2025
avatar cmirnow
cmirnow - comment - 16 Jan 2025

Log in to the frontend with the admin account (in our case not superuser)

I logged into the frontend as superuser. And I have the same problem.

avatar QuyTon QuyTon - change - 16 Jan 2025
Labels Added: bug
avatar QuyTon QuyTon - labeled - 16 Jan 2025
avatar brianteeman
brianteeman - comment - 20 Jan 2025

I suspect that this has been resolved with #44730 which reverted some changes

avatar jjnxpct
jjnxpct - comment - 21 Jan 2025

Should I be able to test that by just adding these lines to my Joomla site?
https://github.com/joomla/joomla-cms/pull/44730/files

Or is there more to it?

avatar jjnxpct jjnxpct - change - 24 Jan 2025
The description was changed
avatar jjnxpct jjnxpct - edited - 24 Jan 2025
avatar bameag
bameag - comment - 4 Feb 2025

Exactly the same issue here,

but the patch on https://github.com/joomla/joomla-cms/pull/44730/files didn*t solve the problem.
This is a serious bug for sites with many subscribers per day, any other solutions?

Multilingual Site (en/de)
Joomla 5.2.3
PHP 8.2.27
MySQLi 10.6.15-MariaDB-log

avatar alikon
alikon - comment - 9 Feb 2025

i'm unable to replicate

avatar jjnxpct
jjnxpct - comment - 17 Feb 2025

I will test this again on the site we encountered this issue after the J 5.2.4 update (tomorrow). I hope this issue is solved with that update as brianteeman suspects.

avatar jjnxpct
jjnxpct - comment - 19 Feb 2025

Unfortunately the new Joomla ‎5.2.4 did not solve this issue. The activation link in the email is showing the user profile instead of actually approving the user. The link in the email send to the admin looks like this:

https://[DOMAIN]/registration?task=registration.activate&token=72102243b7e3d5023d165c3fb9e0bfd8

Any help with this is very much appreciated.

avatar jjnxpct
jjnxpct - comment - 19 Feb 2025

This would not be as big as an issue if we had an alternative to using the link in the email: Sending the activation email from the backend. There has been some work done on this feature but it never ended up in the Joomla code. That's to bad...
#20282

avatar webenhanced
webenhanced - comment - 21 Feb 2025

I am on 5.2.3 still and having this issue as well. I'll check the patch and 5.2.4 update and report back soon.
Joomla! 5.2.3 Stable
PHP 8.3.17
DB 10.11.10-MariaDB
Joomla Backward Compatibility Plugin enabled


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44732.

avatar webenhanced
webenhanced - comment - 21 Feb 2025

More details about my issue can be found here: Your text to link here...


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44732.

avatar SniperSister SniperSister - change - 21 Feb 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-02-21 10:22:44
Closed_By SniperSister
avatar SniperSister SniperSister - close - 21 Feb 2025
avatar SniperSister
SniperSister - comment - 21 Feb 2025

See #44951

avatar jjnxpct
jjnxpct - comment - 21 Feb 2025

I just installed a clean Joomla ‎5.2.4 on our server, with a minimum of changes. For the users I changed this:

  • Allow usser registration
  • Send Password: No
  • User activation: Administrator
  • E-mail to administrators: yes

I also created a 'manager' user account to test the activation link in the email. The usergroup has backend access to the Users and rights to edit, users.

I was able to use the activation link for a new user with both the Super User and the manager. After clicking the link in the email they did have to log in. After that the new use got activated. So it worked OK,

I did notice the page the user that uses the admin activation link is going to is:
/component/users/profile so this shows theri profile. Not sure if we can change that, but that's not a big issue.

Now the thin is: Why does this not work on our 'problem' site? I guess now I have to start testing some other stuff that might influence this. Maybe Admin Tools? Or my template? Or maybe the custom email template for this email?

I hope to find the cause of this issue. But for now I do think it's not a core Joomla issue...

If anyone has suggestions on where to look next can you let me know?

avatar jjnxpct
jjnxpct - comment - 21 Feb 2025

OK I did find something. The link to activate the user in the email of the problem site:

[DOMAIN]/registration?task=registration.activate&token=72102243b7e3d5023d165c3fb9e0bfd8

That did not work. But when I use this URL is does work:

[DOMAIN]/component/users?task=registration.activate&token=72102243b7e3d5023d165c3fb9e0bfd8

On the problem site we have a (hidden, public) ) menu item called 'registration'. So that is probably why in the activation link uses that menu item in the URL. But by doing that it causes the link not to work.

So next thing to figure out is how this URL is generated and why it won't work when there is a menu item and why it just does not use the 'correct' URL in the link,..

avatar joomdonation
joomdonation - comment - 21 Feb 2025

@jjnxpct Please check PR #44951, it should solve your issue.

avatar jjnxpct
jjnxpct - comment - 21 Feb 2025

Thanks! I used the changed Dispatcher file on our problem site. That does seem to help.

When I get the admin email and use the link -> "Please log in..."
After login in (Using the login module -> redirect to a menu item) nothing happens.
I then need to use the URL again, but then it works OK.

I think the best way for a manager to use the activation link:

  1. First login to the website frontend.
  2. Use the link in the email to activate the user.

I think because the login module redirects we need to use the URL again, It would be nice if the module would see we are coming from an activation link / URL, activate the user first, the redirect, But that's a different issue I suppose.

I do hope there will be an option to to send an activation mail from the backend. But also, this is not directly related to this specific bug.

I guess this fix will be in Joomla 5.3 and in the meantime we need to manually fix it on site that use this functionality?

avatar joomdonation
joomdonation - comment - 21 Feb 2025

After login in (Using the login module -> redirect to a menu item) nothing happens.

Don't login using the login module because the system could not remember the previous URL (which is activate account URL).

When you are not logged in, you will be redirected to login page of the component, then login from there (again, not login from login module), and everything will work as expected

I guess this fix will be in Joomla 5.3 and in the meantime we need to manually fix it on site that use this functionality?

Yes, if you need it fixed right now, you need to manual making the change to your site.

avatar SniperSister
SniperSister - comment - 21 Feb 2025

@jjnxpct it would be extremly helpful if you could leave a documented "successful test" in the PR #44951 as two of these successful tests are required to get the patch into 5.3

see https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results

avatar jjnxpct
jjnxpct - comment - 21 Feb 2025

@joomdonation Thanks Tuan. You are probably right about using the login component and not the module... Then the component will remember the URL. We might change that on this site. But why is there a module if it's better not to use it? It would be nice if the module could also remember the originale URL... Anyways, thanks for pointing this out!

avatar joomdonation
joomdonation - comment - 22 Feb 2025

@jjnxpct But why is there a module if it's better not to use it

I guess it is because it is not needed. Unless there is something special on your site (for example, the template style does not load component here for certain purpose, for example, you do not want to load component output on homepage), the login form from com_users component should be displayed and users can login from there. If that happens on your case, just create a menu item to link to Users Login menu item type of Users component, choose the right template style (in case your site template has multiple template styles) and it will work well.

avatar jjnxpct
jjnxpct - comment - 22 Feb 2025

@joomdonation Thanks for the additional info.

avatar joomdonation
joomdonation - comment - 22 Feb 2025

@jjnxpct You're welcome !

avatar webenhanced
webenhanced - comment - 27 Feb 2025

@joomdonation Not logging in to the frontend first using the module has fixed this issue for me too. I updated to v5.2.4 first and tested OK. It did previously work when logging in with the module, but now it does not.

Thanks for your information! Saved my sanity .


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44732.

Add a Comment

Login with GitHub to post a comment