Perform hook_views_data_alter after all other modules

Created on 12 March 2025, 2 months ago

Problem/Motivation

There are cases when other modules (such as publication_date β†’ ) provide timestamp/date fields and implement hook_views_data_alter to add views support.

That implementation of hook_views_data_alter happens after the one in this module, so the fields from publication_date never have the views_date_format_sql alter applied.

Proposed resolution

use hook_module_implements_alter to make sure our alters happen after other modules.

I will provide a MR.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @loze
  • Merge request !16Implement hook_module_implements_alter() β†’ (Open) created by loze
  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    MR16 gets this module working with publication_date for me.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles
  • Pipeline finished with Success
    2 months ago
    Total: 225s
    #446279
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    In Drupal, the module weight controls the order in which hooks are executed, with the weight determining the priority. Modules with a lower weight (e.g., -10) will have their hooks run before those with higher weights (e.g., 10). By adjusting a module's weight, you can influence the sequence of hook executions, allowing more control over the system's behavior during page requests or other operations.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    In another issue, we change the hook_views_data_alter. Instead of altering an existing views field, we add a new field.

    πŸ“Œ Views Schema Active

Production build 0.71.5 2024