I've tried switching from facetag to MugShot to take advantage of its extra features, but I get at the start of every page
Warning: count(): Parameter must be an array or an object that implements Countable in /home/johnbray/piwigo.fancy-test.com/plugins/MugShot/main.inc.php on line 163
Warning: Cannot modify header information - headers already sent by (output started at /home/johnbray/piwigo.fancy-test.com/plugins/MugShot/main.inc.php:163) in /home/johnbray/piwigo.fancy-test.com/include/page_header.php on line 101
(I have disabled facetag, in case they fight)
John
Offline
It would be helpful to have the forum default post template mention that this config information can be found at Tools/Maintenance, as its off-putting to find each value manually.
Piwigo 2.9.5
Operating system: Linux
PHP: 7.2.19 (Show info) [2019-08-05 23:32:37]
MySQL: 5.7.25-log [2019-08-05 23:32:37]
Graphics Library: ImageMagick 6.9.7-4
Offline
I have something very slightly different; in my case,
Warning: array_intersect(): Argument #1 is not an array in /home/dh_akhcfg/gal01.dd-b.net/piwigo/plugins/MugShot/main.inc.php on line 45 Warning: Cannot modify header information - headers already sent by (output started at /home/dh_akhcfg/gal01.dd-b.net/piwigo/plugins/MugShot/main.inc.php:45) in /home/dh_akhcfg/gal01.dd-b.net/piwigo/include/page_header.php on line 101
In this installation, face tag was never installed, I went straight to Mug Shot.
My environment:
Piwigo 2.9.5
Operating system: Linux
PHP: 7.0.33 (Show info) [2019-08-06 09:13:09]
MySQL: 5.7.25-log [2019-08-06 09:13:09]
Graphics Library: ImageMagick 6.9.7-4
Last edited by dd-b (2019-08-06 18:14:02)
Offline
And the warnings do go away again when I deactivate Mug Shot.
Offline
Mug shot doesn't seem to work even in a new, clean, install.
Warning: array_intersect(): Argument #1 is not an array in /home/dh_akhcfg/gal01.dd-b.net/plugins/MugShot/main.inc.php on line 45 Notice: Use of undefined constant PSHARE_ADMIN_BASE_URL - assumed 'PSHARE_ADMIN_BASE_URL' in /home/dh_akhcfg/gal01.dd-b.net/plugins/MugShot/admin.php on line 61 Warning: Cannot modify header information - headers already sent by (output started at /home/dh_akhcfg/gal01.dd-b.net/plugins/MugShot/main.inc.php:45) in /home/dh_akhcfg/gal01.dd-b.net/include/page_header.php on line 101
Offline
Face tag does seem to work, so I'm proceeding with that for the moment.
Offline
Any word of a fix for MugShot?
Offline
looks like you need to have piwigo private share plugin installed for the constant PSHARE_ADMIN_BASE_URL.
Offline
Im posting in this thread as well as the other I had been discussing mugshot plugin so this is easy to find.
You need to install Private Shares plugin. Create a group. Edit your user. Add them to the group. Now mugshot works. I was able to click the mugshot icon, select on the picture, set a tag, and save.
Offline
The "solution" I found was to fix the bug in the plugins/MugShot/main.inc.php file:
from:
/* * Conditional Logic for groups */ $current_user_groups = query_mugshot_groups(); if ($current_user_groups != 0) { $plugin_config = unserialize(conf_get_param(MUGSHOT_ID)); $group_list = $plugin_config['groups']; $intersect = array_intersect($group_list, $current_user_groups); }
to:
/* * Conditional Logic for groups */ $current_user_groups = query_mugshot_groups(); if (!empty($current_user_groups)) { if (count($current_user_groups) != 0) { $plugin_config = unserialize(conf_get_param(MUGSHOT_ID)); $group_list = $plugin_config['groups']; $intersect = array_intersect($group_list, $current_user_groups); } }
and to ensure that at least one group was specified for the MugShot plugin through Admin/Plugins/MugShot
Until a group is defined, errors will occur on some screens.
Also I'm getting errors on the plugin management page for the deprecated create_function() but I'm not a PHP expert so I'm not looking to fix everything - and the fix above makes MugShot work for me.
Piwigo 2.10.2
Operating system: Linux
PHP: 7.3.7 [2020-10-17 00:29:16]
MySQL: 5.5.57-MariaDB [2020-10-16 17:29:16]
Graphics Library: ImageMagick 6.9.4-8
Offline
we posted that fix in a different thread. Below is how to create that anonymous function.
$tab_codes = array_map(function ($a) { return $a['code']; }, $tabs);
here is the other thread.
https://piwigo.org/forum/viewtopic.php?id=30647&p=1
Offline
I've also found a smaller problem where the mugshot icon is displayed the wrong size in the wrong place when the *default* theme is Bootstrap but the current theme is something else (there's theme-specific layout code). Easy fix for me, for now, was to have just the one theme available :-). But I know what's going on underneath and will eventually take it on directly. There's a general issue with theme compatibility, which doesn't seem to have one root cause (except, perhaps, that themes have rather too much leeway in how they do things). But at least a few of the individual things can probably be fixed, and at least the themes it's incompatible with can be documented more accurately.
I tried a direct email to the mugshot author, but no response so far. I've pushed my fixes so far to my fork of mugshot on github, but haven't looked into registering my fork as an official piwigo extension yet (it's not really ready for that anyway).
Offline