#50by50 #23 Part 3 – Fix my digital photo gallery – Test Piwigo
In my previous two posts, I talked about the history of my approach to having an online photo gallery with videos, ranging from self-hosted with embedded videos to a full commercial account with SmugMug, and the desire to repatriate the files back to my main website. WordPress didn’t have much in the way of working options, and so I moved on to Piwigo again.
Testing Piwigo – the configuration
Piwigo is a standalone app that Softaculous installs pretty well from scratch on my host, no muss, no fuss. And I’ve used it before with a fair amount of success — I had it up and running with 3000+ photos and videos at one point, so it must have met my needs. I installed it on my site again, chose all the basic plugins that I used about three years ago, tweaked the basics, and uploaded three photos and a video as test subjects.
The video played perfectly, right out of the gate. The photos weren’t anything to write home about, but I was just testing it. Next up would be my theme selection, and then I would go back and do a full tweak of all the plugins, menus and settings. I tried one or two themes, all good. I was pretty sure where I would end up, but it’s been three years, maybe something else would catch my eye in the tweaks since then.
I tried a theme called BootStrap, decided it was too dark, went back to a clear theme, and my site CRASHED. It would NOT load the main page anymore. I could get into the administration pages on the back-end, but it would NOT show me the front page. It was throwing errors on my theme. But I was using the default theme I had used earlier…could the other theme have corrupted my install? How? That’s weird.
So I did what every good administrator does. I deactivated all my plugins, reinstalled the themes, and checked the main page. Voila, no problem, it loads. Problem solved, right?
Nope, I reactivated a couple of plugins, and it crashed again. A plugin called Admin.Tools was causing the conflict and was crashing the site. The plugin has been around for ages, tested and used by thousands, always worked, and now it was CONFLICTING? It worked fine fifteen minutes before. I started searching online to see if anyone else had a problem with Admin.Tools and found someone who did. It was slightly different from mine, but they were mostly getting the same error. Activate Admin.Tools, and the template was missing. But it couldn’t be missing, it looked like a conflict. Hmm. Okay, I deactivated it, tested a few other things.
And suddenly my VIDEOS WOULDN’T LOAD. I don’t mean they wouldn’t play, I mean I couldn’t even LOAD the PAGE they were on where I would press play. WTF? It was LITERALLY working just TEN MINUTES BEFORE! GRRRRRR. I searched online for the new error message, and while lots of people seemed to get the same error occasionally, their situation was very different from mine.
I posted the full details on the Piwigo forum and hoped for the best. Maybe someone would know why, and more importantly, be able to tell me if completely blowing it off the system and reinstalling it was worth a shot.
Piwigo problem with Admin.Tools
I was getting the following error in Piwigo:
Warning: include(/themeconf.inc.php): failed to open stream: No such file or directory in /home/polywogg/public_html/pandafamily/include/template.class.php on line 1156
Warning: include(): Failed opening ‘/themeconf.inc.php’ for inclusion (include_path=’.:/opt/alt/php70/usr/share/pear’) in /home/polywogg/public_html/pandafamily/include/template.class.php on line 1156
Fatal error: Uncaught –> Smarty: Unable to load template file ‘menubar.tpl’ <– thrown in /home/polywogg/public_html/pandafamily/include/smarty/libs/sysplugins/smarty_internal_template.php on line 139
On the forum, a local genius named Flop25 who has helped i.e. saved me in the past and often goes above and beyond the call of duty suggested that instead of doing a completely new install, I could just re-upload some key files over top of the existing install, a little easier. He also suggested that it looked like a problem finding the template, perhaps due to a caching problem.
Which got me thinking. A caching problem? Missing template? It wasn’t a conflict? Hmm…wait a minute. Admin.Tools lets you switch between themes easily on the front end so you can see what the various themes look like live. But it has a sticky setting. Just because I change something on the backend, the Admin.Tools remembers what the last theme chosen was on the front end. And shows you that. Which in this case would have been something like BootStrap. Which I tried, didn’t like, deactivated, and then, DELETED. Except Admin.Tools was keeping the sticky setting. It was trying to load the BootStrap template even though the backend had changed to the default CLEAR template. And since I had deleted the one it was TRYING to use, it was just giving an error message. Which also meant I couldn’t see the page to switch to a different theme.
I tried the page without Bootstrap but with Admin.Tools installed, and it crashed. I reinstalled Bootstrap, went to the main page, and this time it worked no problem. I switched the theme to CLEAR, went back to theme management, deactivated Bootstrap, and deleted it. Went back to the main page, it still worked no problem.
If Flop25 hadn’t mentioned the caching issue i.e. it was looking for something old, not something that was now missing / conflicted / corrupted, I never would have though of it. I just needed to reinstall the missing theme, switch the semi-sticky option in Admin.Tools to something else, and then it was all good.
Piwigo problem with Video.JS
My second problem was a bit more elusive. I said I had video working previously, now it wasn’t. I wondered if perhaps my host had told me I could use video but then their internal systems spotted it and shut it down. Maybe I really couldn’t use video after all and they had changed the configuration. But I tried it in WordPress and it still worked. It just wasn’t working in Piwigo. But I had already solved the theme problem, and so it wasn’t that. Weird.
Basically, here’s the error message I was receiving:
Mediainfo error reading file.
Is MediaInfo install? Is MediaInfo in path?
Is the video accessible & readable, Try to run the command manually.
I read through a bunch of stuff online, and it seemed like somehow Piwigo couldn’t see MediaInfo anymore (a server tool that reads the info on the video file). But it had worked previously, so WTF? I hadn’t changed ANYTHING that would affect that, just themes. And while I thought the theme had corrupted something, it actually hadn’t. It was just a sticky cache.
I didn’t know what the exact problem was, but in the meantime, I could work around it. I was thinking I might try Flop25’s partial reinstallation at some point, so I went onward in my testing to try all the available themes. There are 47 in total available, and while I wasn’t hopeful for any of the dark ones (I prefer lighter backgrounds), some of them have a lighter option hidden in them. So I was working my way through them, one by one.
Basically this means that I would load the new theme, look at the main page, an album page, and a photo page, and see what everything looked like for layout and colours, menu links, etc. I was about 75% of the way through, and something weird happened. I went to the photo page that had the one video on it, and it loaded. No problem at all. It was suddenly working again. But I hadn’t changed anything except the themes.
So of course I initially thought it must be a theme issue. And I had found one that worked. Cool!
So I tried another that was in my “likely for consideration” file that I had already tried, and the video worked in it too. Wait. It didn’t work a minute ago in there, and now it does. That’s NOT a theme issue, but theme is the only thing I changed, wasn’t it? Well, not exactly.
Because when I was on the pages with individual photos, and checking layouts, I had toggled the “INFO” button. For photos, it shows you EXIF data about your photo. I’m not entirely sure I want that data always showing, but having an option is good. Except when I had it toggled ON and I went to the video, the page crashed. When I toggled it OFF, and I went to the video, it worked.
Son of a biscuit.
Apparently I need to learn how to read better. The error message was literally telling me that it couldn’t read the MEDIAINFO — not the media itself, but the info about the media. Basically its metadata. But everyone online was talking about it being unable to read the file when it got that error OR that the MediaInfo app wasn’t loading. But that’s not accurate. It can find and read the file, it just can’t parse the metadata for some reason.
Which made me think, okay, maybe the reason is irrelevant, all I have to do is choose between EXIF for all and no video, or no EXIF but my video would work. Unless…wait a second…didn’t I see a second plugin for EXIF data, maybe it can help. No, that’s to GET the data. I need to block it.
Oh look. In the VIDEO.JS config page, there is an option that says:
METADATA
Show file metadata : Yes No (METADATA_DESC)
I had it set to YES. Maybe that was the default, maybe I set it there because I thought it would be useful. But I turned it off, and now, it doesn’t matter what the page toggle says or not. The page doesn’t try to read the media info / meta data, so it doesn’t throw an error message, and it doesn’t crash. The video files are working again. Yay! And the photos can still have ExIf info if I want.
Which means after some slight testing of my plugins and setups, I’m ready to find a working Piwigo theme. Onward, digital soldier!