Problem/Motivation
Getting an error when trying to preview a node having the publication date field and not created yet.
Steps to reproduce
Create a node having the published date field and before submitting click on node preview.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 3424575-14.patch | 717 bytes | webflo |
| #12 | Screenshot from 2024-04-11 08-09-30.png | 63.75 KB | dineshkumarbollu |
| #2 | Screenshot from 2024-02-29 15-30-31.png | 48.27 KB | dineshkumarbollu |
Issue fork publication_date-3424575
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3424575-invalidargumentexception-the-timestamp
changes, plain diff MR !19
Comments
Comment #2
dineshkumarbollu commentedHi @binnythomas
I tested the issue in my system on preview it doesn't get any error. Am i missing anything?
Drupal: 10.1
php : 8.1
Comment #3
binnythomas commentedTry Drupal 10.2 and PHP 8.2 @dineshkumarbollu
Comment #4
dineshkumarbollu commentedHi @binnythomas
Tested on Drupal 10.2 php 8.2, getting the error.
Comment #5
haryoadi commentedI also have this issue.
there's an extra condition on top of "previewing new node" for this issue to happen: the publication date should be included in the view display
Comment #6
lus commentedGot the same error on Drupal 9.5.11 and PHP 8.1
Comment #7
vensiresComment #8
dineshkumarbollu commentedComment #9
kyriazo commentedComment #11
kyriazo commentedAdded a check on values massage callback function of the widget, to actually fill the value with the form submission time, if left empty.
Comment #12
dineshkumarbollu commentedMR!19 fixes the issue, LGTM
Comment #13
vensiresComment #14
webflo commentedThanks for the bug report. We decided in #3066446: Field value should be empty for entities that were never published that the field should be empty for unpublished entities. The widget should not fill the field with an computed value.
Comment #19
webflo commentedComment #21
wisneskit commentedQuestion to all -- Being this issue went back and forth on this thread as well as another linked thread; https://www.drupal.org/project/drupal/issues/3439347#comment-15895557, so what is the correct patch version?
Is it https://www.drupal.org/files/issues/2024-05-16/3424575-14.patch ?
Or is it https://www.drupal.org/files/issues/2024-12-11/add-revision-creation-tim... ?
Thanks.