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"?>
    {{#get "posts" filter="published_at:>now-2d" limit="1000" include="tags"}}
      {{#foreach posts}}
          <loc>{{url absolute="true"}}</loc>
            {{#has visibility="members"}}
            {{#has visibility="paid"}}
            <news:publication_date>{{date published_at format="YYYY-MM-DDTHH:mm:ssZ"}}</news:publication_date>
            <news:keywords>{{tags limit="5" autolink="false"}}</news:keywords>

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">
<title><![CDATA[ {{@site.title}} ]]></title>
<description><![CDATA[ {{@site.description}} ]]></description>
<lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
<atom:link href="{{@site.url}}" rel="self" type="application/rss+xml"/>

{{#get "posts" limit="all" include="authors,tags"}}
    {{#foreach posts}}
        <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>


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>

        <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 posts}}
                    {{> "loop-grid" has_large_post=false}}


and also the post.hbs

{{!< default}}

<main class="gh-main">
        <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>

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

                {{> "post-meta"}}

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

                {{> "feature-image"}}

            <section class="gh-content gh-canvas">


    {{> "related-posts"}}

        {{> "comments"}}

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