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

Start date changing after pressing enter in title field #465

Closed
krissik opened this issue Apr 10, 2018 · 4 comments
Closed

Start date changing after pressing enter in title field #465

krissik opened this issue Apr 10, 2018 · 4 comments

Comments

@krissik
Copy link

krissik commented Apr 10, 2018

If I edit an event that has a start date set and I click to title field and press enter, then the start date changes to current date and time. I can reproduce it at http://demo.plone.de.

@hvelarde
Copy link
Member

hvelarde commented Aug 9, 2018

this happens because the start field is not being indexed correctly; I just discovered that while trying to fix some randomly failing tests in collective.cover:

(Pdb) event.start = datetime.today()
(Pdb) event.start
datetime.datetime(2018, 8, 9, 19, 16, 47, 221838)
(Pdb) event.reindexObject()
(Pdb) results = api.content.find(portal_type='Event')
(Pdb) len(results)
1
(Pdb) results[0].start
Missing.Value

this happens with the following ecosystem:

  • Plone = 4.3.17
  • plone.app.contenttypes = 1.1.6
  • plone.app.event = 1.1.12
  • plone.event = 1.3.4

CC @thet @idgserpro @rodfersou

@hvelarde
Copy link
Member

hvelarde commented Aug 9, 2018

this indexer could be broken:

@indexer(IDXEvent)
def start_indexer(obj):
    event = IEventBasic(obj)
    if event.start is None:
        raise AttributeError
return DT(event.start)

@hvelarde
Copy link
Member

hvelarde commented Aug 9, 2018

here you can see the error I'm facing: event.start was set at 22:39 and modified just seconds after that; as the brain returns Missing.Value, the modification date (22:40) is used:

AssertionError: u'Aug 09, 2018 10:39 PM' not found in u'<html xmlns="http://www.w3.org/1999/xhtml">\n\n<body>\n  \n\n  <div class="cover-basic-tile tile-content">\n    \n\n         \n\n          \n\n          <h2>\n             <a href="http://nohost/plone/my-event">My event</a>\n          </h2>\n          \n          \n      \n\n      \n\n      \n\n      \n\n      \n\n      \n    \n    \n\n         \n\n      \n\n      \n\n      \n\n      \n\n      \n    \n    \n\n         \n\n      \n\n      \n\n      \n\n      \n\n      \n    \n    \n\n         \n\n      \n\n      \n\n      \n        <time datetime="2018-08-09T22:40:14+00:00">Aug 09, 2018 10:40 PM</time>\n      \n\n      \n\n      \n    \n    \n\n         \n\n      \n\n      \n\n      \n\n      \n            \n\n\n      \n\n      \n    \n    \n\n         \n\n      \n\n      \n\n      \n\n      \n\n      \n        <div class="visualClear"><!-- --></div>\n      \n    \n  </div>\n</body>\n</html>\n'

gbastien added a commit to plone/plone.api that referenced this issue Sep 6, 2018
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 14, 2018
Branch: refs/heads/master
Date: 2018-09-06T09:18:52+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@2fa3b01

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T09:44:06+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@ddeeac3

Fix flake8

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:42+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@81fef76

Typo

Files changed:
M CHANGES.rst
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:55+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@31119fe

Run test create Collection in both AT and DX env

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T20:56:53+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@bac3db8

Removed reference to plone/plone.app.contenttypes#465

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T22:24:11+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@d491d6a

Completed docstring for test_create_dx_event

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-14T09:15:25+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.api@3e38c4f

Merge pull request #414 from plone/create_at_collection_fix

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 14, 2018
Branch: refs/heads/master
Date: 2018-09-06T09:18:52+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@2fa3b01

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T09:44:06+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@ddeeac3

Fix flake8

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:42+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@81fef76

Typo

Files changed:
M CHANGES.rst
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:55+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@31119fe

Run test create Collection in both AT and DX env

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T20:56:53+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@bac3db8

Removed reference to plone/plone.app.contenttypes#465

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T22:24:11+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@d491d6a

Completed docstring for test_create_dx_event

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-14T09:15:25+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.api@3e38c4f

Merge pull request #414 from plone/create_at_collection_fix

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 14, 2018
Branch: refs/heads/master
Date: 2018-09-06T09:18:52+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@2fa3b01

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T09:44:06+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@ddeeac3

Fix flake8

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:42+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@81fef76

Typo

Files changed:
M CHANGES.rst
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:55+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@31119fe

Run test create Collection in both AT and DX env

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T20:56:53+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@bac3db8

Removed reference to plone/plone.app.contenttypes#465

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T22:24:11+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@d491d6a

Completed docstring for test_create_dx_event

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-14T09:15:25+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.api@3e38c4f

Merge pull request #414 from plone/create_at_collection_fix

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 14, 2018
Branch: refs/heads/master
Date: 2018-09-06T09:18:52+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@2fa3b01

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T09:44:06+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@ddeeac3

Fix flake8

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:42+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@81fef76

Typo

Files changed:
M CHANGES.rst
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T14:38:55+02:00
Author: Gauthier Bastien (gbastien) <g.bastien@imio.be>
Commit: plone/plone.api@31119fe

Run test create Collection in both AT and DX env

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T20:56:53+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@bac3db8

Removed reference to plone/plone.app.contenttypes#465

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-06T22:24:11+02:00
Author: Gauthier Bastien (gbastien) <gauthier@imio.be>
Commit: plone/plone.api@d491d6a

Completed docstring for test_create_dx_event

Files changed:
M src/plone/api/tests/test_content.py
Repository: plone.api

Branch: refs/heads/master
Date: 2018-09-14T09:15:25+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.api@3e38c4f

Merge pull request #414 from plone/create_at_collection_fix

Fix falining AT Collection creation when using api.content.create.

Files changed:
M CHANGES.rst
M src/plone/api/content.py
M src/plone/api/tests/test_content.py
@jensens
Copy link
Member

jensens commented Apr 30, 2022

probably outdated, reopen if I am wrong

@jensens jensens closed this as completed Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants