Announcement

  •  » Extensions
  •  » Plugins that give errors with current PHP and Piwigo -- too common

#1 2020-10-12 05:19:21

dd-b
Member
Minneapolis, MN USA
2018-04-16
70

Plugins that give errors with current PHP and Piwigo -- too common

I've been noticing, trying things out and getting together the set of plugins I think I'm going to need for a site I'm working on, that rather a lot of the plugins I've tried give errors or warnings on pretty much every page when I install them. (MugShot, Private Share, and Evil Blog are the specifics I remember, but I believe I've gone past others without stopping). In several cases (especially MugShot) I've seen (heck, a few I posted) forum queries about such problems several years old, from multiple people, with a definite lack of useful solutions.

And none of these seem to have had any maintainer activity for years; I haven't gotten (so far) responses on forum posts or issues on GitHub (and I can't find all of them on GitHub) from the maintainer / authors of any of these (though I've had some helpful responses from other random users).  (Presumably the ones with maintainer activity don't have these problems!)

I'm not sure, but I think the issue, with me hitting so much trouble, is that, for the new site, I let my host install their newest PHP version (which is 7.4.3), and I'm running into changes in PHP that need code changes in the plugins to handle. Some of it is in handling null returns or empty array returns; the way the code is looking for the result now fails with warnings or errors, whereas I'm speculating that it completed quietly in earlier versions. I do know that another thing, the deprecation of the create_function() function (needs to be replaced with use of the function keyword to create inline lambda functions) is definitely something that's advancing through PHP versions.

So...the things I've identified so far are actually pretty easy to track down and fix, I've done it for my site in all three of the plugins mentioned, but not everybody can do that (I'm not a PHP expert by any means, but I'm retired after a 50-year career in software engineering and I've done some PHP and some Python and some Java and some C#, and lots of Perl, in addition to C and assembler and so forth).

But...how can these changes get integrated into the versions of the plugins people find through the Piwigo site? The maintainer of the current versions has, at least so far, not shown up, so updating the official copy is so far as I know impossible. I, or somebody, could fork each one, update it, and release a new version -- but taking me as an example, I'm not prepared to take on ongoing maintenance of all these plugins into the future, and do not in fact understand all of how they work well enough to be very good at it. I've managed to fix the current, rather simple, problems, and would happily make those fixes available, but I'm not really a good choice to "take over" anything. And I'm asking not just about these plugins; based on my sample  (which is small enough the results may be misleading), there are a LOT of plugins in the list that throw errors when correctly installed in current Piwigo on a current PHP installation, and it will get worse with future versions of PHP.  This is not a good situation!

I would strongly suggest the community, the project, needs some sort of way to handle this.  Right now people who try Piwigo and install a few simple plugins are finding it throwing errors in their faces, and many of them will just decide to move on (and then tell their friends that Piwigo doesn't seem to work). It looks amateurish, kind of embarrassing really.  We need to do better somehow!

I can do some work; I can probably figure out similarly simple issues on plugins beyond the ones I've already identified, for example, and make those fixes public for some process to use to update the plugin versions. (A quick fix is to at least flag the ones that don't work with current PHP software, get them out of the list people see. That's a partial, temporary, fix, but it avoids people getting pointed to useful-looking plugins that then fail on them.)


    Piwigo 2.10.2
    Operating system: Linux
    PHP: 7.4.3 (Show info) [2020-10-11 19:51:24]
    MySQL: 5.7.29-log [2020-10-11 19:51:24]
    Graphics Library: ImageMagick 6.9.7-4

Piwigo URL: http://gal02.dd-b.net/piwigo/

Offline

 

#2 2020-10-12 21:07:32

executive
Member
2017-08-16
1214

Re: Plugins that give errors with current PHP and Piwigo -- too common

I can think of several ways to handle it. For instance, you could publish a new plugin. Call dd-b's Mugshot. Credit the original author.

Offline

 

#3 2020-10-12 22:45:44

dd-b
Member
Minneapolis, MN USA
2018-04-16
70

Re: Plugins that give errors with current PHP and Piwigo -- too common

Yes, and for MugShot in particular (which is really important for my site) I'm moving towards doing just that (if the original author or somebody else doesn't step up). 

But for plugins I have no long-term commitment to I'm not sure that's that good a thing to do, and it will leave both copies in the catalog for people to have to figure out themselves, so it won't solve that much of the biggest problem (new users having bad experiences with plugins out of the catalog).

It does have the advantage of not requiring any sort of negotiation or official decision, though, which likely makes it faster.  Maybe that's the best we can do?

Offline

 

#4 2020-10-12 22:49:08

dd-b
Member
Minneapolis, MN USA
2018-04-16
70

Re: Plugins that give errors with current PHP and Piwigo -- too common

Oh, one thing that would help, but requires a change to the Piwigo web site, is to add for each extension information on which versions of PHP it's compatible with.  I'm not utterly sure that's the underlying problem here in all cases, but one of the cases is definitely a function moving towards deprecation in PHP.

Offline

 
  •  » Extensions
  •  » Plugins that give errors with current PHP and Piwigo -- too common

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact