-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Themes not deleted #30
Comments
Hey, can you provide more info? We're using shopify CLI's development themes. These should not appear in the UI. If not, then that would be a shopify-cli bug. https://github.com/Shopify/lighthouse-ci-action/blob/main/entrypoint.sh#L89 Are you using an old version of the CI action by any chance? I think the old version used theme-kit and that might be the cause for issue. It's supposed to be this:
|
Hey, I'm having the same issue. Shopify has a limit of 100 development themes, and since the lighthouse CI action seems to create new themes without deleting them it hits the limit when the action is being run regularly.
The same problem can be found here in this Shopify cummunity forum post https://community.shopify.com/c/technical-q-a/shopify-theme-serve-throwing-error-quot-a-shop-may-only-have-100/td-p/1368567 My guess is the original poster is referring to this solution, manually deleting the development themes using themekit/ShopifyCLI rather than manually deleting them in the Shopify admin |
If you want to clean the developments themes : echo "Cleaning..."
while true; do
shopify theme delete -a -f <<<"\n"
done |
Update: Looks like upgrading shopify-cli from Experienced this too,
|
OK even after updating to |
Actually, if i manually delete one by one via interactive prompt |
Jumping in to revive this. I'm experiencing the same error:
I found that using the Shopify CLI
Many thanks to @0xtlt for posting the script to automate removing these, but I have to wonder how this is happening. @charlespwd , is there a setting or flag that I might have missed that could be causing this? It seems like very few reports of this but certainly enough to rule out one offs, which is also perplexing. |
I unfortunately ran into an infinite loop using the bash script in the thread which I'm sure was user error. Admittedly not being much of a bash guy, I got this from an AI assistant that worked like a charm and wanted to share in case someone else might find it helpful. This goes through all themes and removes any of them with the Here's a commented version: # Print a message indicating the start of the cleaning process
echo "Cleaning..."
# Get a list of all theme IDs with the role "[development]"
themes=$(shopify theme list | awk 'NR>1 && tolower($3) == "[development]" {print $2}')
# Loop through each theme ID
while read -r theme_id; do
# Print a message indicating the deletion of the theme with its ID
echo "Deleting theme with ID: $theme_id"
# Delete the theme using the shopify theme delete command
# -a: Delete all occurrences of the theme
# -f: Force delete without confirmation
# <<<"\n": Provide a newline character as input to confirm deletion
shopify theme delete --theme "$theme_id" -a -f <<<"\n"
done <<< "$themes"
# Print a message indicating the remaining themes
echo -e "\nRemaining themes:"
# List the remaining themes using the shopify theme list command
shopify theme list
And one without the comments that you can drop into your terminal and hit go: echo "Cleaning..."
themes=$(shopify theme list | awk 'NR>1 && tolower($3) == "[development]" {print $2}')
while read -r theme_id; do
echo "Deleting theme with ID: $theme_id"
shopify theme delete --theme "$theme_id" -a -f <<<"\n"
done <<< "$themes"
echo -e "\nRemaining themes:"
shopify theme list |
For anyone on Windows with this issue:
|
Hi,
I use this action for 1 month now for projects with my developers, and each week I need to delete manually each of the themes created by this action.
It only happens since we added this action to our workflows.
The text was updated successfully, but these errors were encountered: