Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin table without changelog causes error when saving data #1762

Closed
Fasse opened this issue Feb 28, 2025 · 0 comments
Closed

Plugin table without changelog causes error when saving data #1762

Fasse opened this issue Feb 28, 2025 · 0 comments
Assignees

Comments

@Fasse
Copy link
Member

Fasse commented Feb 28, 2025

If we have a table that is not (and should not) be added to the changelog logic then there will be an error thrown.

Fatal error: Uncaught Admidio\Infrastructure\Exception: Settings name "changelog_table_statistics" does not exist! in /admidio/src/Preferences/ValueObject/SettingsManager.php:147 Stack trace: #0 /admidio/src/Preferences/ValueObject/SettingsManager.php(162): Admidio\Preferences\ValueObject\SettingsManager->get('changelog_table...', false) #1 /admidio/src/Changelog/Service/ChangelogService.php(994): Admidio\Preferences\ValueObject\SettingsManager->getBool('changelog_table...') #2 [internal function]: Admidio\Changelog\Service\ChangelogService::Admidio\Changelog\Service{closure}('statistics') #3 /admidio/src/Changelog/Service/ChangelogService.php(989): array_map(Object(Closure), Array) #4 /admidio/src/Changelog/Entity/LogChanges.php(285): Admidio\Changelog\Service\ChangelogService::isTableLogged('statistics') #5 /admidio/src/Infrastructure/Entity/Entity.php(295): Admidio\Changelog\Entity\LogChanges->save() #6 /admidio/src/Infrastructure/Entity/Entity.php(822): Admidio\Infrastructure\Entity\Entity->logCreation() #7 /admidio/adm_plugins/statistics/utils/db_access.php(126): Admidio\Infrastructure\Entity\Entity->save() #8 /admidio/adm_plugins/statistics/install/install.php(211): DBAccess->saveStatistic(Object(Statistic)) #9 /admidio/adm_plugins/statistics/install/install.php(149): addStatisticTemplates() #10 /admidio/adm_plugins/statistics/install/install.php(63): startInstallation() #11 {main} thrown in /admidio/src/Preferences/ValueObject/SettingsManager.php on line 147

The Entity class should only use the changelog behavior if this is explizitly set. Also if there is an access to a preference it must be checked if this preference really exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants