drush command for custom content type

Created on 19 April 2023, about 1 year ago

Problem/Motivation

Short question about using the command "drush entity-hierarchy-rebuild-tree field_parents node".

I have a custom content type "statute", (edited at /admin/structure/types/manage/statute) but when I write "drush entity-hierarchy-rebuild-tree field_parents statute" it says "content type not found". I have tried various things, but to no avail. What might the content type be called in drush?

I have Drupal 10, with Drush 11.5.

I need to rebuild the tree because the hierarchy search in views works with some nodes and not with others. If I use the simple "entities that have me as a parent" they all work. But replicating that with your search with a depth of 1 works on some nodes and not others.

πŸ’¬ Support request
Status

Fixed

Version

3.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States scottop

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

Comments & Activities

  • Issue created by @scottop
  • πŸ‡ΊπŸ‡ΈUnited States scottop
    [vps14520]$ drush field-info node statute
    +----------------+----------+----------------------------+-------------+
    | Field name     | Required | Field type                 | Cardinality |
    +----------------+----------+----------------------------+-------------+
    | body           |          | text_with_summary          | 1           |
    | feeds_item     |          | feeds_item                 | -1          |
    | field_dates    |          | entity_reference           | -1          |
    | field_id       |          | string                     | 1           |
    | field_parent   |          | entity_reference_hierarchy | 1           |
    | field_subtitle |          | string                     | 1           |
    | field_type     | βœ”        | entity_reference           | 1           |
    +----------------+----------+----------------------------+-------------+
    [vps14520]$ drush entity-hierarchy-rebuild-tree field_parent node statute
    
                                                                                                                        
      Too many arguments to "entity-hierarchy-rebuild-tree" command, expected arguments "field_name" "entity_type_id".  
                                                                                                                        
    
    [vps14520]$ drush entity-hierarchy-rebuild-tree field_parent statute
    
    In EntityTypeManager.php line 139:
                                                 
      The "statute" entity type does not exist.  
                                                 
    
  • Status changed to Fixed about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Use node, not status

    One is the entity type Id the other is a bundle

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

    That's it, thank you!

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

Production build 0.69.0 2024