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
Comment | File | Size | Author |
---|---|---|---|
#7 | 2652860-exclude_node_title-warning_fix-7.patch | 19.49 KB | id.tarzanych |
Comments
Comment #2
juliencarnot CreditAttribution: juliencarnot commentedJust 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.
Comment #3
trumanru CreditAttribution: trumanru commentedSame problem in beta1
Comment #4
id.tarzanych CreditAttribution: id.tarzanych as a volunteer and at Internetdevels commentedjuliencarnot, 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.
Comment #5
fizk CreditAttribution: fizk commented@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
Comment #6
id.tarzanych CreditAttribution: id.tarzanych as a volunteer and at Internetdevels commentedGot it. So I'll remove automatic title generation and commit only warning fix
Comment #7
id.tarzanych CreditAttribution: id.tarzanych as a volunteer and at Internetdevels commented