1. This doesn't look like a "full" bug but...

The user settings form element doesn't appear in the user form display (/admin/config/people/accounts/form-display)
That means:

  • we can't reorder it
  • we can't put it in a field group

More an annoyance than a bug, but it would be nice to have the form element available in the form display.

2. This looks more like a bug

Now let's say we have 2 types of users:

  • basic member: no private messages
  • privileged member: access to private messages

On the edit profile page of the basic member, the privatemsg settings will be shown, that doesn't seem right.

3. This looks like a feature request

I don't need this, but maybe it could be useful:
If a user has access to private messages, an admin might want to:

  • make sure that the private messages are always enabled for all users (removing the setting in the user edit page)
  • make sure all the users have the same "notify" settings (also removing the setting in the user edit page)

(If both settings are controlled by the admin => no settings in the user profile)

Only point 1 would be useful for my project, in case you need to prioritize ;p

Issue fork privatemsg-3589325

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lemartialou created an issue. See original summary.

ivnish made their first commit to this issue’s fork.

ivnish’s picture

Assigned: Unassigned » ivnish

  • ivnish committed 05508197 on 2.0.x
    fix: #3589325 User settings quirks
    
    By: lemartialou
    By: ivnish
    
ivnish’s picture

Assigned: ivnish » Unassigned
Status: Active » Fixed

Fixed 1 and 2. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

lemartialou’s picture

Thank you! Everything is working nicely! It seems to work well with field group too, so cool ^^

However there is still a little problem, I had to pass through a glitch to make this work:
From a fresh install the settings won't be shown on any profile edit page, not even the admin one, no matter how the permissions are setup, no matter how many times you rebuild the cache.

Here is what needs to be done: go to /admin/config/people/accounts/form-display
And save the configuration. That's it, now it works.

I can live with that but I guess this should be fixed to not confuse other people.
Cheers!

ivnish’s picture

I reinstalled module few times and I can't reproduce this.

I installed the module
Configured permissions to write messages
Edit user profile
I see privatemsg profile checkboxes

lemartialou’s picture

That's strange, I can definitely reproduce this...

Minimal setup to reproduce on my side:
(apache 2.4.62, php 8.3.26, mysql 8.4.3)

composer create-project drupal/recommended-project:^11.3.9 mysite --no-interaction
cd mysite
composer require drush/drush:^13.7.2 --no-interaction

vendor\bin\drush site-install minimal ... (I'm starting from a minimal install here)
vendor\bin\drush pm:enable mysql -y

vendor\bin\drush pm:enable datetime -y
vendor\bin\drush pm:enable taxonomy -y

vendor\bin\drush pm:enable field_ui -y
vendor\bin\drush pm:enable views_ui -y

vendor\bin\drush theme:enable claro -y
vendor\bin\drush config-set system.theme default claro -y

composer require drupal/admin_toolbar --no-interaction
vendor\bin\drush pm:enable admin_toolbar -y
vendor\bin\drush pm:enable admin_toolbar_tools -y

composer require drupal/views_bulk_operations --no-interaction
vendor\bin\drush pm:enable views_bulk_operations -y
vendor\bin\drush pm:enable actions_permissions -y

composer require drupal/privatemsg:^2.0.x-dev --no-interaction
vendor\bin\drush pm:enable privatemsg -y

Already frome there I can log as the admin and go to the admin edit page (user/1/edit)
And the privatemsg settings won't be shown.

Now,
- add "write and view messages" to the authenticated user
- create user1 (via admin/people/create)
- log as user1 and go to the profile edit page (user/2/edit)
=> the privatemsg settings won't be shown

Now, as the admin
- go to admin/config/people/accounts/form-display
- save the configuration (no need to touch anything)

=> The problem is now fixed for admin and user1, the privatemsg settings are shown, and everything is working as intended from there.

I don't know... did you test from a fresh install?

ivnish’s picture

I tested a fresh install with your workflow.

When I logged in as user id=1 (admin) after install I saw the privatemsg settings

When I logged in as User 1 (user/2/edit) I saw the privatemsg settings

I can't reproduce this. Could you update the dev-version of module?

lemartialou’s picture

That's weird, I can definitly reproduce this, even with the last dev (I also tried to update to drupal 11.3.10 and drush 13.7.3)

Did you do the exact same commands in the same order?

If so I don't know, that would mean something related to my dev environment, I am on Windows 10 and I'm using Laragon 8.3.0 (apache 2.4.62, php 8.3.26, mysql 8.4.3). Could this be because I use php 8.3 instead of 8.4 or 8.5?

As I said before the problem is fixed simply by going to admin/config/people/accounts/form-display and clicking on Save, to me it seems related to that user form-display settings, but again I don't know, you're the one who knows best.

ivnish’s picture

Let's wait for feedback from other users

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.