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

Don't use session storage anymore - does not work with plone 5 for anonymous users #60

merged 1 commit into from Feb 3, 2020


Copy link

maethu commented Feb 3, 2020

This fixes the following error:

POSKeyError: 0x09
  File "ZPublisher/", line 138, in publish
    request, bind=1)
  File "ZPublisher/", line 77, in mapply
    if debug is not None: return debug(object,args,context)
  File "ZPublisher/", line 48, in call_object
    result=apply(object,args) # Type s<cr> to step into published object.
  File "home/zope/eggs/ftw.pdfgenerator-1.6.6-py2.7.egg/ftw/pdfgenerator/browser/", line 17, in __call__
    if self.allow_alternate_output():
  File "home/zope/eggs/ftw.pdfgenerator-1.6.6-py2.7.egg/ftw/pdfgenerator/browser/", line 34, in allow_alternate_output
    elif self.request.SESSION.get(DEBUG_MODE_SESSION_KEY, False):
  File "ZPublisher/", line 1380, in __getattr__
    v = self.get(key, default, returnTaints=returnTaints)
  File "ZPublisher/", line 1337, in get
    v = v()
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Sessions/", line 101, in getSessionData
    return self._getSessionDataObject(key)
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Sessions/", line 188, in _getSessionDataObject
    ob = container.new_or_existing(key)
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Transience/", line 839, in new_or_existing
    item = self.get(key, _marker)
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Transience/", line 495, in get
    item = self._move_item(k, current_ts, default)
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Transience/", line 285, in _move_item
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Transience/", line 934, in _housekeep
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Transience/", line 551, in _finalize
    last_finalized = self._last_finalized_timeslice()
  File "home/zope/eggs/Zope2-2.13.29-py2.7.egg/Products/Transience/", line 1071, in __call__
    return self.value
  File "ZODB/", line 796, in setstate
    p, serial = self._storage.load(oid)
  File "ZODB/", line 143, in load
    r = self._storage.loadBefore(oid, self._start)
  File "tempstorage/", line 187, in loadBefore
    raise POSException.POSKeyError(oid)

For more infos: see
They recommend to use something else, like cookie storage.

@maethu maethu requested a review from jone Feb 3, 2020
@maethu maethu force-pushed the mle-fix-anon-export branch from afdad67 to 026e036 Feb 3, 2020

This comment has been minimized.

Copy link
Member Author

maethu commented Feb 3, 2020

@jone I extended the mock tests a bit, even-thought in realty those tests would all fail in plone 5, due the broken session storage.

@maethu maethu force-pushed the mle-fix-anon-export branch from 026e036 to f7dfc12 Feb 3, 2020
jone approved these changes Feb 3, 2020
@maethu maethu merged commit b42c2fc into master Feb 3, 2020
2 checks passed
2 checks passed
CI Governor: test-plone-4.3.x.cfg Task #506186 succeeded
CI Governor: test-plone-5.1.x.cfg Task #506187 succeeded
@maethu maethu deleted the mle-fix-anon-export branch Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.