srsolutionsag / PegasusHelper

GNU General Public License v3.0
4 stars 0 forks source link

Uninstall -> Reinstall causes Integrity constraint violation: 1062 Duplicate entry 'ilias_pegasus' for key 'api_key' #3

Open pawohl opened 4 years ago

pawohl commented 4 years ago

Reproducing:

  1. Under "Administration" -> "Plugins" in the PH-Line, click "Uninstall"
  2. You receive a success message. Now click "Install"

Result: Installation fails with

[1001b] [2020-01-10 11:12:26.516275] unihalle_root.ERROR: ilErrorHandling::{closure}:50 10000 An undefined Database Exception occured. An exception was thrown! SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ilias_pegasus' for key 'api_key' in /var/www/ilias/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/PegasusHelper/classes/rest/RestSetup.php:136 

This applies to PH 2e2338ae07 which was upgraded multiple times from older versions.

d3r1w commented 3 years ago

I am quite sure that you already solved your problem, however if you encounter this problem again you could try the following procedure:

  1. Go into the REST plugin configuration and safe the ilias_pegasus client api secret and delete the client.
  2. Reinstall the PegasusHelper Plugin
  3. Go back to the REST plugin configuration and restore the ilias_pegasus client api secret to the previous value

Please feel free to open another ticket, if you still encounter some issues or have additional questions.