Errors in panel.log: Column not found: 1054 Unknown column

Created:

2017-03-09 15:48:42 UTC

Modified:

2017-08-08 13:44:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Errors in panel.log: Column not found: 1054 Unknown column

Applicable to:

  • Plesk Onyx for Linux

Symptoms

The following errors appear twice a day in the /var/log/plesk/panel.log file:

ERR [1] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'count(p.id) - count(if(p.is_visible, p.id, null))' in 'field list', query was: SELECT `sp`.`uuid`, count(p.id) AS `pagesCount`, max(sp.level) AS `maxPagesLevel`, `count(p.id) - count(if(p.is_visible, p`.`id, null))` AS `hiddenPagesCount`, count(if(concat(ifnull(p.login, ''), ifnull(p.password, '')) <> '', p.id, null)) AS `protectedPagesCount`
FROM (SELECT `s`.`uuid`, `p1`.`id`, (1) AS `level` FROM `site` AS `s`
INNER JOIN `site_page` AS `p0` ON p0.id = s.site_page_id
INNER JOIN `site_page` AS `p1` ON p1.parent_id = p0.id WHERE (s.site_page_id is not null) UNION SELECT `s`.`uuid`, `p2`.`id`, (2) AS `level` FROM `site` AS `s`
INNER JOIN `site_page` AS `p0` ON p0.id = s.site_page_id
INNER JOIN `site_page` AS `p1` ON p1.parent_id = p0.id
INNER JOIN `site_page` AS `p2` ON p2.parent_id = p1.id WHERE (s.site_page_id is not null) UNION SELECT `s`.`uuid`, `p3`.`id`, (3) AS `level` FROM `site` AS `s`
INNER JOIN `site_page` AS `p0` ON p0.id = s.site_page_id
INNER JOIN `site_page` AS `p1` ON p1.parent_id = p0.id
INNER JOIN `site_page` AS `p2` ON p2.parent_id = p1.id
INNER JOIN `site_page` AS `p3` ON p3.parent_id = p2.id WHERE (s.site_page_id is not null) ORDER BY `id` ASC, `uuid` ASC) AS `sp`
INNER JOIN `site_page` AS `p` ON p.id = sp.id GROUP BY `sp`.`uuid`

Cause

This is a bug with ID PPB-4505 . The fix is planned to be included in one of the next Plesk updates.

Resolution

Until the fix is available, the following workaround could be used:

  1. Upload and unzip the arhive with the patched file:

    # wget https://plesk.zendesk.com/hc/article_attachments/115002460369/patch.zip
    # unzip patch.zip
  2. Backup the /usr/local/sb/include/SB/Statistics/Report.php file and replace it with the patched one:

    # mv /usr/local/sb/include/SB/Statistics/Report.php{,.old}
    # mv Report.php /usr/local/sb/include/SB/Statistics/Report.php

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.