This was brought up in #1700140-2: Drupal 6 port, offer to co-maintain.

I believe we will also need to trigger a cache clearing event by adding another hook_update_N() to the .install file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

star-szr’s picture

Title: Change menu items to use a dash instead of an underscore » Change user login history menu item to use a dash instead of an underscore

There's only one menu item that uses an underscore, fixing title.

a_thakur’s picture

Status: Active » Needs review
FileSize
2.8 KB

#1691412-1:Per-user login history report shows data from all users solves the issue. Please find the attached file.

star-szr’s picture

Thanks @a_thakur. The patch in #2 still leaves the link path in the block as login_history, and I believe users would need to clear their cache after updating the module. I think it would be better to clear the cache via hook_update_N() since users are used to running update.php after updating modules.

The attached patch:

  1. Addresses the original issue by updating the user-specific menu path to use a dash instead of an underscore.
  2. Triggers an update by adding an empty hook_update_N() to clear the menu cache. Removed a redundant newline here.
  3. Updates the link in the "Last login" block, refactored slightly to use l().

#1691474: Convert files to unix line endings has been applied first.

This came up as well: #1711938: "Last login" block throws errors if there are less than two logins stored for the user

star-szr’s picture

Actually, it would probably be an idea to use the conventional hook_update_N() schema numbering as well, i.e. 7101, 7102, etc.

greggles’s picture

Here's a re-roll of #3 with the advice from #4. The hook update now also explicitly clears the menu because some environments don't clear cache on every hook_update (e.g. my environment :) ).

Status: Needs review » Needs work

The last submitted patch, 5: 1707200-menu-item-fixup.patch, failed testing.

greggles’s picture

Status: Needs work » Needs review
FileSize
2.22 KB

  • greggles committed ca45fca on 7.x-1.x
    Issue #1707200 by greggles, Cottser, a_thakur: Change user login history...
greggles’s picture

Status: Needs review » Fixed

This was already fixed for 8.x, so nothing to be ported.

Status: Fixed » Closed (fixed)

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