Skip to content

Addiotnal Fields - can't update to 1.22.0-beta2 #1014

Closed

Description

@barte91

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

11.0.0-rc5

Plugin version

1.22.0-beta2

Bug description

Goodmorning,

I try to install GLPI 11.0.0-rc5 in a develop test env, I try to move it also the Additional plugin, but I can't update it to v. 1.22.0-beta2

Relevant log output

**Migration_to_1.22.0-beta2.log**
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
0 seconds for "Updating glpi_plugin_fields_fields"
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Change of the database layout - glpi_plugin_fields_computercredenzialicomputers
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Change of the database layout - glpi_plugin_fields_computercredenzialicomputers
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Change of the database layout - glpi_plugin_fields_computercredenzialicomputers
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Change of the database layout - glpi_plugin_fields_networkequipmentinveperiferiches
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Change of the database layout - glpi_plugin_fields_fields
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Update to 1.22.0-beta2 version completed.
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
0 seconds for "Fix fields names"
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
Update to 1.22.0-beta2 version completed.
2025-09-24 09:43:45 [7@NetSrv-glpi.netproject.local]
0 seconds for "Regenerate containers files"

**php-error.log**
[2025-09-24 07:44:43] glpi.WARNING:   *** Failed to save key "{key}" of type array: rename(/var/lib/glpi/files/_cache/11.0.0-rc5-e7e0925b-production/core/i0jp+bkc,/var/lib/glpi/files/_cache/11.0.0-rc5-e7e0925b-production/core/9/X/f5OoUwgLUS+uPURp-LAQ): Permission denied
  Backtrace :
  ...fony/cache/Traits/FilesystemCommonTrait.php:116 
  :                                                  Symfony\Component\Cache\Adapter\FilesystemAdapter::{closure:Symfony\Component\Cache\Traits\FilesystemCommonTrait::write():91}()
  ...fony/cache/Traits/FilesystemCommonTrait.php:116 rename()
  ...dor/symfony/cache/Traits/FilesystemTrait.php:89 Symfony\Component\Cache\Adapter\FilesystemAdapter->write()
  ...r/symfony/cache/Adapter/AbstractAdapter.php:147 Symfony\Component\Cache\Adapter\FilesystemAdapter->doSave()
  ...mfony/cache/Traits/AbstractAdapterTrait.php:237 Symfony\Component\Cache\Adapter\AbstractAdapter->commit()
  ./vendor/symfony/cache/Psr16Cache.php:114          Symfony\Component\Cache\Adapter\AbstractAdapter->save()
  ./src/Glpi/Cache/SimpleCache.php:52                Symfony\Component\Cache\Psr16Cache->set()
  ./src/DbUtils.php:1082                             Glpi\Cache\SimpleCache->set()
  ./src/autoload/dbutils-aliases.php:365             DbUtils->getSonsOf()
  ./src/Session.php:428                              getSonsOf()
  ...stener/RequestListener/SessionVariables.php:113 Session::shouldReloadActiveEntities()
  ...ymfony/event-dispatcher/EventDispatcher.php:260 Glpi\Kernel\Listener\RequestListener\SessionVariables->onKernelRequest()
  ...ymfony/event-dispatcher/EventDispatcher.php:220 Symfony\Component\EventDispatcher\EventDispatcher::{closure:Symfony\Component\EventDispatcher\EventDispatcher::optimizeListeners():255}()
  ...symfony/event-dispatcher/EventDispatcher.php:56 Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
  ./vendor/symfony/http-kernel/HttpKernel.php:157    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
  ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
  ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
  ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()

Page URL

No response

Steps To reproduce

  1. update to Glpi 11.0-rc5
  2. Try to uopdate Additonal Plugins to 1.22.0-beta2

Your GLPI setup information

No response

Anything else?

No response

Activity

  1. stonebuzz commented on Sep 24, 2025

    @stonebuzz
    Contributor

    It seems that cache files were created using the root user.

    You need to clear the glpi/files/_cache/ folder without deleting the folder itself.

  2. barte91 commented on Sep 25, 2025

    @barte91
    Author

    Hi @stonebuzz,
    I modify the rights on _cache folder; but now I've this error

    [2025-09-25 06:15:45] glpi.CRITICAL: *** Uncaught PHP Exception Exception: "Executing direct queries is not allowed!" at DBmysql.php line 353 Backtrace : ./src/DBmysql.php:353 ...elds/inc/plugingenericobjectoxooxo.class.php:33 DBmysql->query() ./marketplace/fields/inc/container.class.php:654 PluginFieldsPlugingenericobjectoxooxo::install() ./marketplace/fields/inc/container.class.php:359 PluginFieldsContainer::create() ./marketplace/fields/hook.php:86 PluginFieldsContainer::installUserData() ./src/Plugin.php:1139 plugin_fields_install() : Plugin->install() ./src/Glpi/Marketplace/Controller.php:655 call_user_func() ./src/Glpi/Marketplace/Controller.php:545 Glpi\Marketplace\Controller->setPluginState() ./src/Glpi/Marketplace/Controller.php:276 Glpi\Marketplace\Controller->installPlugin() ./ajax/marketplace.php:55 Glpi\Marketplace\Controller->downloadPlugin() ...Glpi/Controller/LegacyFileLoadController.php:63 require() ./vendor/symfony/http-kernel/HttpKernel.php:181 Glpi\Controller\LegacyFileLoadController->__invoke() ./vendor/symfony/http-kernel/HttpKernel.php:76 Symfony\Component\HttpKernel\HttpKernel->handleRaw() ./vendor/symfony/http-kernel/Kernel.php:197 Symfony\Component\HttpKernel\HttpKernel->handle() ./public/index.php:70 Symfony\Component\HttpKernel\Kernel->handle()

  3. stonebuzz commented on Sep 25, 2025

    @stonebuzz
    Contributor

    Could you please provide the following file here:

    files/_plugins/felds/inc/plugingenericobjectoxooxo.class.php?

    Best regards

  4. barte91 commented on Sep 25, 2025

    @barte91
    Author
  5. stonebuzz commented on Sep 25, 2025

    @stonebuzz
    Contributor

    Thanks

    could you please provide the following files

    glpi/marketplace/plugins/fields/templates/container.class.tpl

  6. barte91 commented on Sep 25, 2025

    @barte91
    Author

    Here the file; i changed type to .txt

    container.class.tpl.txt

  7. trasher commented on Sep 25, 2025

    @trasher
    Contributor

    The issue is in plugingenericobjectoxooxo.class.php which uses >query for SHOW COLUMNS instead of doQuery(). I guess this is because container classes must be generated again after plugin update, but before trying to call their install() method?

  8. stonebuzz commented on Sep 25, 2025

    @stonebuzz
    Contributor

    Hello,

    Could you please check the permissions of the files located in the files/_plugins/ directory?

    During the plugin update, these files should be regenerated using the corresponding template.
    The template itself is correct; however, the file files/_plugins/felds/inc/plugingenericobjectoxooxo.class.php, which should have been replaced, still contains the old code.

    It appears that a permissions issue might be preventing this file from being properly updated / replaced.

    If the issue persists after all these steps, please clear the contents of the following directories (without deleting the directories themselves):

    • files/_plugins/fields/inc/
    • files/_plugins/fields/front/

    Then, try running the plugin update again.

    Best regards,

  9. stonebuzz commented on Sep 25, 2025

    @stonebuzz
    Contributor

    The issue is in plugingenericobjectoxooxo.class.php which uses >query for SHOW COLUMNS instead of doQuery(). I guess this is because container classes must be generated again after plugin update, but before trying to call their install() method?

    The plugin already handles this in the same way: during the update, it regenerates the files from the templates and then calls ::install.

  10. barte91 commented on Sep 25, 2025

    @barte91
    Author

    @stonebuzz I delete the files in folder

    files/_plugins/fields/inc/
    files/_plugins/fields/front/

    my rights are:

    drwxr-xr-x  12 apache apache  marketplace
    drwxr-xr-x   7 apache apache   plugins
    

    Now, I try to update it and it works, but I can't enable it
    I attach you the last php-error.lgog

    php-errors.log

  11. stonebuzz commented on Sep 25, 2025

    @stonebuzz
    Contributor

    It seems that cache files were created using the root user.

    You need to clear the glpi/files/_cache/ folder without deleting the folder itself.

  12. barte91 commented on Sep 26, 2025

    @barte91
    Author

    Hi @stonebuzz

    I try to delete all _cache file but don't works

    Here my rights on _cache
    drwxrwxrwx apache apache _cache

    in php-errors I see different log about:
    [2025-09-26 06:25:01] glpi.WARNING: *** Warning: include_once(): Failed opening './marketplace/fields/inc/autoload.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php:/usr/share/pear:/usr/share/php') at setup.php line 85

    [2025-09-26 06:25:01] glpi.ERROR: *** Error while loading plugin fields: Class "PluginFieldsAutoloader" not found

  13. stonebuzz commented on Sep 26, 2025

    @stonebuzz
    Contributor

    Is the file ./marketplace/fields/inc/autoload.php present?

  14. barte91 commented on Sep 26, 2025

    @barte91
    Author

    my ./marketplace/fields/inc/ is empty
    I've all the file instead under ./plugins/fields/inc/
    can I copy all files in ./marketplace/fields/inc/ ?

  15. stonebuzz commented on Sep 26, 2025

    @stonebuzz
    Contributor

    I don't know which version of the Fields plugin is in the plugins/ folder.

    Please delete both folders, then re-download the plugin via the GLPI Marketplace (it will be located in the marketplace folder).

  16. 7 remaining items

  17. stonebuzz commented on Sep 29, 2025

    @stonebuzz
    Contributor

    Okay, so the container is currently linked to an object from the GenericObject plugin.

    This type of object should normally be migrated into the GLPI core — can you confirm?

    We are preparing an automatic migration method to ensure that Fields containers are properly migrated into the CustomAssets feature of GLPI, which is now the place where former GenericObject objects should be managed.

  18. stonebuzz commented on Sep 29, 2025

    @stonebuzz
    Contributor

    I just released Beta 3, which should appear shortly on the marketplace.

    Could you please update the plugin to this version? The plugin should migrate the containers attached to PluginGenericobjectOxo to the native core version.

    Best regards,

  19. barte91 commented on Sep 29, 2025

    @barte91
    Author

    OK, no worries, I update you when I update the plugin with new version

  20. barte91 commented on Sep 29, 2025

    @barte91
    Author

    Hi,

    I update it to Beta 3
    Now, I can't update it; in php-error I see:

    [2025-09-29 14:06:42] glpi.WARNING:   *** Test logger
    [2025-09-29 14:07:11] glpi.WARNING:   *** User Warning: plugin_version_genericobject method must be defined! at Plugin.php line 1837
      Backtrace :
      ./src/Plugin.php:1837
      ./marketplace/fields/inc/container.class.php:153   Plugin::getInfo()
      ./marketplace/fields/hook.php:79                   PluginFieldsContainer::installBaseData()
      ./src/Plugin.php:1139                              plugin_fields_install()
      ./front/plugin.form.php:60                         Plugin->install()
      ...Glpi/Controller/LegacyFileLoadController.php:63 require()
      ./vendor/symfony/http-kernel/HttpKernel.php:181    Glpi\Controller\LegacyFileLoadController->__invoke()
      ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
      ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
      ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()
    
    [2025-09-29 14:07:11] glpi.CRITICAL:   *** Uncaught PHP Exception RuntimeException: "GenericObject plugin cannot be migrated. Please update it to the latest version." at container.class.php line 155
      Backtrace :
      ./marketplace/fields/inc/container.class.php:155
      ./marketplace/fields/hook.php:79                   PluginFieldsContainer::installBaseData()
      ./src/Plugin.php:1139                              plugin_fields_install()
      ./front/plugin.form.php:60                         Plugin->install()
      ...Glpi/Controller/LegacyFileLoadController.php:63 require()
      ./vendor/symfony/http-kernel/HttpKernel.php:181    Glpi\Controller\LegacyFileLoadController->__invoke()
      ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
      ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
      ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()
    
  21. barte91 commented on Sep 29, 2025

    @barte91
    Author

    The gericobject plugin is integrated in core from GLPI 11, so I've migrated it, in accord of GLPI doc, when I update GLPI to v.11

    I use command bin/console migrate: migration:genericobject_plugin_to_core

  22. stonebuzz commented on Sep 30, 2025

    @stonebuzz
    Contributor

    Hello @barte91,

    Since you have additional fields coming from the Fields plugin on custom objects (previously managed by GenericObject), you will need to install version 3.0.0 of the GenericObject plugin, which is dedicated exclusively to the migration process.

    This version should be available shortly on the Marketplace.

    Once installed, simply restart the update process of the Fields plugin in order to migrate the containers to the new Custom Assets.

    Best regards,

  23. redddcyclone commented on Oct 1, 2025

    @redddcyclone

    Hello

    I did the migration for the GenericObject plugin objects and uninstalled the plugin before updating the Fields plugin... and now I'm getting the following error when I try to update the fields plugin:

    [2025-10-01 11:53:44] glpi.CRITICAL:   *** Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\ClassNotFoundError: "Attempted to load class "PluginFieldsPlugingenericobjectsistemadadosdesistema" from the global namespace.
    Did you forget a "use" statement?" at container.class.php line 193
      Backtrace :
      ./plugins/fields/inc/container.class.php:193
      ./plugins/fields/hook.php:79                       PluginFieldsContainer::installBaseData()
      ./src/Plugin.php:1160                              plugin_fields_install()
      ./front/plugin.form.php:60                         Plugin->install()
      ...Glpi/Controller/LegacyFileLoadController.php:64 require()
      ./vendor/symfony/http-kernel/HttpKernel.php:181    Glpi\Controller\LegacyFileLoadController->__invoke()
      ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
      ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
      ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()
    

    Is there something I can do about it other than restoring the database backup?

  24. stonebuzz commented on Oct 1, 2025

    @stonebuzz
    Contributor

    Please refer to the following resources:

    Important: You must not uninstall the GenericObject plugin before migrating the Fields plugin, as doing so may result in file deletions.

    This is the cause of the following error.

    Please retry with a backup and the latest official release of Fields and the GenericObject End-of-Life Update.

  25. redddcyclone commented on Oct 1, 2025

    @redddcyclone

    Hi @stonebuzz

    I restored the backup and updated the GenericObject plugin without uninstalling it. Afterwards, I get the same error I mentioned when I try to update the Fields plugin. Must I update the Fields plugin before updating the GenericObject plugin? I tried before and after migrating the assets to the new standard but got the same error.

  26. redddcyclone commented on Oct 1, 2025

    @redddcyclone

    @stonebuzz please ignore my last post, it was my fault. I deleted the files directory when doing tests for glpi-project/glpi#20632... I'm sorry

  27. stonebuzz commented on Oct 1, 2025

    @stonebuzz
    Contributor

    No problem 👍

    Si it's ok for fields ?

  28. redddcyclone commented on Oct 1, 2025

    @redddcyclone

    Yes, it's OK! I've already uninstalled GenericObject and my custom assets and fields are still there.

  29. barte91 commented on Oct 2, 2025

    @barte91
    Author

    I confirm, now it works!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions