Piwigo table id=userList – Invalid JSON response

 

How to fix the user management facility piwigo .

Piwigo encountered some problems lately and not to add or change user account information.
A message popup appears at the opening of the account management page users.
The problem is that Mysql 8 uses a table named GROUPS.
One of these codes on the installation was appointed in the same way and poses conflict.
Here is the solution.

In your installation Piwigo:

/admin/user_list_backend.php

Edit the lines 204 (line 3 our example) and 213 (line 12 our example) below


SELECT
    user_id,
    GROUP_CONCAT(name ORDER BY name SEPARATOR ", ") AS groups
  FROM '.USER_GROUP_TABLE.'
    JOIN `'.GROUPS_TABLE.'` ON id = group_id
  WHERE user_id IN ('.implode(',', $user_ids).')
  GROUP BY user_id
;';
  $result = pwg_query($query);
  while ($row = pwg_db_fetch_assoc($result))
  {
    $groups_of_user[ $row['user_id'] ] = $row['groups'];
  }

and replace GROUPS by GRPS

SELECT
    user_id,
    GROUP_CONCAT(name ORDER BY name SEPARATOR ", ") AS grps
  FROM '.USER_GROUP_TABLE.'
    JOIN `'.GROUPS_TABLE.'` ON id = group_id
  WHERE user_id IN ('.implode(',', $user_ids).')
  GROUP BY user_id
;';
  $result = pwg_query($query);
  while ($row = pwg_db_fetch_assoc($result))
  {
    $groups_of_user[ $row['user_id'] ] = $row['grps'];
  }

Save your changes.

Empty your browser cache.

Reload the Web page piwigo and Admin -> Users -> Manage


[site_reviews_summary assigned_to=”post_id”]

Cancel
[site_reviews_form assign_to=”post_id”]
Rate this article

[site_reviews display=10 assigned_to=”post_id”]

Leave a Reply

Your email address will not be published. Required fields are marked *