plone / plone/documentation

Docs on setting the modification date

Open
#931 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

31 needs: help 33 needs: docs 42 lvl: moderate 99 tag: Plone 6.x
Dominant language
Makefile
Stars
106
Forks
190
Avg merge
3d 2h
Merged PRs (30d)
1

Description

The documentation

https://5.docs.plone.org/develop/plone/content/timestamps.html#setting-modification-date-explicitly

is in general right but in reality it is wrong.

You usually need to call reindexObject() for object updates. And reindexObject() implicitly triggers an update of the modification_date property with the current timestamp. So it seems to be impossible to explicitly set the modification date.

  /home/vmadmin/share-migration/eggs/zope.component-3.12.1-py2.7.egg/zope/component/_api.py(136)subscribers()
-> return sitemanager.subscribers(objects, interface)
  /home/vmadmin/share-migration/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg/zope/interface/registry.py(328)subscribers()
-> return self.adapters.subscribers(objects, provided)
  /home/vmadmin/share-migration/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg/zope/interface/adapter.py(596)subscribers()
-> subscription(*objects)
  /home/vmadmin/share-migration/eggs/zope.component-3.12.1-py2.7.egg/zope/component/event.py(32)objectEventNotify()
-> zope.component.subscribers((event.object, event), None)
  /home/vmadmin/share-migration/eggs/zope.component-3.12.1-py2.7.egg/zope/component/_api.py(136)subscribers()
-> return sitemanager.subscribers(objects, interface)
  /home/vmadmin/share-migration/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg/zope/interface/registry.py(328)subscribers()
-> return self.adapters.subscribers(objects, provided)
  /home/vmadmin/share-migration/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg/zope/interface/adapter.py(596)subscribers()
-> subscription(*objects)
  /home/vmadmin/share-migration/eggs/plone.dexterity-2.5.1-py2.7.egg/plone/dexterity/content.py(784)reindexOnModify()
-> content.reindexObject()
  /home/vmadmin/share-migration/eggs/Products.CMFCore-2.2.11-py2.7.egg/Products/CMFCore/CMFCatalogAware.py(85)reindexObject()
-> self.notifyModified()
  /home/vmadmin/share-migration/eggs/plone.dexterity-2.5.1-py2.7.egg/plone/dexterity/content.py(381)notifyModified()
-> self.setModificationDate()
> /home/vmadmin/share-migration/eggs/plone.dexterity-2.5.1-py2.7.egg/plone/dexterity/content.py(405)setModificationDate()
-> self.modification_date = DateTime()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked timestamps documentation and compare its instructions with the reported reindexObject() and setModificationDate() call stack. Verify the documented behavior around explicit modification dates, then update the page so it accurately describes the supported procedure and limitations; the issue is done when the documentation matches the observed Plone behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.