So I have a custom content entity that has the typical attributes. Name, Author, Creation Date, ect. In the 'view' tab of this content entity, it displays said name, author, ect.
When I hover over the name or title, it will display that this particular area uses field.html.twig as its default base template. I created my own custom template that extends the base template, and wanted to edit it so it would look different.
However, doing so renders the field invisible. I tried copying the base template and pasting it into my custom twig template, however the field is still invisible. Only when I delete my custom template does it revert back to the original base template and display the field.
Here is where I am confused. My custom twig template is taking precedence, it shows that in the debug info, but I am copying the field.html.twig code into my custom code before I start editing. Why then is the fields disappearing off the page or not rendering considering that I am using the exact same coding?
Just for reference, this is a custom module template and not a themeing template I am working with.
Here is a picture of what the field looks like when its displaying properly, otherwise it vanishs.
My hook theme code for this particular field:
$theme['field__parent_task'] = [
'render element' => 'content',
'variables' => ['content' => NULL],
'file' => 'task.page.inc',
];
I don't know what to put for the key names in the theme array, so I just copy and pasted from another one that was already there.