Author and date not always appearing in custom CSL script

Dear all,

I am developing a custom .CSL style for a student-run popular science magazine at my university. I am getting caught up on the last thing I want to accomplish and am looking for advice. I would like to create a class specifically for YouTube videos cited as such:

[1] Youtube Video, Director, Year, URL

Within the bibliography tags, I call on author then begin a block where I specify information for specific document types:

<bibliography entry-spacing="0" second-field-align="flush">
    <layout>
      <text variable="citation-number" prefix="[" suffix="]"/>
      <text macro="author" suffix=", "/>
      <choose>
        <if type="bill book graphic legal_case legislation report song" match="any">
          <group delimiter=", ">
            <text variable="title" text-case="title"/>
            <text macro="year-date"/>
            <text macro="edition"/>
            <text macro="publisher"/>
          </group>
        </if>
        <else-if type="motion_picture" match="any">
          <group delimiter=", ">
            <text value="Youtube Video"/>
            <text macro="year-date"/>
            <text variable="URL"/>
          </group>
        </else-if>
...

The author and year appear for books, but not for documents of type video recording and film in the word document I generate a bibliography in. The issue is that the author and date fields aren’t appearing at all, and not a question of putting them where I desire. In other citation styles (e.g. APA7), the author and date appear correctly for the same Zotero entry.

I would appreciate any insight into my issue and I apologize for any oversight of simple issues as this is my first time working with the citation style language.

Thank you

There is no actual author field in Zotero for videos – it’s director and gets mapped to director in CSL. If you want something to behave as an author variable, use

author: Smith||Adam

in the Extra field in Zotero.