Picture of Christian Lee
Re: Custom theme - "Error generating preview, please contact Administrator."
by Christian Lee - Monday, 23 January 2017, 1:08 PM
 

I've been having the same issue. and after some research altering the bower.json worked! Now the theming fun begins!!

 

open the bower.json and rename and change the version numbers. 

 

I admit I didn't change much just the primary and secondary, but trying this worked

 

Chris

 

Picture of Milton Plotkin
Re: Custom theme - "Error generating preview, please contact Administrator."
by Milton Plotkin - Tuesday, 24 January 2017, 12:21 AM
 

Nah, that's not it. It's good practice to do it, but Adapt won't even let you upload until your version number is different (which just adds another step during the brute force method I used :/ ).

Picture of aaron quinn
Re: Custom theme - "Error generating preview, please contact Administrator."
by aaron quinn - Tuesday, 24 January 2017, 6:19 AM
 

like you, i made a duplicate of the vanilla theme - just so i could mess around with some things. i called it humbug. now that it's installed in the authoring tool, i make changes to the files here, while the course is still loaded in the AT:

 

then i simply go back to the authoring tool, click theme picker, click save (humbug is already selected), click preview. the course loads in a browser and i can see the changes i've made. if things work out, i save the same changes to my local version of the theme:

 

knowing i make mistakes, i got familiar with the theme's other location in the versions directory:

 

because when i break something while making changes, i can either replace the broken file with a fresh copy from my local version, or i can delete both of these theme folders and the entry in the mongodb database using robomongo:

 

if i delete the folders and db entry, i can re-upload a new local version of the theme, which is still numbered 0.0.1, and i won't wind up having a hundred unwanted versions of the theme. this process took me a while to figure out, but now that i've done it a good number of times, it's pretty easy and pretty quick. it can be done like this with plugins, too. maybe it can help shorten the time it takes for you to find the cause of your issue. i'd start with a working base version and replace one file at a time until i find the one that breaks the preview. then fix that file, rinse and repeat.

Picture of Milton Plotkin
Re: Custom theme - "Error generating preview, please contact Administrator."
by Milton Plotkin - Friday, 27 January 2017, 7:07 AM
 

Well, that's certainly better than my current method of doing things. Thank you! I'll debug my theme using it and see how I go. I do hope though that in future we can get more detailed error messages :/