Symlinks missing after moving project to host

Silverstripe Version:4.2.1

Still very new to Silverstripe. I’m halfway through doing all the tutorials, and I’ve finally decided to try uploading the project to my host via FTP. I’m getting a lot of 404s to CSS files and others because the symlinks in /public/resources/theme/simple are missing. They don’t get uploaded. This host doesn’t have SSH.

Do I copy the files over from /themes/simple? Does that change how I work on the project? Other options?

So after posting this I found out about composer vendor-expose copy. But if I run that on my local dev environment I would have to run that after every time I make a change to the files in /themes. That’s not an efficient way of working. So can I just ignore the files in /theme after running that command and edit them directly in /public/resources/theme?

When you run that command, the copy mode changes. But, you can change it back again for local development. If you look in the resources directory, you should see a file called ‘method’. In there, you should see a single word (probably ‘copy’ since you’ve run the command). If you change that back to ‘auto’ then the next vendor-expose will revert to symlinks (you might need to delete the previously generated files, depending on your system).

It’s not ideal, but that’s one of the problems with differing dev and production environments.

Alternatively, as you say, you can just change to editing the files in the public directory instead, and don’t put them in the themes at all. This is also a perfectly valid strategy

Another question related to this. After deleting the files in /themes/simple (not all of them, just the ones copied to the public folder) I get the following error. A little unexpected because the css files that are referenced in the page source are the ones in the public folder. What’s going on?

[Emergency] Uncaught InvalidArgumentException: The css file doesn’t exist. Please check if the file reset.css exists in any context or search for themedCSS references calling this file in your templates.

GET /

Line 1456 in ** vendor/silverstripe/framework/src/View/Requirements_Backend.php**

Does your theme.yml file include the '$public' option in the list?
What’s the path to the CSS file that it can’t find?

theme.yml does have $public in it.

Path to css file, when I leave the file in place so it works, is /resources/themes/simple/css/reset.css, just as I would expect. Code in the theme file is <% require themedCSS('reset') %>. All this are defaults from the simple theme.