Problem/Motivation

In the logout message we'd like to include a link back to the login screen. Like this You have been logged out due to inactivity. You may <a href="/user/login">click here to log back in</a>.

Steps to reproduce

  • Using Drupal 9.5 and autologout 1.4
  • Set your logout message to include HTML markup
    admin form showing markup
  • Await for the logout timeout to occur and reload your page to view the inactivity message
  • See markup is not rendered.
    markup not displaying image

Proposed resolution

Adjust code for the inactivityMessage() method in the AutologoutManager to use FormattedMarkup which will allow the message to have rendered markup.

Remaining tasks

Is this the correct place to resolve this? Or is there somewhere else that this should be adjusted?

Issue fork autologout-3367062

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

carsoncho created an issue. See original summary.

admirlju’s picture

Category: Support request » Feature request
admirlju’s picture

Status: Active » Needs review

Messed up the rebase a bit. Fixed it now, testing your changes to see if everything works like it's supposed to.

admirlju’s picture

The tests are passing here and locally, manual tests also work as the request intends it to. I'm for now leaving it as needs review, because of the mess up I did with rebase, just so people can make sure everything works. But it should be able to merge without a problem now.

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

deaom changed the visibility of the branch 8.x-1.x to hidden.

deaom’s picture

Version: 8.x-1.x-dev » 2.x-dev

Rebased the MR #33 and solved conflicts, cherry picked the commit and added it to the new branch, which targets the 2.x branch. Changing the version to the latest one, 2.x and leaving the status to needs review.

vinodhini.e’s picture

StatusFileSize
new14.22 KB

Hi, Installed the module on a Drupal 10.5.1 site.
Observed the issue: Initially, the logout message markup was not rendered correctly. The user was not shown any login link after being logged out.
Applied the patch from Merge Request #80, The logout message markup was rendered properly.
The message now correctly includes a login link, allowing users to log in again.

asrob’s picture

Status: Needs review » Reviewed & tested by the community

Changed status based on @vinodhini.e's comment.

the_g_bomb’s picture

Confirmed RTBC

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

inregards2pluto’s picture

StatusFileSize
new8.86 KB

Rebased the branch to pull in changes from https://www.drupal.org/project/autologout/issues/3339695. Tested and verified that the fix is still working.

We should be good to go here barring some of the outstanding phpunit tests (which it might make more sense to fix prior to the new release after merging in the other work).

the_g_bomb’s picture

Status: Reviewed & tested by the community » Fixed

Merged

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.

Status: Fixed » Closed (fixed)

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