[SOLVED] Thumbnail problem crashes entire site

tommcgee

Joined: 2011-05-18
Posts: 8
Posted: Fri, 2013-05-17 20:01

http://tltc.shu.edu/gallery2/

This happened when an art director attempted to assign a thumbnail image to a gallery.

I've uninstalled/reinstalled thumbnail manager; removed some offending g_ids entirely, deleted caches several times. Nothing helps.

I can get into the admin back-end but of course that's no help in tracking down or managing the individual items that are corrupted.

What a train wreck.

Error (ERROR_MISSING_VALUE) : Unknown entity type: ThumbnailImage
// this is kind of odd because there's nothing in the g2_entity table with that g_entityType

It's worked just fine for several years before this. How can a single corrupt line bring an entire app to its knees?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-05-17 20:58

the thumbnail module creates the ThumbnailImage entityType make sure it is installed and active.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sun, 2013-05-19 05:33
tommcgee wrote:
I've ... removed some offending g_ids entirely

A few things to note.

1. Lines of code do not simply go bad or corrupted like fruits on a table. If they work just fine for several years, they will continue to work just fine forever unless somebody changes something.

2. Mucking about in the database without a full understanding of the implications of your actions, leads to train wrecks.

--
dakanji.com

 
tommcgee

Joined: 2011-05-18
Posts: 8
Posted: Mon, 2013-05-20 13:20

@Dayo, none of the code has changed so it probably isn't that. It's more likely a corrupted image file or a mangled database entry.

@supersidr, I don't see a "thumbnail" module in this installation (or in another installation for a different project that still works). Do you mean "thumbnail manager," or is it someplace other than in the plugins screen?

 
tommcgee

Joined: 2011-05-18
Posts: 8
Posted: Mon, 2013-05-20 14:55

Meanwhile, I managed to restore it from a database backup from before the crash.

 
tommcgee

Joined: 2011-05-18
Posts: 8
Posted: Mon, 2013-10-14 18:59

I made the same stupid mistake this morning. After restoring from backup, I found entries in the database tables that didn't match the file system. Specifically, the parentSequence column in the ItemAttributesMap table showed the paths from before I tried moving the files. The files themselves were moved, but none of the path information (parents etc.) in the database were correct.

Somehow the gallery kept working with the files in the wrong place, which was odd.

I did a cp -r of all the files and subdirectories back to their original location and createed a new empty gallery where I wanted it, and could successfully move items over using the GUI again.

As for a custom thumbnail for the gallery, I ignored the thumbnail module's features and used the "make highlight" feature instead.

Some action you take from the web interface should not be able to disable an entire section of the gallery, IMO. It seems as though there was a multi-step operation where files were moved in the filesystem and then the updates were run on the database -- but the updates failed and the filesystem stayed altered. My guess, at least