Hi guys,

I'm facing this issue here which I've tried to search up and low for a solution but to no avail.

Whenever I do a preview during node creation ( story, page, weblinks, any content type), the date would be shown wrongly for all users except admin.

Admin --> Fri, 07/20/2007 - 09:26
Normal user --> Thu, 01/01/1970 - 00:00

But upon clicking submit, the date would be saved as the correct date.

Drupal 5.1
PHP 5.2.2
Web server Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2

How do I rectify this erm bug?

Any kind soul please point me to a light!

Comments

sted-1’s picture

Anyone please help?

pinellos’s picture

Hi, i've the same problem. I've patched it for now, i DONT KNOW if this patch make possible security issues, but just change 'if (user_access('administer nodes'))' around line 2000 in node.module core module :

function node_object_prepare(&$node) {
 if (user_access('administer nodes')) {
   // Set up default values, if required.
    if (!isset($node->created)) {
    $node->created = time();
    }

to:

if (user_access('access content'))

HI!

sted-1’s picture

Hey pinellos, thanks for the reply.
I've updated one of my Drupal site to 5.2 and the problem no longer exists.

JHeffner’s picture

I still have this issue with every Drupal 5.2 site.. date is Dec 31 1969 for all authenticated users, and I also noticed tags are missing and not displayed on preview. I run 30 sites with different themes and modules and they all have this problem.

JHeffner’s picture

The patch above fixes the issue with date/time during preview. There are problems in general with preview including displaying taxonomy. I think the preview system needs a good overhaul.

desbeers’s picture

Status: Active » Closed (duplicate)

In issue http://drupal.org/node/175743 there is a patch for this problem and 2 other date-related problems.