Fatal Errors Must-fix to activate theme

Hey Everyone,

Please, does anyone have an idea about fixing these errors while installing the Headline theme? I downloaded the theme and I added the rss and sitemap to the theme, I wanted to upload the theme back and doom this error came up

Looks like something is deeply wrong. If you look inside the zip file you’re uploading, what do you see?

Sitemap is generated dynamically at /sitemap.xml and the RSS feed is available at /rss, no need to mod the theme file, what do you want Ghost to do?

Wow, Really, I thought I’ve to modify the theme, I wanted to set up my website on google news.

btw, I did followed Ghost tutorial to set the RSS and Sitemap, below is the code that I used for RSS and Sitemap:
This is the Sitemap/google news

<?xml version="1.0" encoding="UTF-8"?>
  <urlset
    xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
  >
    {{#get "posts" filter="published_at:>now-2d" limit="1000" include="tags"}}
      {{#foreach posts}}
        <url>
          <loc>{{url absolute="true"}}</loc>
          <news:news>
            <news:publication>
              <news:name>{{@site.title}}</news:name>
              <news:language>{{@site.locale}}</news:language>
            </news:publication>
            {{#has visibility="members"}}
            <news:access>Registration</news:access>
            {{/has}}
            {{#has visibility="paid"}}
            <news:access>Subscription</news:access>
            {{/has}}
            <news:publication_date>{{date published_at format="YYYY-MM-DDTHH:mm:ssZ"}}</news:publication_date>
            <news:title>{{title}}</news:title>
            <news:keywords>{{tags limit="5" autolink="false"}}</news:keywords>
          </news:news>
        </url>
      {{/foreach}}
    {{/get}}
  </urlset>

and below code is for the RSS

<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title><![CDATA[ {{@site.title}} ]]></title>
<description><![CDATA[ {{@site.description}} ]]></description>
<link>{{@site.url}}</link>
<image>
    <url>{{@site.url}}/favicon.png</url>
    <title>{{@site.title}}</title>
    <link>{{@site.url}}</link>
</image>
<lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
<atom:link href="{{@site.url}}" rel="self" type="application/rss+xml"/>
<ttl>60</ttl>

{{#get "posts" limit="all" include="authors,tags"}}
    {{#foreach posts}}
    <item>
        <title><![CDATA[ {{title}} ]]></title>
        <description><![CDATA[ {{excerpt}} ]]></description>
        <link>{{url absolute="true"}}</link>
        <guid isPermaLink="false">{{id}}</guid>
        <category><![CDATA[ {{primary_tag.name}} ]]></category>
        <dc:creator><![CDATA[ {{primary_author.name}} ]]></dc:creator>
        <pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>
        <media:content url="{{feature_image}}" medium="image"/>
        <content:encoded><![CDATA[ {{content}} ]]></content:encoded>
    </item>
    {{/foreach}}
{{/get}}

</channel>
</rss>

Yeah, I think something is wrong, but I didn’t touch any code in the index.hbs file or post.hbs file

this my index.hbs file:

{{!< default}}

<main class="gh-main gh-outer">
    <div class="gh-inner">

        <section class="gh-pagehead">
            <h1 class="gh-pagehead-title">Latest</h1>
        </section>

        <div class="gh-topic gh-topic-grid">
            <div class="gh-topic-content gh-feed">
                {{#match pagination.page 2}}
                    {{#get "posts" include="authors" limit=@config.posts_per_page as |recent|}}
                        {{#foreach recent}}
                            {{> "loop-grid"}}
                        {{/foreach}}
                    {{/get}}
                {{/match}}
                {{#foreach posts}}
                    {{> "loop-grid" has_large_post=false}}
                {{/foreach}}
            </div>
        </div>

    </div>
</main>

and also the post.hbs

{{!< default}}

<main class="gh-main">
    {{#post}}
        <article class="gh-article {{post_class}}">

            <header class="gh-article-header gh-canvas">
                {{#if primary_tag}}
                    <a class="gh-article-tag" href="{{primary_tag.url}}">{{primary_tag.name}}</a>
                {{/if}}

                <h1 class="gh-article-title">{{title}}</h1>

                {{> "post-meta"}}

                {{#if custom_excerpt}}
                    <p class="gh-article-excerpt">{{custom_excerpt}}</p>
                {{/if}}

                {{> "feature-image"}}
            </header>

            <section class="gh-content gh-canvas">
                {{content}}
            </section>

        </article>
    {{/post}}

    {{> "related-posts"}}

    {{#post}}
        {{> "comments"}}
    {{/post}}
</main>

I don’t know why I am having those errors

I’d guess that your zip file is corrupted or you have too deep if nesting or something. What happens when you open the zip file? What’s inside?

I haven’t been able to to figure out the error, there no way I can share the zip file with you, I could have share it with you.

I want to update the version of ghost that I’m using

Your problem is consistent with a corrupted zip file, or zipping the wrong folder/file.

@mheland @Cathy_Sarisky Thank you so much for your time, it finally work out, I deleted the zip file and restart my computer and rezip the theme(file).
and try to upload the file again, it was successfully this time. :star_struck:
Thank you all :pray:

1 Like