plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
254 stars 191 forks source link

Bylines are not consistent #3350

Closed ale-rt closed 1 year ago

ale-rt commented 3 years ago

What I did:

  1. Go to https://6-classic.demo.plone.org/
  2. Login as Manager
  3. Browse to https://6-classic.demo.plone.org/en/demo/a-folder
  4. Note that the byline viewlet for the folder displays just the date while the byline for the page inside a folder displays also the time image

What I expect to happen:

The bylines should be consistent, probably both should display the time.

What version of Plone/ Addons I am using:

Plone 6.0.0a2.dev0 (6001) CMF 2.5.4 Zope 5.3.1.dev0 Python 3.8.3 (default, Jul 14 2020, 07:39:54) [GCC 7.5.0] PIL 8.3.1 (Pillow) WSGI: On Server: waitress 2.0.0

rohnsha0 commented 2 years ago

https://github.com/plone/plone.app.contenttypes/blob/08b6cea4e17a5588d2f5cdbe706ca280f528c481/plone/app/contenttypes/browser/templates/listing.pt#L65 Is the code lying in here!? @ale-rt

ale-rt commented 2 years ago

There but not just there... If you look the screenshot the byline after the page heading says "Oct 30, 2021", the byline in the listed page says "Oct 30, 2021 08:11 AM".

The pt you linked is responsible for the second one (see the long_format=1): https://github.com/plone/plone.app.contenttypes/blob/08b6cea4e17a5588d2f5cdbe706ca280f528c481/plone/app/contenttypes/browser/templates/listing.pt#L97

The other date is probably generated in some viewlet contained in plone.app.layout. I would change both of them to use pat-display-time like we have in the sidebar, see: image

pbauer commented 1 year ago

fixed