plone / plone.restapi

RESTful API for Plone.
http://plonerestapi.readthedocs.org/
86 stars 78 forks source link

BadRequest: The id "jwt_auth" is invalid - it is already in use. #119

Closed mstaniszczak closed 7 years ago

mstaniszczak commented 8 years ago

After add to configure.zcml:

<include package="plone.restapi" />

I can't create fresh instance. Here you are fresh trackback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone4.csrffixes.patches, line 8, in disable_csrf
  Module Products.CMFPlone.browser.admin, line 208, in __call__
  Module Products.CMFPlone.factory, line 105, in addPloneSite
  Module Products.GenericSetup.tool, line 365, in runAllImportStepsFromProfile
   - __traceback_info__: profile-plone.restapi:performance
  Module Products.GenericSetup.tool, line 1119, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 1030, in _doRunImportStep
   - __traceback_info__: plone.restapi
  Module plone.restapi.setuphandlers, line 24, in import_various
  Module plone.restapi.setuphandlers, line 9, in install_pas_plugin
  Module Products.PluggableAuthService.PluggableAuthService, line 452, in _setObject
  Module OFS.ObjectManager, line 326, in _setObject
  Module OFS.ObjectManager, line 116, in checkValidId
BadRequest: The id "jwt_auth" is invalid - it is already in use.

There is no more plone.restapi references, that this one line in configure.zcml in one of our addons.

pabo3000 commented 8 years ago

If you get stuck in this error f. e. while upgrading plone.restapi then you can delete the object with the id "jwt_auth" in the ZMI.

lukasgraf commented 8 years ago

@tisto @buchi: The setuphandler code for the jwt_auth plugin should probably deal gracefully with the case where it's already present.

However, in the traceback above I see that the plone.restapi:performance profile also is being installed - that might be part of the issue here.

tisto commented 7 years ago

Closing the issue. This seems to be a result of a broken configuration.