A client is using Craft 2, which someone else set-up for them. We're not trying to change their set-up but would like to offer them a quick and easy way to archive their annual event.

I just assumed I could use anything to create a static archive, place it in an annual folder (2019, 2020, etc), then just point people to the files. The problem is is that we keep receiving Craft errors. When the files are on my computer either in using file:/// or localhost the archive works fine.

Placing the folder inside the craft folder or its subfolder' templates just generates an "An exception has been thrown during the rendering of a template" error". And placing it out of the Craft folder is forbidden (I figure they have the domain pointing directly to the CraftCMS folder rather than a public_html.

I'm just not certain how or if CraftCMS will just allow you to place self-contained static files o a server and allow them to be served when they are pointed to. Because it seems like no. Does this require a .htaccess change or did someone just really restrict what can be done with this set-up?

I should mention, my goal with the static archive, was so that they wouldn't have to change code, etc. The system wasn't designed to allow them to archive events. Technically, they are overwriting events each year, but a number of people are asking for historical data.

  • It should work when you place your files into the template folder. Craft will check if it needs to do anything to it for rendering and if not, it will just let the Apache/Nginx server serve its bare content. Maybe the set-up forbids this? – Tom De Smet Dec 13 '19 at 9:22
  • That's what I was guessing, but that definitely didn't work. They could be forbidding it. I'll have to check their set-up. Would you forbid it in a setting via the control panel or via config files? Just to give me a starting point. – nonprofit_tech Dec 17 '19 at 18:30
  • Honestly, I wouldn't know how to turn this off. – Tom De Smet Dec 18 '19 at 8:52
  • No, problem. You've given me a starting point. – nonprofit_tech Dec 19 '19 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.