TomodomoCo / total-slider

A WordPress plugin for creating, editing and removing ‘slides’ with text and images (for a homepage, for example).
GNU General Public License v2.0
7 stars 2 forks source link

When templates go missing, things break #40

Closed chrisvanpatten closed 12 years ago

chrisvanpatten commented 12 years ago

I moved a theme before changing it in the editor, and get this error as a consequence:

Warning: require(/home/tstest/dev.tstestsite.com/current/public/content/themes/twentytwelve-child/total-slider-templates/twentytwelve/twentytwelve.php): failed to open stream: No such file or directory in /home/tstest/dev.tstestsite.com/current/public/content/plugins/total-slider/includes/template_manager.php on line 513

Fatal error: require(): Failed opening required '/home/tstest/dev.tstestsite.com/current/public/content/themes/twentytwelve-child/total-slider-templates/twentytwelve/twentytwelve.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/tstest/dev.tstestsite.com/current/public/content/plugins/total-slider/includes/template_manager.php on line 513

We should ensure that if a theme suddenly disappears, a fallback is called into action (one of the default themes, probably).

PeterUpfold commented 12 years ago

Where is this happening? At edit-time? At display-time?

If I move or delete template files at edit-time, I get Total Slider’s Yellow Screen of Template Death, explaining which file (the PHP, if everything has disappeared) is missing.

At display-time, I get the “Total Slider: unable to load…” message.

The oddest thing is that this particular error message should have been covered by lines 504-510 — we check for the existence of the file just before we use it. There shouldn’t be a huge opportunity for this to happen.

chrisvanpatten commented 12 years ago

This is in the editor although I didn't check to see what happened in the front end. I imagine the same thing. I can check later.

chrisvanpatten commented 12 years ago

For some reason I'm getting the 201 error as well now.

In the interest of sanity, I've opted to blame my problem on Vagrant oddness, so I'm going to close this issue!