Discussions
Force theme assets to deploy
I'm not sure if these questions are read but my love for the CMS part of LocomotiveCMS is being dulled by the obscurity and obtuseness of the Wagon deploy process.
Current issue is that unless a file is physically edited it appears to be assumed to be the same. If I drop a new file that has the same name as a previous one it is ignored(skipped). Obviously if it is an image file or similar this becomes problematic.
I am trying to force all assets to be redeployed to overwrite the existing ones to get everything in sync. No matter what I have tried ( even deleting all the deployed assets ) every time I run deploy to local engine it skips all the ThemeAssets but appears to push everything else. I suspect some caching issue or failure to reload the current assets or similar may be to blame.
Anyway:
I worked my way to the file push_theme_assets_command.rb and this appears to be where it is checked.
and commenting out this line 26 gets me a bit further.
raise SkipPersistingException.new if same?(decorated_entity, _entity)
To get round this I commented it out and that gets me a bit further. Perhaps a -f flag on the deploy command could be used to force all assets to be replaced?
hi Colin,
That looks like a bug to me.
Normal behaviour: when deploying a site, the theme assets are only pushed if they don't have the same checksum than the remote versions.
So, from what you say, if you replace a file by another one with the file name but different, it won't be pushed, right?
Note: to delete the theme assets on Locomotive Engine (not Wagon), don't delete them directly in S3 or in your FS, use the wagon delete
command.
hi Colin,
That looks like a bug to me.
Normal behaviour: when deploying a site, the theme assets are only pushed if they don't have the same checksum than the remote versions.
So, from what you say, if you replace a file by another one with the file name but different, it won't be pushed, right?
Note: to delete the theme assets on Locomotive Engine (not Wagon), don't delete them directly in S3 or in your FS, use the wagon delete
command.
Busy tonight?
I have spent quite a long time on this tonight so I will check it when I am fresher tomorrow. I encountered it when I was trying to drop in a bootstrap theme that I downloaded and it was always skipped.
It does seem to be a problem with the checksum comparison. However, I wasn't aware of the 'wagon delete' command so I will try that and see if that improves my process.
Thanks again
Colin
haha, been too busy those last days so I couldn't answer all the questions here. Time to catch up :-)
Let me know about your issue.
hi Colin, I finally found out about your initial bug. So, it has been fixed in github. Locomotive.works, our hosting solution has been updated as well. The next official release of Engine would have it.
thanks!
Cool. Was it a checksum issue?
For future reference where would you prefer bugs to be reported? On Github?
ο»Ώ