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

Index gets an invalid date when feedItemUpdated date set to October 31 #7

Closed
jbofill opened this issue Nov 11, 2013 · 4 comments
Closed

Comments

@jbofill
Copy link
Contributor

jbofill commented Nov 11, 2013

This issue only appears when a feed item field feedItemUpdated date is set to October 31. Field is correct in feed item view, but gives an error at the portal_catalog.

When a feed item has its date set to October 31, if you go to to portal_catalog and browse getFeedItemUpdated,

portal_catalog/Indexes/getFeedItemUpdated/manage_browse

when you reach that feed item you get an Invalid date error:

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 Shared.DC.Scripts.Bindings, line 322, in call
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module App.special_dtml, line 185, in _exec
Module DocumentTemplate.DT_Let, line 77, in render
Module DocumentTemplate.DT_In, line 606, in renderwb
Module DocumentTemplate.DT_Util, line 210, in eval

  • traceback_info: DateTime
    Module , line 1, in
    Module DateTime.DateTime, line 440, in init
    Module DateTime.DateTime, line 812, in _parse_args
    DateError: Invalid date: (2013, 11, 0, 16, 24, 0, 'UTC')

As you can see date has been incorrectly calculated, and set to day 0 of November. Hours and minutes are some times changed (1 hour and/or 1 minute less).

You can reproduce this error just adding a feed item with date set to 2013/10/31.

This error leads some times leads to a database error,

2013-11-11 13:52:29 ERROR ZODB.Connection Couldn't load state for 0x25f1
Traceback (most recent call last):
File "/home/p-planets/portal/eggs/ZODB3-3.10.5-py2.7-linux-i686.egg/ZODB/Connection.py", line 860, in setstate
self._setstate(obj)
File "/home/p-planets/portal/eggs/ZODB3-3.10.5-py2.7-linux-i686.egg/ZODB/Connection.py", line 914, in _setstate
self._reader.setGhostState(obj, p)
File "/home/p-planets/portal/eggs/ZODB3-3.10.5-py2.7-linux-i686.egg/ZODB/serialize.py", line 612, in setGhostState
state = self.getState(pickle)
File "/home/p-planets/portal/eggs/ZODB3-3.10.5-py2.7-linux-i686.egg/ZODB/serialize.py", line 605, in getState
return unpickler.load()
File "/home/p-planets/portal/eggs/DateTime-3.0.3-py2.7.egg/DateTime/DateTime.py", line 455, in setstate
self._parse_args(value[0], value[2])
File "/home/p-planets/portal/eggs/DateTime-3.0.3-py2.7.egg/DateTime/DateTime.py", line 790, in _parse_args
tz = _TZINFO._zmap[tz.lower()]
KeyError: u'+0000'

and I have to recover from a database snapshot.

@mauritsvanrees
Copy link
Member

I have seen this too from time to time. I don't know if that was for feed feeder items or for general content types and standard date fields. Until now I have assumed this is a general error in Plone and you cannot always browse all indexes. I may be wrong.

@jbofill
Copy link
Contributor Author

jbofill commented Nov 12, 2013

Yes, it seems a general error but in Zope DateIndex.

There is a 5 years old report ticket in Plone stating that a ticket must be opened in Zope. https://dev.plone.org/ticket/8354

I have'nt found the Zope issue tracker.

@cleder
Copy link
Member

cleder commented Nov 12, 2013

https://launchpad.net/zope2

On Tue, Nov 12, 2013 at 4:47 PM, Jordi Bofill notifications@github.comwrote:

Yes, it seems a general error but in Zope DateIndex.

There is a 5 years old report ticket in Plone stating that a ticket must
be opened in Zope. https://dev.plone.org/ticket/8354

I have'nt found the Zope issue tracker.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-28294057
.

Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

  1. Don’t drive species to extinction

  2. Don’t destroy a habitat that species rely on.

  3. Don’t change the climate in ways that will result in the above.

}<(((*>

@jbofill
Copy link
Contributor Author

jbofill commented Nov 12, 2013

Found the bug in Zope (cleder: thanks for the link) https://bugs.launchpad.net/zope2/+bug/727981. The issue is fixed in Products.ZCatalog 3.0b2.

I pinned Products.ZCatalog = 3.0.1 and browsed index getFeedItemUpdated without problems.

From my point of view this issue can be closed. Thank-you.

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

No branches or pull requests

3 participants