"User Defined Nodes" not working

Created on 1 July 2025, about 1 month ago

I've used this module in the past, with Drupal 7, 8 and 9. Working on a Drupal 11 project, I have a page title that is showing up, that I don't want. This is a 'Basic Page', containing only a line of text. In past versions, I recall there being a checkbox in the... I want to say it was under the "Authoring Information" tab, of the edit screen, that I would check to activate the module and remove the title for that particular node. But I don't find such a checkbox now.

I've gone into the Configuration screen, as the project's profile page instructs, and as I don't want to eliminate titles everywhere, I chose "User Defined Nodes..." under "Basic Pages". and selected "Full Content" and "Node Form" (though I have also tried with all of the options selected). I save these settings, and go back to the node's setting under "Content". I've looked everywhere on this page, and I don't see anything anywhere referring to eliminating the node title. Checking the node in question, the undesired title continues to show. I have tested, indicating "All nodes" which works. The title goes away. And I do see on the module's configuration page, where it says at the bottom:

"User defined nodes. does not, by default, hide any Node title. However, it provides users with the permission to exclude node title a checkbox on the node edit form that allows them to exclude node titles, from the View Modes selected in this form, on a node-by-node basis."

but what I do not see is the checkbox on the node.

πŸ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States BEGRAFX Laconia, New Hampshire

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

Comments & Activities

  • Issue created by @BEGRAFX
  • πŸ‡΅πŸ‡ΉPortugal jrochate

    There is a change in Drupal 11.2 on the namespace of the Form.

    I'm sending a patch that make is work again on Drupal 11.2.

    I'm not sending a MR because the maintainers need to make a decision on how to make it available.

  • πŸ‡΅πŸ‡±Poland bronismateusz

    Thanks, it works great with D 11.2.

  • πŸ‡©πŸ‡°Denmark uv516 Denmark

    I had the same issue with the module "save_edit".
    Look at https://www.drupal.org/project/save_edit/issues/3532059 πŸ› Save_edit not workin in Drupal 11 Active and https://www.drupal.org/project/save_edit/issues/3535599 β†’

    In exclude_node_title the problem can be solved in this way:

    use Drupal\Core\Block\BlockPluginInterface;
    use Drupal\Core\Routing\RouteMatchInterface;
    use Drupal\Core\Form\FormStateInterface;
    use Drupal\node\NodeInterface;
    - use Drupal\node\NodeForm;
    
    ...
    (Line 172++):
    function exclude_node_title_form_alter(&$form, FormStateInterface $form_state, $form_id) {
      $form_object = $form_state->getFormObject();
      /** @var \Drupal\exclude_node_title\ExcludeNodeTitleManagerInterface $exclude_manager */
      $exclude_manager = \Drupal::service('exclude_node_title.manager');
    
    -  if ($form_object instanceof NodeForm) {
    +  if ($form_object instanceof \Drupal\node\NodeForm || $form_object instanceof \Drupal\node\Form\NodeForm) {
        /** @var \Drupal\node\NodeInterface $node */
        $node = $form_object->getEntity();
        $node_type = $node->getType();
    

    My experience with patching is unfortunately quite negative. Maybe someone else will make a patch?

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

    Appears to be a dup of πŸ› Exclude node title checkbox does not appear on Drupal 11 Active

  • πŸ‡©πŸ‡°Denmark uv516 Denmark

    This post can not be a dualisme of a later post. It must be te later post which is the duplicate...

Production build 0.71.5 2024