jsonresume / theme-manager

Theme server for JSON Resume
MIT License
166 stars 31 forks source link

"Theme returned an error" #9

Closed JaredCubilla closed 10 years ago

JaredCubilla commented 10 years ago

Hey, I just developed a theme. It looks great on the theme registry and locally, but when I try it on the sample Thomas Davis resume, all that is on the page is "Theme returned an error".

Is it that my theme is outdated? Or perhaps, it simply takes time?

thomasdavis commented 10 years ago

Hey @JaredCubilla

Looks good! -> http://themes.jsonresume.org/theme/classy

I imagine, something is different about my resume.json that your theme is having trouble with.

thomasdavis commented 10 years ago

It's working for other people -> http://registry.jsonresume.org/rolandsharp?theme=classy

erming commented 10 years ago

I just added better error reporting: http://registry.jsonresume.org/thomasdavis?theme=classy

JaredCubilla commented 10 years ago

Awesome, thank you. It seems as if I need to update my index.js for null fields.

erming commented 10 years ago

@JaredCubilla

Here's a good way to solve these issues:

w.startDateYear = (w.startDate || "").substr(0,4);

It's using the || operator. If the left value is undefined or false the right value will be used instead.

JaredCubilla commented 10 years ago

Thank you @erming. I'll be replacing all instances of that error with now.