Skip to main content

Hi,

we’ve upgrade Centreon from 23.04 to 24.10. We discover the the Dashboard system and is seems to be great.

We encounter a problem to Create a playlist. it’s just didn’t work when i clic on Save… nothing hapen..

Hi ​@SavCent,

Could you please check PHP logs to see if there is any error logged when you try to save?

Logs are located here

/var/log/centreon/centreon-web.log
/var/log/php-fpm/centreon-error.log

Thanks.

Regards

Adrien


Hi ​@Adrien Morais-Mestre 

when i load the Playlists page i’ve only one new line in /var/log/centreon/centreon-web.log :

 

<2024-12-05T10:13:35+0100] +ERROR] ECentreonItEdition\Dashboard\Playlist\Application\UseCase\ListPlaylists\ListPlaylists:0]: Error while listing playlists {"trace":"PDOException: SQLSTATEQ42S22]: Column not found: 1054 Unknown column 'dpl.has_public_access' in 'SELECT' in /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Infrastructure/Repository/DbReadPlaylistRepository.php:0\nStack trace:\n#0 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Infrastructure/Repository/DbReadPlaylistRepository.php(0): PDOStatement->execute()\n#1 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Application/UseCase/ListPlaylists/ListPlaylists.php(0): CentreonItEdition\\Dashboard\\Playlist\\Infrastructure\\Repository\\DbReadPlaylistRepository->findByRequestParameters()\n#2 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Application/UseCase/ListPlaylists/ListPlaylists.php(0): CentreonItEdition\\Dashboard\\Playlist\\Application\\UseCase\\ListPlaylists\\ListPlaylists->findAsAdmin()\n#3 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Infrastructure/API/ListPlaylists/ListPlaylistsController.php(0): CentreonItEdition\\Dashboard\\Playlist\\Application\\UseCase\\ListPlaylists\\ListPlaylists->__invoke()\n#4 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(181): CentreonItEdition\\Dashboard\\Playlist\\Infrastructure\\API\\ListPlaylists\\ListPlaylistsController->__invoke()\n#5 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#6 /usr/share/centreon/vendor/symfony/http-kernel/Kernel.php(197): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#7 /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#8 {main}"}

 

 

when i try to create/save a playlist i’ve this error :

o2024-12-05T10:14:48+0100] 4ERROR] 0CentreonItEdition\Dashboard\Playlist\Application\UseCase\ListPlaylists\ListPlaylists:0]: Error while listing playlists {"trace":"PDOException: SQLSTATEn42S22]: Column not found: 1054 Unknown column 'dpl.has_public_access' in 'SELECT' in /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Infrastructure/Repository/DbReadPlaylistRepository.php:0\nStack trace:\n#0 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Infrastructure/Repository/DbReadPlaylistRepository.php(0): PDOStatement->execute()\n#1 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Application/UseCase/ListPlaylists/ListPlaylists.php(0): CentreonItEdition\\Dashboard\\Playlist\\Infrastructure\\Repository\\DbReadPlaylistRepository->findByRequestParameters()\n#2 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Application/UseCase/ListPlaylists/ListPlaylists.php(0): CentreonItEdition\\Dashboard\\Playlist\\Application\\UseCase\\ListPlaylists\\ListPlaylists->findAsAdmin()\n#3 /usr/share/centreon/src/CentreonItEdition/Dashboard/Playlist/Infrastructure/API/ListPlaylists/ListPlaylistsController.php(0): CentreonItEdition\\Dashboard\\Playlist\\Application\\UseCase\\ListPlaylists\\ListPlaylists->__invoke()\n#4 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(181): CentreonItEdition\\Dashboard\\Playlist\\Infrastructure\\API\\ListPlaylists\\ListPlaylistsController->__invoke()\n#5 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#6 /usr/share/centreon/vendor/symfony/http-kernel/Kernel.php(197): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#7 /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#8 {main}"}


Hi,

Could you please confirm that the upgrades for the centreon-it-edition-extensions module were played in the Administration > Extensions > Manager page ?

Regards,

Adrien


yes everything is up to date

 


@SavCent Ok thanks, because it seems that an upgrade script from centreon-it-edition-extensions module has not been played.

Could you please check the following table;

 

use centreon;
DESC dashboard_playlist;

Regards


MariaDB [centreon]> DESC dashboard_playlist;
+---------------+---------------------+------+-----+---------+----------------+
| Field         | Type                | Null | Key | Default | Extra          |
+---------------+---------------------+------+-----+---------+----------------+
| id            | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| name          | varchar(255)        | NO   | UNI | NULL    |                |
| description   | text                | YES  |     | NULL    |                |
| rotation_time | tinyint(3) unsigned | NO   |     | NULL    |                |
| created_at    | int(11) unsigned    | NO   |     | NULL    |                |
| updated_at    | int(11) unsigned    | YES  |     | NULL    |                |
| created_by    | int(11)             | YES  | MUL | NULL    |                |
| updated_by    | int(11)             | YES  | MUL | NULL    |                |
| is_public     | tinyint(1)          | NO   |     | NULL    |                |
+---------------+---------------------+------+-----+---------+----------------+
9 rows in set (0.001 sec)
 


Ok, it seems that the SQL upgrade process has not been played for the module centreon-it-edition-extensions


As a workaround, you might want to play this SQL request on your database (centreon)

use centreon;

ALTER TABLE
`dashboard_playlist`
ADD
COLUMN `publisher_id` INT NULL,
ADD
COLUMN `public_id` VARCHAR(255) NOT NULL,
RENAME COLUMN `is_public` TO `has_public_access`,
ADD
CONSTRAINT `dashboard_playlist_publisher_id` FOREIGN KEY (`publisher_id`) REFERENCES `contact` (`contact_id`) ON DELETE
SET
NULL;

And then try to re-create your playlist.

I'll check on my side what might have gone wrong.

Let me know if it fixed your issue.

Regards.

Adrien


Hello ​@SavCent Sorry for the inconvenience. We have fixed the issue yesterday on our side so it will be available in the next 24.10 release but the fix provided by ​@Adrien Morais-Mestre contains the same code as in the next release.


Reply