Skip to content

Link for full list of string references to Block class leads to 404 #268

Open

Description

@docwilmot

Activity

  1. yorkshire-pudding commented on Mar 20, 2026

    @yorkshire-pudding
    Contributor

    Thanks @docwilmot - I checked a few other popular classes with similar links and those links all appear as 404 whereas popular function calls load a list of all the references.

    The link structure is different so will need to figure out what the correct path should be and where it needs to be fixed. My initial thought without doing any digging is that it might be the API module (https://github.com/backdrop-contrib/api) that builds these pages.

  2. yorkshire-pudding commented on Mar 20, 2026

    @yorkshire-pudding
    Contributor

    Further to this, I think because the search for function calls is looking for a function name in a function call. As Backdrop functions will be unique this is reliable using pattern matching (which I think it does).

    But the same attempt on looking for 'Block', 'Color', and 'Comment' will struggle on pattern matching as those terms will appear in a lot of places.. Looking at api_find_references() I don't see any direct option under $type that would work

     * @param $type
     *   Type of reference. One of:
     *   - 'calls': $name is the name of a function, find function calls.
     *   - 'implementations': $name is the name of a hook, find implementations.
     *   - 'invokes': $name is the name of a hook, find invocations.
     *   - 'theme_invokes': $name is the name of a theme function or file, find
     *     theme calls.
     *   - 'theme_references': $name is the name of a theme function or file, find
     *     string references to the theme hook name.
     *   - 'references': $name is the name of a function, find string references.
     *   - 'overrides': $exclude_did is the ID of a method, find overriding methods.
     *   - 'constants': $name is the name of a constant, find uses.
     *   - 'uses': $name is the fully-namespaced name of a class, find files that
     *     have use declarations.
     *   - 'annotations': $exclude_did is the ID of an annotation class. Find
     *     classes using it as annotation.
     *   - 'yml_config': $name is a YML config file name, find string references
     *     to the file name without .yml.
     *   - 'yml_keys': $name is a YML config file name, and $exclude_did is its
     *     documentation ID. Find references to keys in this file.
     *   - 'services': $name is a class, find services that reference it.
     *   - 'use': $name is a service, find functions that reference its name.
     

    Perhaps it shouldn't try to show any but it shouldn't give a link that results in 404.

  3. added theissue type on Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions