Forked theme not working when deployed

Hi there,

I’ve forked a theme on Git and made some changes to it, this all works fine and looks great when I’m running it locally. However, when I go to deploy to Netlify, the theme is the original one from the original repo and not my forked one.

I made sure when I was swapping themes to delete the submodules correctly, and I have tried with other default themes and they always get applied correctly when deploying to Netlify, it’s just my forked one that defaults to the parent repo.

Any help appreciated.

Are you really sure :wink: Git tends to have cached copies laying around everywhere. If the .gitmodules file references the correct (forked) repository then clone a new directory from your repo (the site repo) and check out submodules again. Then send to Netlify and see what happens.

Post the content of your .gitmodules here if you are unsure. It should contain only your forked theme repo, not the original one.

If you got the right editor search for the URL of the original theme in your local copy. If it’s deleted properly you will not find the URL.

Post the output of the Netlify deploy log. Post error messages. If not, this is a blackbox for everyone :slight_smile:

What do you mean “clone a new directory from your repo” and then send it to Netlify. Netlify just automatically pulls from my Git site repo.

Anyway here’s the contents of my .gitmodules

[submodule "themes/matt"]
	path = themes/matt
	url = https://github.com/mapierce/hugo-theme-sam

I removed the whole site from Netlify and setup a new one, and still the same issue. Here’s the deploy log:

3:07:28 PM: Build ready to start
3:07:32 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
3:07:32 PM: build-image tag: v3.3.2
3:07:32 PM: buildbot version: a2bab682ae0761baa4d123ebd00c57be933655dc
3:07:32 PM: Fetching cached dependencies
3:07:33 PM: Failed to fetch cache, continuing with build
3:07:33 PM: Starting to prepare the repo for build
3:07:33 PM: No cached dependencies found. Cloning fresh repo
3:07:33 PM: git clone https://github.com/mapierce/Look-what-Matt-made
3:07:34 PM: Preparing Git Reference refs/heads/master
3:07:35 PM: Starting build script
3:07:35 PM: Installing dependencies
3:07:40 PM: Downloading and installing node v10.17.0...
3:07:40 PM: Downloading https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-x64.tar.xz...
3:07:40 PM:   0.0%
3:07:40 PM: 0.3
3:07:40 PM: %
3:07:41 PM:   0.4%
3:07:42 PM:   0.8%
3:07:43 PM:   0.8%
3:07:43 PM:   1
3:07:43 PM: .0%
3:07:43 PM: 1.2%
.
.
.
3:09:21 PM: ###############   99.8%
3:09:22 PM: 
#######################################################################
3:09:22 PM: 100.0%
3:09:22 PM: 
####################################################################
3:09:22 PM: #### 100.0%
3:09:22 PM: Computing checksum with sha256sum
3:09:22 PM: Checksums matched!
3:09:25 PM: Now using node v10.17.0 (npm v6.11.3)
3:09:26 PM: Attempting ruby version 2.6.2, read from environment
3:09:27 PM: Using ruby version 2.6.2
3:09:28 PM: Using PHP version 5.6
3:09:28 PM: Started restoring cached go cache
3:09:28 PM: Finished restoring cached go cache
3:09:28 PM: unset GOOS;
3:09:28 PM: unset GOARCH;
3:09:28 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
3:09:28 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
3:09:28 PM: go version >&2;
3:09:28 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
3:09:28 PM: go version go1.12 linux/amd64
3:09:28 PM: Installing missing commands
3:09:28 PM: Verify run directory
3:09:28 PM: Executing user command: hugo
3:09:28 PM: Building sites …
3:09:28 PM:                   | EN
3:09:28 PM: +------------------+----+
3:09:28 PM:   Pages            | 17
3:09:28 PM:   Paginator pages  |  0
3:09:28 PM:   Non-page files   |  0
3:09:28 PM:   Static files     |  3
3:09:28 PM:   Processed images |  0
3:09:28 PM:   Aliases          |  0
3:09:28 PM:   Sitemaps         |  1
3:09:28 PM:   Cleaned          |  0
3:09:28 PM: Total in 48 ms
3:09:28 PM: Skipping functions preparation step: no functions directory set
3:09:28 PM: Caching artifacts
3:09:28 PM: Started saving pip cache
3:09:28 PM: Finished saving pip cache
3:09:28 PM: Started saving emacs cask dependencies
3:09:28 PM: Finished saving emacs cask dependencies
3:09:28 PM: Started saving maven dependencies
3:09:28 PM: Finished saving maven dependencies
3:09:28 PM: Started saving boot dependencies
3:09:28 PM: Finished saving boot dependencies
3:09:28 PM: Started saving go dependencies
3:09:28 PM: Finished saving go dependencies
3:09:31 PM: Build script success
3:09:31 PM: Starting to deploy site from 'public'
3:09:31 PM: Creating deploy tree 
3:09:31 PM: 18 new files to upload
3:09:31 PM: 0 new functions to upload
3:09:32 PM: Starting post processing
3:09:33 PM: Post processing done
3:09:33 PM: Site is live
3:09:50 PM: Finished processing build request in 2m17.675594468s

By the way, Netlify caches everything. Try the dropdown in the top of the deploy and tell it to clear the cache and retry the deploy. You can do that from your last deploy.

What I see though is that you are deploying “Look-what-Matt-made” without cache… what’s the .gitmodules in there looking like?

Your log does not look like it’s loading submodules… Very weird. There is no submodule activity going on.

What changes did you make?

My experience is that CSS changes get cached by your browser so you have to ctrl+f5(PC) or clear cache to view the changes.

html changes are fine.

The .gitmodules is in the comment above the log output there. I’ve nuked the whole site on Netlify and re-created it, so caching shouldn’t be an issue.

Hi,

Do you have your actual site repo somewhere we can look at?