I wanted to hide the "Create @name" title on my node creation form (for example /node/add/article). I chose the style "Node form" for all nodes of the Article type, but the "Create article" still appears, even after clearing cache. The same goes for the edit node form. I can hide the title on "full content" though.

I'm not sure if this is related, but the log show this warning when I configure the module:

Location http://172.17.0.3/admin/config/content/exclude-node-title
Referrer http://172.17.0.3/admin/config/content/exclude-node-title
Message Warning: htmlspecialchars() expects parameter 1 to be string, object given in Drupal\Component\Utility\Html::escape() (line 407 of /var/www/html/core/lib/Drupal/Component/Utility/Html.php).
Severity Warning

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juliencarnot created an issue. See original summary.

juliencarnot’s picture

Just found an easier way to hide that title with Core: got to /admin/structure/block/manage and page title block, and restrict it's display all pages but the one I wanted it to be hidden on.

trumanru’s picture

Priority: Normal » Critical

Same problem in beta1

Warning: htmlspecialchars() expects parameter 1 to be string, object given в Drupal\Component\Utility\Html::escape() (строка 407 файла /home/{sitename}/public_html/core/lib/Drupal/Component/Utility/Html.php).

id.tarzanych’s picture

Status: Active » Needs review
FileSize
29.1 KB

juliencarnot, as far as I know this is not the goal of this module.
You are talking about page title, not node title.
Let's wait for fizk's thoughts about that.

Regarding htmlspecialcharts() error, it is fixed.

Also I've added new title pattern settings for exclude mode "all".
Now you can choose between custom title on node add page and automatically generated one.
Title pattern is based on tokens. If you enable Token (https://www.drupal.org/project/token) module then "Browse available tokens." link will be added to the settings form.

Unfortunately tokens like node id and node created are empty for new nodes, but you can enable Hook Post Action (https://www.drupal.org/node/2703453) to fix that inconvenience.

fizk’s picture

Status: Needs review » Fixed

@id.tarzanych Great work. We should try to keep this module as small as possible, and only for the purpose of excluding the node title. I think we should donate your code to the Automatic Entity Label module:

https://www.drupal.org/node/2659636

id.tarzanych’s picture

Got it. So I'll remove automatic title generation and commit only warning fix

id.tarzanych’s picture

  • id.tarzanych committed 7d9814e on 8.x-1.x
    Issue #2652860 by id.tarzanych: Title not hidden on add/node forms
    

Status: Fixed » Closed (fixed)

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